Re: [NTG-context] \getscaledglyph for width-only
On Thu, 18 Aug 2016, Hans Hagen wrote: On 8/18/2016 1:12 AM, Brian R. Landy wrote: On Aug 17, 2016, at 5:45 PM, Hans Hagen wrote: On 8/17/2016 9:56 PM, Brian R. Landy wrote: Hi, I was wondering if there is a way to call \getscaledglyph to scale a glyph only horizontally, leaving the height untouched? Or maybe an alternate command? I can sort of accomplish this with (for example) \scale[sx=0.75,sy=1.0]{}{A}, but that encloses the glyph in an \hbox, which can be problematic. \getscaledglyph doesn't cause me any problems, except that it scales the height too. \starttext \definefontfeature[whatever][default][extend=2.5] \definedfont[Serif*whatever at 12pt] whatever \stoptext Thank you. One thing that \getscaledglyph does it works agnostic to the currently selected font. For example: scaling glyphs in one direction is kind of bad anyway so if you want just one glyph you can do \inframed{\scale[width=3em,height=1ex]{...}} or whatever suits the purpose Agreed. Here's a little more background, so it makes some sense why I want to scale horizontally, and then I describe my final solution. I have a specific case where I use a minus, a hyphen-minus, and a plus close to each other, and it's always bugged me that most fonts don't vertically align the hyphen-minus with the other two glyphs. An example is: {\normalUchar"2212}100-00+ I was thinking that math fonts did align these symbols, hence my question on Monday on how to get the hyphen-minus in math mode (and thanks for the quick answer on that) but unfortunately was wrong. So that got me searching for a way to horizontally shrink a minus, so it would retain the same height and line thickness as the minus. Horizontal-only scaling of a hyphen/dash/minus isn't so bad. \scaled[] worked perfectly, but it breaks inside a natural table with character alignment enabled. I have a commented example of this below. \getscaledglyph works in the table, but the vertical shrink is a non-starter. Here's an example: \edef\mathminus{\normalUchar"2212} \edef\smallminus{\getscaledglyph{0.33}{}{\normalUchar"2212}} \starttext This is my starting point: \bTABLE[aligncharacter=yes,alignmentcharacter={text->-}] \bTR \bTD \mathminus100-00+ \eTD \eTR \bTR \bTD 100-00 \eTD \eTR \bTR \bTD \mathminus 99-00+ \eTD \eTR \bTR \bTD \mathminus 99-00 \eTD \eTR \eTABLE % This table won't typeset: % % \bTABLE[aligncharacter=yes,alignmentcharacter={text->:}] % \bTR \bTD \mathminus100\scaled[sx=0.5,sy=1.0]{\mathminus}00:+ \eTD \eTR % \bTR \bTD 100\scaled[sx=0.5,sy=1.0]{\mathminus}00: \eTD \eTR % \bTR \bTD \mathminus 99\scaled[sx=0.5,sy=1.0]{\mathminus}00:+ \eTD \eTR % \bTR \bTD \mathminus 99\scaled[sx=0.5,sy=1.0]{\mathminus}00: \eTD \eTR % \eTABLE \stoptext But I came up with a solution that works. Rather than attempt to shrink the minus glyph, I define a new glyph that corrects the height of the hyphen-minus: \startluacode local function addsmallminus(tfmdata) local hchar= tfmdata.characters[0x002D] local mchar= tfmdata.characters[0x2212] tfmdata.characters[0xFE000] = { width= hchar.width, height = mchar.height, commands = { { "down", hchar.height-mchar.height }, { "char", 0x002D }, } } end fonts.constructors.newfeatures("otf").register { name= "smallminus", description = "small minus", manipulators = { base = addsmallminus, node = addsmallminus, } } \stopluacode \definefontfeature[default][default][smallminus=yes] \edef\smallminus{\normalUchar"FE000} \starttext \bTABLE[aligncharacter=yes,alignmentcharacter={text->\smallminus}] \bTR \bTD \mathminus100\smallminus00+ \eTD \eTR \bTR \bTD 100\smallminus00 \eTD \eTR \bTR \bTD \mathminus 99\smallminus00+ \eTD \eTR \bTR \bTD \mathminus 99\smallminus00 \eTD \eTR \eTABLE \stoptext So this looks good and works with any font. The only issue is fonts that use a different line thickness for the minus and hyphen-minus; this top-aligns the glyphs. Is there a way to make this glyph available in math-mode? I get a "?" when I try: \math{\smallminus} \math{\mathchar"FE000} Thanks for all your help! Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \getscaledglyph for width-only
> On Aug 17, 2016, at 5:45 PM, Hans Hagen wrote: > > On 8/17/2016 9:56 PM, Brian R. Landy wrote: >> Hi, I was wondering if there is a way to call \getscaledglyph to scale a >> glyph only horizontally, leaving the height untouched? Or maybe an >> alternate command? >> >> I can sort of accomplish this with (for example) >> \scale[sx=0.75,sy=1.0]{}{A}, but that encloses the glyph in an \hbox, >> which can be problematic. \getscaledglyph doesn't cause me any >> problems, except that it scales the height too. > > \starttext > > \definefontfeature[whatever][default][extend=2.5] > > \definedfont[Serif*whatever at 12pt] > > whatever > > \stoptext > Thank you. One thing that \getscaledglyph does it works agnostic to the currently selected font. For example: \starttext % This will print a sans “A” 1.5x larger than 12pt \switchtobodyfont[12pt,sans] \getscaledglyph{1.5}{}{A}\par % This will print a serif “A” 1.5x larger than 10pt \switchtobodyfont[10pt,serif] \getscaledglyph{1.5}{}{A}\par \stoptext I’m guessing there isn’t a way to use \definedfont in a similar fashion? Also, I noticed that \definedfont doesn’t seem to play nicely with \switchtobodyfont: \starttext \definefontfeature[whatever][default][extend=2.5] % This looks ok \switchtobodyfont[12pt,serif] {\definedfont[Serif*whatever at 12pt] what}ever\par % the “ever” is not printed properly, it overlaps itself \switchtobodyfont[10pt,serif] {\definedfont[Serif*whatever at 10pt] what}ever\par \stoptext Best, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \getscaledglyph for width-only
Hi, I was wondering if there is a way to call \getscaledglyph to scale a glyph only horizontally, leaving the height untouched? Or maybe an alternate command? I can sort of accomplish this with (for example) \scale[sx=0.75,sy=1.0]{}{A}, but that encloses the glyph in an \hbox, which can be problematic. \getscaledglyph doesn't cause me any problems, except that it scales the height too. Thanks! Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Using hyphen in math mode
Hi, I was wondering if there is a way to access the hyphen symbol (0x002D) while in math mode? I want to avoid the standard remapping to Unicode minus 0x2212. It would also be workable if I could select the math font without switching to math mode. The problem with an approach like \math{\text{-}} is that it switches the font back to the text font and does not use the math font. I.e, I'm trying to get the true hyphen symbol set in whatever font is currently defined for math mode. Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] copy/paste text broken with certain ligatures
On Sat, 16 Apr 2016, Hans Hagen wrote: On 4/15/2016 1:31 PM, Ulrike Fischer wrote: Am Fri, 15 Apr 2016 00:24:26 +0200 schrieb Hans Hagen: On 4/14/2016 3:47 PM, Brian R. Landy wrote: Hi, sometime between version 2015.08.05 and 2016.04.10 the handling of certain ligatures changed (sorry, I don't have intermediate versions to test with). The issue is the ligatures no longer copy/paste as the original two characters, which also breaks text searched of the pdf. Instead they copy as a single glyph. I'm seeing the problem with "ti" and "fj", while others like "ffi", "fi", and "ff" are fine in both versions. not all pdf viewers can do that well, unless it's broken, context outputs the tounicode vectors needed for it I can't copy the two ligatures either (in Adobe Reader DC), but with the equivalent latex example (TL2016 pretest) it works fine. So imho it is not a viewer problem. i looked into it and it's two things combined ... (1) when we explicitly pass tounicodes luatex mistakenly falls back to the index (a next release repairs this) (2) this happens here because calibri lacks the information (no names to deduce ligature from) .. so, i now have some extra heuristics in the font loader that get them from the gsub features Thank you Hans, this worked perfectly. I appreciate your help with this! (and thanks, too, for fixing the dash issue I raised recently). Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] copy/paste text broken with certain ligatures
> On Apr 14, 2016, at 6:24 PM, Hans Hagen wrote: > >> On 4/14/2016 3:47 PM, Brian R. Landy wrote: >> Hi, sometime between version 2015.08.05 and 2016.04.10 the handling of >> certain ligatures changed (sorry, I don't have intermediate versions to >> test with). The issue is the ligatures no longer copy/paste as the >> original two characters, which also breaks text searched of the pdf. >> Instead they copy as a single glyph. >> >> I'm seeing the problem with "ti" and "fj", while others like "ffi", >> "fi", and "ff" are fine in both versions. >> >> I see this using Calibri (other fonts I tried don't support those two >> ligatures): >> >> \starttypescript[cleartype] >> \definetypeface[\typescriptone][ss][sans][calibri][default] >> \stoptypescript >> \usetypescript[cleartype] >> \setupbodyfont[cleartype,sans,10pt] >> \starttext >> ffi\par >> fi\par >> ff\par >> fi\par >> ti\par >> fj\par >> \stoptext >> >> Thank you. > > not all pdf viewers can do that well, unless it's broken, context outputs the > tounicode vectors needed for it > > Hans But Acrobat works fine with the pdf generated by the older version of ConTeXt, which also uses the ligatures. So something must be different about the files generated by the two versions? I can post examples tomorrow if you'd like. Thanks, Brian > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] copy/paste text broken with certain ligatures
Hi, sometime between version 2015.08.05 and 2016.04.10 the handling of certain ligatures changed (sorry, I don't have intermediate versions to test with). The issue is the ligatures no longer copy/paste as the original two characters, which also breaks text searched of the pdf. Instead they copy as a single glyph. I'm seeing the problem with "ti" and "fj", while others like "ffi", "fi", and "ff" are fine in both versions. I see this using Calibri (other fonts I tried don't support those two ligatures): \starttypescript[cleartype] \definetypeface[\typescriptone][ss][sans][calibri][default] \stoptypescript \usetypescript[cleartype] \setupbodyfont[cleartype,sans,10pt] \starttext ffi\par fi\par ff\par fi\par ti\par fj\par \stoptext Thank you. Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] breakpoints & dashes in recent betas
Hi, I noticed this behavior today (on 2016.03.13 and 2016.04.01): \starttext em-dash: 50---70\par em-dash: discussion---largest\par \setbreakpoints[compound] 3 hyphens: 50---70\par 1 hyphen and 1 en-dash: discussion---largest\par \stoptext After \setbreakpoints -- and --- are no longer interpreted properly. Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] footnotes spanning margin and textwidth
Hi, is it possible to get the footnote area to span the full width of textwidth+margins? For example, in this layout I have a wide left margin and I’d like the footnotes to start at the left edge of the left margin rather than the left edge of the text area, but still extend to the right edge of the text area. \setuplayout[backspace=2.75in,cutspace=0.50in,leftmargin=2.25in,rightmargin=0.00in,width=middle,topspace=0.0in,header=0.88in,height=middle,footer=1.50in,location=middle] \starttext text\footnote{one} text\footnote{\input knuth} \stoptext Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bug with definefloat and caption case
When I setup a custom float with \definefloat[exhibit][exhibits], the word "Exhibit" in the caption is printed with the first letter uppercased for the first 32 exhibits. However, starting with the 33rd exhibit, the first letter uppercase is lost. For example: \definefloat[exhibit][exhibits] \starttext \dorecurse{45}{\placeexhibit[here][fig:test\recurselevel]{title\recurselevel}{content\recurselevel}} \stoptext yields exhibits with these titles: ... Exhibit 31 Exhibit 32 exhibit 33 exhibit 34 ... This doesn't happen with the built-in types because they have entries in lang-txt.lua. I am using 2015.08.05. I wasn't Best regards, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] caption alignment with floats in the margin
Hi, I am trying to place some floats in the margin and noticed that the caption gets centered instead of following my specification to flushleft. If the float is in the main body it is ok. . I have a small example below. I tested with 2015.04.18 14:41. Is there a way to fix the alignment? Thanks, Brian \setuppapersize[letter,portrait][letter,portrait] \setupcaption[figure][location=top,align={flushleft}] \showframe \starttext \setuplayout[backspace=2.75in,leftmargin=2.25in,rightmargin=0.5in,cutspace=0.5in,location=middle,width=middle,margindistance=0.00in] \placefigure[inleft,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}} \placefigure[here,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}} \placefigure[inright,hanging]{My Title}{\framed[width=2.75in,height=1.0in]{!}} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Character alignment in math mode
On Wed, 25 Jun 2014, Wolfgang Schuster wrote: Am 25.06.2014 um 23:20 schrieb Brian R. Landy : Out of curiosity, how do you do that (i.e., revert back to lining, and tabular, figures in a table, or even in running text)? For example, if I do this: \starttext \bf 12345\par \tf 12345\par \stoptext the first line is bold but the second is not. But if I do the same with \os: \starttext \os 12345\par \tf 12345\par \stoptext both lines use old style numbers. Is there a way to switch the current font back to lining figures without reloading the font with \switchtobodyfont or something similar? The \os command enables oldstyle figures in your font and the setting isn’t reset when you switch to a different font alternative. \definefontfeature[f:lnum][lnum=yes] \definefontfeature[f:onum][onum=yes] \definefontfeature[f:tnum][tnum=yes,pnum=no] \definefontfeature[f:pnum][pnum=yes,tnum=no] \setupbodyfont[antykwa-poltawskiego] \starttext \starttabulate \NC onum\NC \feature[+][f:onum] 1234567890 \NC\NR \NC onum + tnum \NC \feature[+][f:onum]\feature[+][f:tnum]1234567890 \NC\NR \NC onum + pnum \NC \feature[+][f:onum]\feature[+][f:pnum]1234567890 \NC\NR \TB \NC lnum\NC \feature[+][f:lnum] 1234567890 \NC\NR \NC lnum + tnum \NC \feature[+][f:lnum]\feature[+][f:tnum]1234567890 \NC\NR \NC lnum + pnum \NC \feature[+][f:lnum]\feature[+][f:pnum]1234567890 \NC\NR \stoptabulate \stoptext Wolfgang This was exactly what I needed, thank you! Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] latest beta, problem with natural tables and alignment character
On Tue, 17 Jun 2014, Hans Hagen wrote: anyhow, i made it work a bit better with tables (extra pass needed) \starttext \enabletrackers[typesetters.characteralign] \bgroup \setupTABLE[column][1][aligncharacter=yes,alignmentcharacter={,}] \bTABLE \bTR \bTD 1,2 \eTD \bTD 1,2 \eTD \bTD xxx \eTD \eTR \bTR \bTD - 1,2 \eTD \bTD -1,2 \eTD \bTD xxx \eTD \eTR \bTR \bTD -1,2 \eTD \bTD -1,2 \eTD \bTD xxx \eTD \eTR \bTR \bTD 11,2 \eTD \bTD 11,2 \eTD \bTD xxx \eTD \eTR \bTR \bTD 11,224 \eTD \bTD 11,22 \eTD \bTD xxx \eTD \eTR \eTABLE \egroup \bgroup \setupTABLE[column][1][aligncharacter=yes,alignmentcharacter={-}] \setupTABLE[column][2][aligncharacter=yes,alignmentcharacter={\endash}] \bTABLE \bTR \bTD 1-2\eTD \bTD 1\endash2\eTD\bTD xxx \eTD \eTR \bTR \bTD 1-2\eTD \bTD 1\endash2\eTD\bTD xxx \eTD \eTR \bTR \bTD 1-2\eTD \bTD 1\endash2\eTD\bTD xxx \eTD \eTR \bTR \bTD 11-2\eTD \bTD 11\endash2\eTD\bTD xxx \eTD \eTR \bTR \bTD 11-22 + \eTD \bTD 11\endash22 + \eTD\bTD xxx \eTD \eTR \eTABLE \egroup \stoptext the next beta can handle this When you say "next beta" do you mean a subsequent minimals release (i.e., this fix should be the 2014.06.22 release)? Or do you mean a new beta that you announce more formally on the list? I'm not sure what I should look for before I test again, so I don't end up testing a version without the fix. Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Character alignment in math mode
On Wed, 25 Jun 2014, Wolfgang Schuster wrote: Am 24.06.2014 um 21:46 schrieb Maggyero : why use math here? It was to avoid oldstyle figures that I use by default. But finally it's better to use oldstyle figures even in tables. You can enable lining (and tabular) figures in the table when you don’t want oldstyle figures. Out of curiosity, how do you do that (i.e., revert back to lining, and tabular, figures in a table, or even in running text)? For example, if I do this: \starttext \bf 12345\par \tf 12345\par \stoptext the first line is bold but the second is not. But if I do the same with \os: \starttext \os 12345\par \tf 12345\par \stoptext both lines use old style numbers. Is there a way to switch the current font back to lining figures without reloading the font with \switchtobodyfont or something similar? Thanks, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Luatex crash with x86-64 Linux binary
Hi, I am running the latest minimals on a 64bit Linux system and ran into a luatex crash with a specific file. I reduced the file down to a simpler version that still triggers the crash, and thought it would be of some interest to post (the resulting pdf, if generated, will be ugly since I removed a lot of formatting, and some of the code in the file may appear extraneous). I am running: $ context --version mtx-context | ConTeXt Process Management 0.60 mtx-context | current version: 2012.09.06 23:03 $ luatex --version This is LuaTeX, Version beta-0.70.2-2012052410 (TeX Live 2012) What I think makes this interesting is the same file does not crash on three other setups I tested: - 32bit OS X (beta-0.70.2-2012052310) - 64bit OS X (beta-0.70.2-2012052309) - the same Linux system, but I replaced the 64bit Linux luatex binary with the 32bit Linux binary (beta-0.70.1-2012052416 (rev 4277), I see this is an older version but I downloaded directly from the minimals site today). It rebuilt caches and processed the file successfully. I updated minimals on both OS X systems today so all three systems should be otherwise identically configured. Various alterations to the file can avoid the crash; a few I found are---adding a \strut before the word jumbo, removing the nested bTABLE (this appears to be unneeded in the attached example), removing the \definefontfeature statement at the top of the file. Anyway I'd be interested to know if anyone else sees the same issue. I'm sure this is a real edge case error but hope it is helpful to track down the problem. Please let me know if there is any other debugging info you would like to see from my end. Thanks, Brian\definefontfeature [default] [default] [kern=yes, liga=yes, texligatures=yes, texquotes=yes, protrusion=pure, expansion=quality, mode=node, script=latn]% \setupbodyfont[modern,10pt]% \starttext% \start% \bTABLE[offset=overlay,frame=off,align=middle,aligncharacter=no]% \bTR% \bTD[]{% \start% \setupTABLE[r][5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,4,3,2][loffset=0.020in]% \setupTABLE[r][5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,4,3,2][roffset=0.020in]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][4][bottomframe=on]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][4,3,2][align={middle,low},aligncharacter=no]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][1,4,3,2][style={\switchtobodyfont[modern,rm]\bf}]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][20][align={flushleft,lohi},aligncharacter=no,style={\small}]% \setupTABLE[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][1][align={middle,lohi},aligncharacter=no]% \setupTABLE[r][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off]% \setupTABLE[r][2][topframe=on]% \setupTABLE[r][4][bottomframe=on]% \setupTABLE[r][19][bottomframe=on]% \setupTABLE[23][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][rightframe=on]% \setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on]% \setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]% \setupTABLE[1][2][topframe=on]% \setupTABLE[1][5,19][topframe=on,bottomframe=on]% \setupTABLE[1][19][bottomframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]% \setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on,rightframe=on]% \setupTABLE[1][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]% \setupTABLE[1][2][topframe=on]% \setupTABLE[1][5,19][topframe=on,bottomframe=on]% \setupTABLE[1][19][bottomframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]% \setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on]% \setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]% \setupTABLE[2][2][topframe=on]% \setupTABLE[2][5,19][topframe=on,bottomframe=on]% \setupTABLE[2][19][bottomframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][5][topframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23][19,19][bottomframe=on]% \setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][leftframe=on,rightframe=on]% \setupTABLE[2][4,3,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19][frame=off,leftframe=on,rightframe=on,aligncharacter=no]% \setupTABLE[2][2][topframe=on]% \setupTABLE[2][5,19][topframe=on,bottomframe=on]% \setupTABLE[2][19][bottomframe=on]% \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2
Re: [NTG-context] two problems with natural tables
This worked perfectly, thanks! Brian On Jan 18, 2012, at 3:47 AM, Hans Hagen wrote: > On 18-1-2012 05:19, Brian Landy wrote: >> Hi, sorry to dredge up such an old thread, but I recently updated from a Feb >> 2010 vintage minimals to current (first to 1/12/2012, then to today 1/17). >> I ran into problems splitting a table within a splitfloat. I search the >> list archives and came up with this example, which is failing for me. >> >> \starttext >> \placetable[split]{Test} >> {\bTABLE[split=yes] >> \dorecurse{60}{ >> \bTR \bTD hello \eTD \eTR >> } >> \eTABLE} >> \stoptext > >> \c!suffixstopper > > In your cont-new.mkiv file, add (after \unprotect) > > \def\c!suffixstopper{suffixstopper} > > I wonder why it show up now ... either I lost some definition or it suddenly > started working > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] parsing issue with \math{} inside natural table
Thanks for the reply. I'm actually generating TeX from an application that interprets $ in it's own code and occasionally this causes me trouble in passing the $ through to TeX to use in math mode (I think they have a bug and am hoping I can get that fixed). So I tend to use \math{} to avoid complications with escaping $, but was stuck in this case because I couldn't use $ or \math{}. Anyway, I just now solved my problem in the other application and am able pass through $ appropriately so it's no longer an issue for me. Thanks, Brian On Mon, 12 Jul 2010, Hans Hagen wrote: On 9-7-2010 10:12, Brian R. Landy wrote: Hi, I ran into a case where a natural table has an issue when it contains inline math and an alignment character is used. Here's a small example which triggers the problem: \starttext< \bTABLE< \bTABLEbody< \bTR< \bTD[alignmentcharacter={.},aligncharacter=yes]{\le 4.0\math{-}}\eTD< \eTR< \eTABLEbody< \eTABLE< \stoptext< However, if I replace \math{-} with $-$, the file works. Am I correct that $-$ and \math{-} should be interchangeable? side effect of alignmentcharacter that triggers expansion of cell content, so just use $ here - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] parsing issue with \math{} inside natural table
Hi, I ran into a case where a natural table has an issue when it contains inline math and an alignment character is used. Here's a small example which triggers the problem: \starttext< \bTABLE< \bTABLEbody< \bTR< \bTD[alignmentcharacter={.},aligncharacter=yes]{\le 4.0\math{-}}\eTD< \eTR< \eTABLEbody< \eTABLE< \stoptext< However, if I replace \math{-} with $-$, the file works. Am I correct that $-$ and \math{-} should be interchangeable? Thanks, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Helvetica Neue and Snow Leopard
Sorry for the long delay in replying. mtxrun doesn't seem to find the fonts when I put them under my TeX tree. I tried a few different places. If I place them in ~/Library/Fonts, it does use them, although the System ttc file overrides my local dfont. Is there something else I need to do to add them in the main Tex tree (using minimals)? I'm rerunning mtxrun, of course. Per your other message (for your interest), I've attached the list of the other Helvetica fonts I have. Best regards, Brian Quoting Wolfgang Schuster : Am 01.09.2009 um 05:22 schrieb Brian R. Landy: Is there a location that I could put the dfont file (and I also have access to HelveticaNeue in a set of otf files) that would override ConTeXt locating Apple's ttc, but not be visible to OS X? Till ttc-fonts are fixed you can take the dfont-files from leopard and save them in your TeX directory, ConTeXt will use these fonts first and you get the correct output in MkIV. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ helveticaneueblackHelveticaNeue-Black /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-Black.otf helveticaneueblackcondHelveticaNeue-BlackCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackCond.otf helveticaneueblackcondensed HelveticaNeue-BlackCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackCond.otf helveticaneueblackcondobl HelveticaNeue-BlackCondObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackCondObl.otf helveticaneueblackext HelveticaNeue-BlackExt /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackExt.otf helveticaneueblackextobl HelveticaNeue-BlackExtObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackExtObl.otf helveticaneueblackitalic HelveticaNeue-BlackItalic /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BlackItalic.otf helveticaneueboldcond HelveticaNeue-BoldCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldCond.otf helveticaneueboldcondensedHelveticaNeue-BoldCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldCond.otf helveticaneueboldcondobl HelveticaNeue-BoldCondObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldCondObl.otf helveticaneueboldext HelveticaNeue-BoldExt /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldExt.otf helveticaneueboldextobl HelveticaNeue-BoldExtObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldExtObl.otf helveticaneuebolditalicotfHelveticaNeue-BoldItalicotf /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldItalic.otf helveticaneueboldotf HelveticaNeue-Boldotf /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-Bold.otf helveticaneueboldoutline HelveticaNeue-BoldOutline /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-BoldOutline.otf helveticaneuecondensedHelveticaNeue-Condensed /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-Condensed.otf helveticaneuecondensedobl HelveticaNeue-CondensedObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-CondensedObl.otf helveticaneueextblackcond HelveticaNeue-ExtBlackCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-ExtBlackCond.otf helveticaneueextblackcondensedHelveticaNeue-ExtBlackCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-ExtBlackCond.otf helveticaneueextblackcondobl HelveticaNeue-ExtBlackCondObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-ExtBlkCondObl.otf helveticaneueextended HelveticaNeue-Extended /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-Extended.otf helveticaneueextendedobl HelveticaNeue-ExtendedObl /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-ExtendedObl.otf helveticaneueheavyHelveticaNeue-Heavy /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-Heavy.otf helveticaneueheavycondHelveticaNeue-HeavyCond /Users/brlandy/Library/Fonts/myhelvetica/HelveticaNeue-HeavyCond.otf helveticaneueheavycondensed HelveticaNeue-HeavyCond /Users/brlandy/Libra
Re: [NTG-context] Helvetica Neue and Snow Leopard
On Aug 31, 2009, at 4:53 PM, Wolfgang Schuster wrote: Am 31.08.2009 um 06:37 schrieb Brian R. Landy: Hi, I've run into a problem using Helvetica Neue on a Mac under Snow Leopard. The font is provided by Apple and was a dfont package on 10.5, now it is a ttc. What should we say, LuaTeX gets dfont support and Apple convert most of their fonts from dfont to ttc. At least they left a few around so it wasn't completely wasted effort :) I am getting garbled and funny text using it. It seems to be a problem with ttc-fonts in ConTeXt (unrelated to typescripts), here is a shorter example: \starttext \char65 {\definedfont[name:helveticaneue]\char65} \stoptext Is there a location that I could put the dfont file (and I also have access to HelveticaNeue in a set of otf files) that would override ConTeXt locating Apple's ttc, but not be visible to OS X? Thanks, Brian Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Helvetica Neue and Snow Leopard
Hi, I've run into a problem using Helvetica Neue on a Mac under Snow Leopard. The font is provided by Apple and was a dfont package on 10.5, now it is a ttc. I am getting garbled and funny text using it. An example is -- \usetypescriptfile[type-mac] \usetypescript[helvetica-neue] \setupbodyfont[helvetica-neue,sans,10pt] \starttext {\bf Hello World, 1234567890\par} {Hello World, 1234567890\par} \stoptext I am attaching pdfs that show the correct (from Leopard) and incorrect output. Both systems are running ConTeXt 2009.08.19 (actually I just updated to 2009.08.30 with no help, this is using minimals) and LuaTeX beta-0.43.0-2009081811. The bold font gets the letters correct but it looks terrible; normal sans text is completely garbled. I have reloaded my font database but it didn't help. Thanks, Brian bad.pdf Description: Adobe PDF document good.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] MkIV issue with normal italics text in math mode
Hi, I've run across what I believe to be a bug in MkIV -- I am unable to access non-math italics from within math mode. A simple example is -- \starttext \math{\text{\it Hello, World}} \stoptext This works in MkII. Or perhaps there some other way I'm supposed to code this? Thanks, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] math typesetting problem in MKIV
Thanks Taco, that worked just fine for me. Best regards, Brian On Aug 17, 2009, at 2:13 PM, Taco Hoekwater wrote: Hi, Taco Hoekwater wrote: Brian R. Landy wrote: Hi, I have a small equation I am attempting to typeset. Using MKII it comes out fine, but under MKIV the text "non-perf. bal." is not typeset correctly (non-perf is instead nonperf with the dash under the 'p', and extra space appears after 'bal.') It could be an engine problem in the handling of \mathchoice, I am checking it out. A slightly smaller erroneous file is: \starttext \math {(\text{non\discretionary{-}{}{-}perf.})\over1} \stoptext more later. Properly fixing this could take me a while, so let me propose a workaround for the time being. Add this to your preamble and you should have proper output again: \unexpanded\def\mathchoice#1#2#3#4% {{\ifcase\mathstyle #1\or#1\or#2\or#2\or#3\or#3\or#4\or#4\fi }} Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] math typesetting problem in MKIV
Hi, I have a small equation I am attempting to typeset. Using MKII it comes out fine, but under MKIV the text "non-perf. bal." is not typeset correctly (non-perf is instead nonperf with the dash under the 'p', and extra space appears after 'bal.') \starttext \math{\text{adjusted smm}={{(\text{vTr}+\alpha\times\text{sTr})\times(\text{perf. scheduled bal.})+\text{iTr}\times(\text{non||perf. bal.})}\over\text{balance}}} \stoptext I just updated minimals to ConTeXt 2009.08.17 10:43 and LuaTeX beta-0.42.0-2009071723 and still see the issue. Thanks, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] problem with layers and line spacing
Aha. When I'm not using \startsetup...\stopsetups things are more forgiving; once those are in place things became a little more strict in two regards -- - The \switchtobodyfont (or, more technically accurate, the \setupinterlinespace) must be inside of the \framed. I had tried it both ways and had never seen the difference because of... - Not terminating the final line with \par. If my case had required three lines I would have seen the issue, because the first two lines would have had the proper spacing under one of my tests.. Interestingly if I nest more \frameds, each one needs it's own \setupinterlinespace. One more interesting point, in case this helps anyone out, is I find that the behavior also changes if \framed has an offset vs. offset=overlay or offset=none. To get the proper line spacing when there is an offset you need to \switchtobodyfont both inside and before \framed. With offset=overlay or offset=none, it is only necessary to \switchtobodyfont inside \framed. I found that using style={\switchtobodyfont} was ignored in this case, but Wolfgang's suggestion (in another email) of creating a separate \startsetups/\stopsetups block and passing it via setups= to \framed worked perfectly. Hans, Wolfgang -- thanks for your help! Brian Quoting Hans Hagen : Brian R. Landy wrote: Understood, but actually it is obeying the 12pt switchtobodyfont for the interline spacing in the backgrounds. It is not using either the layer's switchtobodyfont, which I think should be correct behavior, nor is it obeying the setupbodyfont. Note that the font size is correct, it is the interline spacing that is incorrect. sure, it depends a bit how it's set up ... \setlayer is kind of immediate (so there the current settinsg apply) while the flushing happens under global bodyfont control; if one uses setups and fills the layer delayed (as part of setupheadertexts) it's delayed as setup*texts is delayed keep in mind that tex only sets interlinespace when \par is issued so { [set spacing] [text] } { [set spacing] [text] \par } are different things btw, often the easiest way to set a bodyfont in for instance layers is: \setlayerframed[...][...][style={\switchtobodyfont}] turning the frame on then also helps tracking down problems concerning your problem, experiment a bit with adding \par and so otherwise add some \setupinterlinespace (no argument) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] problem with layers and line spacing
Understood, but actually it is obeying the 12pt switchtobodyfont for the interline spacing in the backgrounds. It is not using either the layer's switchtobodyfont, which I think should be correct behavior, nor is it obeying the setupbodyfont. Note that the font size is correct, it is the interline spacing that is incorrect. Thanks, Brian On Aug 11, 2009, at 6:11 PM, Hans Hagen wrote: Brian R. Landy wrote: Hi, I am attempting to do some work with layers that can repeat (and update) using \startsetups & \stopsetups. However I find that the line spacing in a \framed in the layers is not alterable and instead tracks the font size on the page. I'm attaching a simple example (it shows the same issue under MKII and MKIV, although the \vbox{} example does not work under MKII). If you remove the \startsetups and \stopsetups the line spacing works like it should. While they are used, the line spacing in the layer's \framed tracks the setting in \switchtobodyfont[12pt]. It does not track to either 6pt or 8pt. And I can't find a way to reset the spacing (I tried adding in a \setupinterlinespace[reset]). Am I doing something wrong? I've tried with MKIV 2009.06.03 and 2009.08.07, and MKII at contextgarden. Thanks! Brian \setupbodyfont[8pt]% \starttext \definelayer[RCheaderleft][preset=lefttop,width=\paperwidth, height= \paperheight]% \definelayer[RCheaderright][preset=lefttop,width=\paperwidth, height=\paperheight]% \startsetups[RClayers]% \setlayer[RCheaderleft][hoffset=\backspace,voffset=\topspace]{\vbox {Line 1\\ Line 2}}% \setlayer[RCheaderright][hoffset=\backspace,voffset=\topspace] {\switchtobodyfont[6pt]\framed[align= {middle,flushright},width=broad]{Line 1\\ Line 2}}% \stopsetups \setupbackgrounds[page][setups=RClayers,background= {RCheaderleft,RCheaderright}]% \switchtobodyfont[12pt] \dorecurse{250}{test\par} \stoptext there is a difference between: \setupbodyfont : global usage, document wide \switchtobodyfont : local usage, does not affect the header, footer etc so, when the backgrounds are constructed, the 8pt is in charge Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] problem with layers and line spacing
Hi, I am attempting to do some work with layers that can repeat (and update) using \startsetups & \stopsetups. However I find that the line spacing in a \framed in the layers is not alterable and instead tracks the font size on the page. I'm attaching a simple example (it shows the same issue under MKII and MKIV, although the \vbox{} example does not work under MKII). If you remove the \startsetups and \stopsetups the line spacing works like it should. While they are used, the line spacing in the layer's \framed tracks the setting in \switchtobodyfont[12pt]. It does not track to either 6pt or 8pt. And I can't find a way to reset the spacing (I tried adding in a \setupinterlinespace[reset]). Am I doing something wrong? I've tried with MKIV 2009.06.03 and 2009.08.07, and MKII at contextgarden. Thanks! Brian \setupbodyfont[8pt]% \starttext \definelayer[RCheaderleft][preset=lefttop,width=\paperwidth, height=\paperheight]% \definelayer[RCheaderright][preset=lefttop,width=\paperwidth, height=\paperheight]% \startsetups[RClayers]% \setlayer[RCheaderleft][hoffset=\backspace,voffset=\topspace]{\vbox{Line 1\\ Line 2}}% \setlayer[RCheaderright][hoffset=\backspace,voffset=\topspace] {\switchtobodyfont[6pt]\framed[align={middle,flushright},width=broad]{Line 1\\ Line 2}}% \stopsetups \setupbackgrounds[page][setups=RClayers,background={RCheaderleft,RCheaderright}]% \switchtobodyfont[12pt] \dorecurse{250}{test\par} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Context & TeXLive 2008
Hi, I wanted to share some observations from enabling the latest MkIV code (2008.09.24, compiled luatex from svn just now) to run on a new installation of TeXLive 2008 on 64bit Linux. This is my first time trying MkIV. First -- a comment on installing using TeXLive 2008, which hopefully is helpful to others. In my installation I noticed that x86-64/bin/luatools was symlinked to texmf-dist/scripts/context/stubs/unix/luatools. The rsync update process as outlined on garden does not update this file; it updates texmf-dist/scripts/context/lua/luatools.lua. So this needs to be copied (or linked) over to make the update work. The same issues exists with mtxrun. The symptom was a broken "context --make". Now, on to my issues. I am listing anything that used to work in my TeXLive 2007 installation of MkII but fails in 2008 (MkII or MkIV). Items 1-3 were tested on garden as well to ensure it was not an issue in my setup -- 1. \placefloat[here]{none} fails. \placegraphic works instead. This works on MkII. See test_placefloat.tex. 2. MkIV fails due to the \startcolor...\stopcolor sequence embedded in a natural table (see test_color.tex). A working alternative is commented in that file. 3. MkIV will not typeset the file test.tex. It is due to using {style=\switchtobodyfont[tt]} in the table setup. Using [modern,tt] works fine, but this is not necessary with MkII. 4. This is a MkII issue (or maybe it is a pdftex problem?) MkII on 2007, texexec --dvi on 2008, and MkIV all work. The problem is with pulling in an external figure like this -- \externalfigure[/tmp/testfigure] The files /tmp/testfigure.eps and /tmp/testfigure.pdf exist. This should use the full path to find the file, and will pick the eps when creating dvi and the pdf when creating pdf's. As mentioned, this works with every combination I tested except 2008 MkII. Some (not very usable for me) workarounds are -- - use the filename without the path and add the path using \setupexternalfigures[directory=] - specify the .pdf extension (means I cannot typeset to dvi if I want to; I find this useful for previewing with xdvi's auto-reload) - use \setupexternalfigures[directory=/] and use a relative path 5. Just a comment on performance -- I noticed that using MkIV on a complicated document I have took 23 minutes vs. 12 minutes with MkII. I didn't know if MkIV is expected to be slower/comparable/faster at this stage. Anyway, I hope this is useful to other users and to the developers. Best Regards, Brian\starttext \placefloat[here]{none}{test} \stoptext \usetypescript[modern][ec] \setupcolors[state=start]% \definecolor[clear][y=1,t=0,a=1]% \setupbodyfont[modern,10pt] \starttext% \start% \setupTABLE[1][1,2,3][aligncharacter=yes,alignmentcharacter={/}]% \bTABLE% \bTABLEbody \bTR% \bTD{4 \startcolor[clear] 0/8\stopcolor}\eTD% % the below line works %\bTD{9 \color[clear] 0/8}\eTD% \eTR% \bTR% \bTD{9 1/8}\eTD% \eTR% \bTR% \bTD{9 1/4}\eTD% \eTR% \eTABLEbody% \eTABLE% \stop% \stoptext% \setupbodyfont[7pt]% \starttext% \bTABLE[left=\setupinterlinespace,strut=yes,autostrut=no,frame=off,headstyle=bold,align={middle,lohi},alignmentcharacter={.},aligncharacter=yes,background=color,backgroundcolor=screen,option=stretch,aligncharacter=no,style={\switchtobodyfont[tt]},frame=off]% \chardef\characteralignmentmode=2% \bTABLEhead% \bTR% \bTH[nc=22]{\setupinterlinespace\strut}{\strut}\eTH% \eTR% \bTR% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{}\eTH% \bTH[]{\setupinterlinespace\strut}{Price}\eTH% \bTH[nc=2]{\setupinterlinespace\strut}{\Delta Price}\eTH% \bTH[]{\setupinterlinespace\strut}{Yield}\eTH% \bTH[nc=2]{\setupinterlinespace\strut}{\Delta Yield (bps)}\eTH% \bTH[nc=5]{\setupinterlinespace\strut}{Historical Levels}\eTH% \bTH[nc=3]{\setupinterlinespace\strut}{Average}\eTH% \eTR% \bTR% \bTH[]{\setupinterlinespace\strut}{Term}\eTH% \bTH[]{\setupinterlinespace\strut}{Cpn}\eTH% \bTH[]{\setupinterlinespace\strut}{Mat}\eTH% \bTH[]{\setupinterlinespace\strut}{Dur}\eTH% \bTH[]{\setupinterlinespace\strut}{\$ Dur}\eTH% \bTH[]{\setupinterlinespace\strut}{\#}\eTH% \bTH[]{\setupinterlinespace\strut}{*}\eTH% \bTH[]{\setupinterlinespace\strut}{Cx}\eTH% \bTH[]{\setupinterlinespace\strut}{9/10}\eTH% \bTH[]{\setupinterlinespace\strut}{1d}\eTH% \bTH[]{\setupinterlinespace\strut}{5d}\eTH% \bTH[]{\setupinterlinespace\strut}{9/10}\eTH% \bTH[]{\setupinterlinespace\strut}{1d}\eTH% \bTH[]{\setupinterlinespace\strut}{5d}\eTH% \bTH[]{\setupinterlinespace\strut}{9/9}\eTH% \bTH[]{\setupinterlinespace\strut}{9/8}\eTH% \bTH[]{\setupinterlinespace\strut}{9/5}\eTH% \bTH[]{\setupinterlinespace\strut}{9/4}\eTH% \bTH[]{\setupinterlinespace\s
[NTG-context] Natural Tables, backgroundcolor, and frames
Hi, I actually posted this last summer, but never got a reply and did not have a chance to follow up. When using natural tables, a cell with backgroundcolor enabled will overwrite the topframe/rightframe from the cell to the left/above. A workaround could be to always use topframe/leftframe. However this workaround is not possible with tables with split=repeat that span multiple pages, since you cannot know which rows on pages beyond the first for which you should set topframe=on. The below code demonstrates the problem for color w/ bottomframe specified for the header -- \setupcolors[state=start] \definecolor[ice][r=0.867, g=0.945, b=0.973, s=0.9] \starttext \bTABLE[split=repeat,frame=off,background=color] \bTABLEhead \bTR[bottomframe=on] \bTH A \eTH \bTH B \eTH \eTR \eTABLEhead \bTABLEbody \dorecurse{25}{\bTR[backgroundcolor=ice] \bTD a \eTD \bTD b \eTD \eTR \bTR \bTD a \eTD \bTD b \eTD \eTR} eTABLEbody \eTABLE \stoptext I tested this at http://live.contextgarden.net. Does anyone have a solution? One thought I had was to insert a very thin row (with height set to rulethickness) at the bottom of the header, but with split=repeat it appears that the table forces a minimum height to a row, so it is too tall. Thanks, Brian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] factor=fit images don't fit
Hi, What version of ConTeXt are you using? I just noticed a difference a few days ago between the version installed by TeXLive 2007 and the April 2007 release (tested locally & through contextgarden) placing an image into a natural table, using factor=max. I'll post an example in a separate thread shortly. Regards, Brian On Jul 20, 2007, at 7:05 AM, Giuseppe Bilotta wrote: > Friday, July 20, 2007 Giuseppe Bilotta wrote: > >> Hello all, > >> I have to place a number of images into some given-size >> frames in a layer. The images should be scaled >> proportionally to fit into the frame. The code I'm working >> with is: > >> \defineframed[framedimg][ >> frame=on,framecolor=elux, >> background=color, >> backgroundcolor=white, >> width=\wdfig, >> height=\htfigone, >> offset=overlay, >> ] > >> \setlayer[figs][voffset=\nextfigvoff]{% >> \framedimg{% >> \externalfigure[#1][ >> factor=fit, >> % maxwidth=\wdfig, >> % maxheight=\htfigone, >> % frame=on, >> ]% >> }% >> }% > >> where \wdfig, \htfigone are the frame size and \nextfigvoff >> is the vertical offset which must be placed. I've tried >> factor=fit, factor=max, but in both cases I get images which >> cross the boundaries of the frame, mostly in the horizontal >> direction. If I add the maxwidth/maxheight specification, >> images don't get scaled at all. > >> I would expect factor=fit to scale the image in such a way >> that the biggest direction fits into the enclosing box, >> while factor=max would scale the image in such a way that >> the smallest direction fits into the enclosing box. Instead, >> in both cases the vertical direction is being fitted, with >> no apparent consideration for the horizontal direction. > >> What am I doing wrong and what should I do to fix it? > > Ok, I've tried studying the source and I really think that > the way factor scaling is computed is wrong. However, the > fix is nontrivial, and a somewhat thorough checking should > be implemented, with earlier check for the factor value > (fit, max, broad), since the logic selecting which dimension > to scale depends on the kind of scaling. > > Anyway, I've found a temporary solutin to my problem by > using a very large value of scale=, coupled with appropriate > maxwidth and maxheight values. > > -- > Giuseppe "Oblomov" Bilotta > > __ > _ > If your question is of interest to others as well, please add an > entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ > ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > __ > _ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Vertical text alignment in nested natural tables
I had played around with strut=yes, but had not realized I also needed to set autostrut=no. That approach ended up working best; my initial solution broke aligncharacter, and I like the table environment to reset. It is a bit odd that it resets to something different than the default. As an aside, what books are good for learning TeX programming for ConTeXt? Anything besides the TeXBook (and I saw TeX by Topic mentioned on the list the other day). Thanks again, Brian On Mar 29, 2007, at 4:34 AM, Wolfgang Schuster wrote: 2007/3/28, Brian R. Landy <[EMAIL PROTECTED]>: Hi, I am having a problem using nested natural tables, to which I have a solution but feel that it my not be the proper approach. I'm pretty much a TeX and ConTeXt novice. The problem is that the row height it reduced when a table is nested, breaking vertical text alignment across cells. In my example the cells "S" and "Swap" to not align vertically due to the presence of the "p". I have an example of the problem and my fix below. I'm curious if someone knows a better way to fix this. Thanks for your help, Brian Hi Brian, I will show a few solution to your problem for the following table. We will start with a simple table that contains the error. \starttext \bTABLE \bTR \bTD {\bTABLE \bTR \bTD \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Your own solution with adding a strut to the inner table can be done in a better way by adding the strut to the setup of the beginning of the table. \starttext \bTABLE \bTR \bTD {\bTABLE[left=\strut] \bTR \bTD \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Another mothod is to use the same method, that is used for the outer table. I took a look into the source and found the following method, that works also. \starttext \bTABLE \bTR \bTD {\bTABLE[strut=yes,autostrut=no] \bTR \bTD \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext After that a was interested why we need to set the values in the last example again, because they are already set in core-ntb. The solution is, the values in nested tables are removed and replaced by new ones. This behaviour can be changed and is shown in my last example. \starttext \setfalse\resetTABLEmode \bTABLE \bTR \bTD {\bTABLE \bTR \bTD \eTD \bTD Swap \eTD \bTR \eTABLE} \bTD \eTR \eTABLE \stoptext Another example that shows the effect of \resetTABLEmode is: \starttext %\settrue\resetTABLEmode % default setting \setupTABLE[frame=off] \bTABLE \bTR \bTD {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE} \eTD \bTD Text \eTD \eTR \eTABLE \setfalse\resetTABLEmode \bTABLE \bTR \bTD {\bTABLE\bTR\bTD Text \eTD\eTR\eTABLE} \eTD \bTD Text \eTD \eTR \eTABLE \stoptext Wolfgang ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Vertical text alignment in nested natural tables
Hi, I am having a problem using nested natural tables, to which I have a solution but feel that it my not be the proper approach. I'm pretty much a TeX and ConTeXt novice. The problem is that the row height it reduced when a table is nested, breaking vertical text alignment across cells. In my example the cells "S" and "Swap" to not align vertically due to the presence of the "p". I have an example of the problem and my fix below. I'm curious if someone knows a better way to fix this. Thanks for your help, Brian \starttext Working table:\par \start \bTABLE[frame=on,align={middle,lohi}] \bTR \bTD S \eTD \bTD Swap \eTD \eTR \eTABLE \stop Nested table changes cell height, breaks text alignment with "lohi":\par \start \bTABLE[frame=on,height=0.50in] \bTR \bTD {\start \bTABLE[frame=on,align={middle,lohi}] \bTR \bTD S \eTD \bTD Swap \eTD \eTR \eTABLE \stop} \eTD \eTR \eTABLE \stop setting height to baselineskip does not help:\par \start \bTABLE[frame=on,height=0.50in] \bTR \bTD {\start \bTABLE[height=\the\baselineskip,frame=on,align={middle,lohi}] \bTR \bTD S \eTD \bTD Swap \eTD \eTR \eTABLE \stop} \eTD \eTR \eTABLE \stop One fix is a strut:\par \start \bTABLE[frame=on,height=0.50in] \bTR \bTD {\start \bTABLE[frame=on,align={middle,lohi}] \bTR \bTD \strut{S} \eTD \bTD \strut{Swap} \eTD \eTR \eTABLE \stop} \eTD \eTR \eTABLE \stop \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context