Re: [NTG-context] label bug with latest beta (2011.04.22)
Am 23.04.2011 um 21:02 schrieb Reviczky, Adam: > Further, I have two more problems with the new label system: > > 1) The label "Part" is not shown any more in the ToC. > 2) Showing the label in the ToC but not in the parts (bodypart for example) > doesn't work any more with this solution: > http://www.ntg.nl/pipermail/ntg-context/2011/058614.html \setuplist[part] [label=part] \setuplist[chapter][label=chapter] \setuplist[section][label=section] and use the \completecontent command without setting for label because this will otherwise overwrite the settings above. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xits-math.lfg
Attached an extended xits-math.lfg, to cover all the 8 stylistic sets the font have. I'm not very satisfied about the sames, so feel free to suggest better ones. BTW, is there any documentation of those lfg files? Regards, Khaled -- Khaled Hosny Egyptian Arab -- \setupbodyfont[xits] -- -- \starttext -- $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$ -- \stoptext return { name = "xits-math", version = "1.00", comment = "Goodies that complement xits (by Khaled Hosny).", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { alternates = { cal = { feature = 'ss01', value = 1, comment = "Mathematical Calligraphic Alphabet" }, greekssup = { feature = 'ss02', value = 1, comment = "Mathematical Greek Sans Serif Alphabet" }, greekssit = { feature = 'ss03', value = 1, comment = "Mathematical Italic Sans Serif Digits" }, monobfnum = { feature = 'ss04', value = 1, comment = "Mathematical Bold Monospace Digits" }, mathbbbf = { feature = 'ss05', value = 1, comment = "Mathematical Bold Double-Struck Alphabet" }, mathbbit = { feature = 'ss06', value = 1, comment = "Mathematical Italic Double-Struck Alphabet" }, mathbbbi = { feature = 'ss07', value = 1, comment = "Mathematical Bold Italic Double-Struck Alphabet" }, upint = { feature = 'ss08', value = 1, comment = "Upright Integrals" }, } } } ___ 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] Misplaced integral *scripts
On Sun, Apr 24, 2011 at 12:11:15AM +0200, Khaled Hosny wrote: > On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote: > > See the attached file, it is broken for all OTF fonts; the italic > > correction is used the wrong way (added to width while it should be > > subtracted from it). It seems to be a ConTeXt issue (testing with same > > luatex binary but with TeXLive ConTeXt gives correct output). > > Actually, it seems italic correction is just ignored, indeed looking at > the cached lua file there is no italic correction at all. The attached patch fixes it (it is good to have git repository to compare different context version, just if it was a "real" git repository not just code dumps). Regards, Khaled -- Khaled Hosny Egyptian Arab --- /home/khaled/vc/tex/context/context/tex/context/base/font-otf.lua 2011-04-20 12:06:32.0 +0200 +++ /media/sda8/tex/context/tex/texmf-context/tex/context/base/font-otf.lua 2011-04-24 00:25:52.0 +0200 @@ -817,6 +817,7 @@ local marks = { } for unicode, description in next, descriptions do local glyph = description.glyph +local italic = glyph.italic_correction if not italic then -- skip elseif italic == 0 then integrals.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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Misplaced integral *scripts
On Sat, Apr 23, 2011 at 11:57:55PM +0200, Khaled Hosny wrote: > See the attached file, it is broken for all OTF fonts; the italic > correction is used the wrong way (added to width while it should be > subtracted from it). It seems to be a ConTeXt issue (testing with same > luatex binary but with TeXLive ConTeXt gives correct output). Actually, it seems italic correction is just ignored, indeed looking at the cached lua file there is no italic correction at all. Regards, Khaled -- Khaled Hosny Egyptian Arab ___ 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] Misplaced integral *scripts
See the attached file, it is broken for all OTF fonts; the italic correction is used the wrong way (added to width while it should be subtracted from it). It seems to be a ConTeXt issue (testing with same luatex binary but with TeXLive ConTeXt gives correct output). Regards, Khaled -- Khaled Hosny Egyptian Arab context.setupbodyfont{"xits"} context.starttext() for _,s in next, {"text", "display"} do context.startTEXpage() context.startformula() context([[\%sstyle]], s) for i = 0x222B, 0x2233 do context([[\Umathchar "1"0"%4X\nolimits_{x}^{y}]], i) end for i = 0x2A0B, 0x2A1C do context([[\Umathchar "1"0"%4X\nolimits_{x}^{y}]], i) end context.stopformula() context.stopTEXpage() end context.stoptext() integrals.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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] label bug with latest beta (2011.04.22)
On 23-4-2011 6:25, Reviczky, Adam wrote: Hi With the latest beta (2011.04.22) I cannot compile my thesis any more. I think I've narrowed it down to this minimal example: %%% \starttext \startpart[title={Table of Contents}] \completecontent[criterium=all] \stoptext %%% ! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print stack traceback: [C]: in function 'texsprint' /usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label' :1: in main chunk. Shouldn't be the label function something like this: function lists.label(n) local l = lists.result[n] local t = l.titledata if t then texsprint(t.label or 0) -- 0 if no label? end end Can someone confirm this? It works with the 2011.04.20 beta, logs attached. more like: function lists.label(n,default) local l = lists.result[n] local t = l.titledata if t then texsprint(t.label or default or "") end end and then in strc-lst.mkiv: \edef\currentlistlabel{\ctxlua{structures.lists.label(\currentlistindex,"\currentlistlabel")}}% - 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 ___
[NTG-context] Setting footnotes in two columns-> lines not breaking [mkiv]
Hello, I already mentioned this some time ago, but I lost track of that email. Since the problem still exists in the after today's update, I'll try again: \setupnote[footnote][n=2] \starttext \dorecurse{6}{\input hawking\footnote{Nevertheless, there must be a line break in the footnotes}} \stoptext Can someone confirm this behavior or even propose a fix? [ConTeXt ver: 2011.04.22 18:17 MKIV] Sorry for the re-post. <>___ 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] label bug with latest beta (2011.04.22)
Further, I have two more problems with the new label system: 1) The label "Part" is not shown any more in the ToC. 2) Showing the label in the ToC but not in the parts (bodypart for example) doesn't work any more with this solution: http://www.ntg.nl/pipermail/ntg-context/2011/058614.html Here's an example showing both problems: \setuphead [chapter] [bodypartlabel=] % uncommenting this adds the label again, but in both the toc and the bodypart \setuphead [section] [bodypartlabel=] % uncommenting this adds the label again, but in both the toc and the bodypart %\setuplabeltext [en] [part={Part }] % no difference, Part is not shown \setuplabeltext [en] [chapter={Chapter }] \setuplabeltext [en] [section={Section }] \starttext \startfrontmatter \completecontent [criterium=all,label=yes] \stopfrontmatter \startbodymatter \startpart [title={Table of Contents}] \startchapter [title={Chapter}] \startsection [title={Section}] \stopbodymatter \stoptext Adam ___ 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] label bug with latest beta (2011.04.22)
Hi With the latest beta (2011.04.22) I cannot compile my thesis any more. I think I've narrowed it down to this minimal example: %%% \starttext \startpart[title={Table of Contents}] \completecontent[criterium=all] \stoptext %%% ! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print stack traceback: [C]: in function 'texsprint' /usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label' :1: in main chunk. Shouldn't be the label function something like this: function lists.label(n) local l = lists.result[n] local t = l.titledata if t then texsprint(t.label or 0) -- 0 if no label? end end Can someone confirm this? It works with the 2011.04.20 beta, logs attached. Adam (toc.tex ConTeXt ver: 2011.04.22 18:17 MKIV fmt: 2011.4.23 int: english/english system > cont-new.mkiv loaded (/usr/share/texmf/tex/context/base/cont-new.mkiv system > beware: some patches loaded from cont-new.mkiv ) system > toc.top loaded system > options > begin of optionfile system > options > system > options > % runtime options files (command line driven) system > options > \unprotect system > options > % feedback and basic job control system > options > % handy for special styles system > options > \startluacode system > options > document = document or { } system > options > document.arguments={ system > options > } system > options > document.files={ system > options > "toc.tex", system > options > } system > options > \stopluacode system > options > % process info system > options > \setupsystem[inputfile=toc.tex] system > options > \setupsystem[\c!n=2,\c!m=2] system > options > % modes system > options > % options (not that important) system > options > \startsetups *runtime:options system > options > \stopsetups system > options > % styles and modules system > options > \startsetups *runtime:modules system > options > \stopsetups system > options > % done system > options > \protect \endinput system > options > system > options > end of optionfile (toc.top) fonts > latin modern fonts are not preloaded languages > language en is active {/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map} fonts > preloading latin modern fonts (second stage) (/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv){/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map} fonts > virtual math > unable to resolve name mapsfromchar fonts > fallback modern rm 12pt is loaded system > begin file toc.tex at line 1 structure > sectioning > part @ level 1 : 1 -> Table of Contents backend > xmp > using file '/usr/share/texmf/tex/context/base/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1, subpage 1 structure > sectioning > title @ level 2 : 1.0 -> \headtext {content} ! LuaTeX error /usr/share/texmf/tex/context/base/strc-lst.lua:496: no string to print stack traceback: [C]: in function 'texsprint' /usr/share/texmf/tex/context/base/strc-lst.lua:496: in function 'label' :1: in main chunk. system > tex > error on line 11 in file toc.tex: LuaTeX error ... 1 \starttext 2 \startpart[title={Table of Contents}] 3 \completecontent[criterium=all] 4 \stoptext 5 \listsymbol@default label(\currentlistindex )} }\leftlabeltext \currentli... ...!numbercommand {\currentlistsymbol } }\hfill \domakelistelement ...ndgroup }{#3{#4}}\else #3{#4 }\fi ...mmand {\currentlistsymbol }}\hfill } } \firstoftwoarguments #1#2->#1 ...thc \zeropoint \setbox 2\emptyhbox } \setbox 4\hbox {\doif {\li... ... l.3 \completecontent[criterium=all] ? q OK, entering \batchmode... pages > flushing realpage 2, userpage 2 system > end file toc.tex at line 4 ) mkiv lua stats > used config file - /usr/share/texmf/web2c/texmfcnf.lua mkiv lua stats > used cache path - /home/reviczky/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d mkiv lua stats > input load time - 0.121 seconds mkiv lua stats > stored bytecode data - 284 modules, 58 tables, 342 chunks mkiv lua stats > cleaned up reserved nodes - 33 nodes, 9 lists of 423 mkiv lua stats > node memory usage - 19 glue_spec mkiv lua stats > node list callback tasks - 6 unique
Re: [NTG-context] Macro argument handling problem!
On 04/21/2011 01:32 PM, Wolfgang Schuster wrote: Am 21.04.2011 um 12:28 schrieb Verhaag, G.C.H.M.: Hi, I try this example from the wiki page System Macros/Argument handling: \def\dodefinesomething[#1][#2]% {\getparameters[\??xx#1][#2]} \def\definesomething% {\dodoubleargumentwithset\dodefinesomething} \starttext \definesomething[alfa][variable=test] \stoptext Running this yields ! Undefined control sequence I'm trying to write a few macros with optional delimited arguments with key-value sets and started reading the appropriate pages, but can't figure out why this example fails to run. Anybody any idea? I guess the message comes from your namespace which is in this form only allowed in unprotected mode, to enter you need \unprotect before and \protect after your command declarations. Another problem is that you use a system namespace (two “?” and two letters) but for modules we use now four “?” and also more than two letter, e.g. \def\something{something} \def\definesomething {\dodoubleargumentwithset\dodefinesomething} \def\dodefinesomething[#1][#2]% {\getparameters[\something#1][#2]} You should also take a look at the \definenamespace command which creates the \define… and \setup… commands for you: - http://wiki.contextgarden.net/Module_Namespaces - http://tex.stackexchange.com/questions/15157/how-to-make-a-ruler/15185#15185 Wolfgang Hi, Thanks for the tips and the references to the appropriate wiki pages! Regards, Gerard Verhaag ___ 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] First and last lines on a grid
>> This should do the trick: >> >> \define[1]\PagenumberCommand >> {\smash[d]{#1}} >> >> \setuppagenumbering >> [ strut=no, >> command=\PagenumberCommand] > > And how well it does it! Now I managed to align the last line of the grid with the textblock's frame: --- \definemeasure [gridWidth] [\dimexpr\paperwidth/9\relax] \definemeasure [gridHeight] [\dimexpr\paperheight/9\relax] \definemeasure [leading] [\dimexpr(6\measure{gridHeight}+\strutdepth)/20\relax] \setuplayout [grid=yes, backspace=\measure{gridWidth}, width=\dimexpr6\measure{gridWidth}\relax, topspace=\measure{gridHeight}, height=\dimexpr7\measure{gridHeight}\relax, leftmargin=\zeropoint, rightmargin=\zeropoint, header=\zeropoint, footer=\measure{gridHeight}] \setupinterlinespace [line=\measure{leading}] \define[1]\PageNumberCommand{\smash[d]{#1}} \setuppagenumbering [alternative=doublesided, location={footer,right}, strut=no, command=\PageNumberCommand] \starttext \showframe \showgrid É \dorecurse{10}{\input zapf\par} \stoptext --- This only leaves the task of aligning the first line, too. How would I achieve this? Oliver ___ 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 ___