[NTG-context] Problem with new version
Hello, yesterday I upgraded my debian and I found out that my previsously prepared publication cannot be compiled with the new version of ConTeXt. The publication looks like: * main file "ausgewaehlte.tex" \startproject ausgewaehlte \environment ausgewaehlte_environment \startfrontmatter \setuppagenumbering[state=stop] \product titelpage \stopfrontmatter \startbodymatter \setuppagenumbering[state=start] \product first \product second ... \stopbodymatter \stopproject * environment file "ausgewaehlte_environment.tex" \startenvironment ausgewaehlte_environment \usemodule[typo-krn] \usemodule[letterspace] \setupoutput[pdftex] \enableregime[utf] \mainlanguage[cz] \definefontfeature[hz][default][protrusion=punctuation,expansion=quality, mode=node] \definefontfeature[oldnumbers][language=DFLT,script=latn,onum=yes] \setupfonthandling [hz][min=20, max=20, step=5] \setupalign[hz,hanging] ... ... \stopenvironment This publication I could compile without problem with context having these debian packages: luatex0.70.1-1+b1 next generation TeX engine texlive-luatex2009-15 TeX Live: LuaTeX packages context 2011.05.18.20110627-1 powerful TeX format context-modules 20110701-1 additional ConTeXt modules After upgrading debian to: luatex 0.70.1.20120524-3 amd64next generation TeX engine texlive-luatex 2012.20120611-4 all TeX Live: LuaTeX packages context2012.05.30.20120611-1 all powerful TeX format context-modules20120611-1 all additional ConTeXt modules I get these error by compiling the above source: This is LuaTeX, Version beta-0.70.2-2012070300 (TeX Live 2012/Debian) \write18 enabled. (ausgewaehlte.tex jobcontrol > version mismatch with jobfile: 1.14 <> 1.19 ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.9.28 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 > ausgewaehlte.top loaded (ausgewaehlte.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) fonts > typescripts > unknown: library 'loc' {/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 (ausgewaehlte_environment.tex resolvers > modules > loaded: 'typo-krn' (/usr/share/texmf/tex/context/base/typo-krn.mkiv loading > ConTeXt Typesetting Macros / Kerning <+ /usr/share/texmf/tex/context/base/typo-krn.lua> system > duplicate core namespace 'characterkerning' \wait = Could anyone explain me what happened? Why the new context version complains about "duplicate core namespace" when the previous version worked without problems? Any help will be appreciated. Best regards Pavel ___ 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] Split \starttabulates
Dear all, I have a number of tables defined like this: \placetable[here][tab:some-table]{Some Table} \starttabulate[|w(.30\textwidth)p|w(.70\textwidth)p|] \HL \NC {\bf Animal} \NC {\bf Comment} \NC\FR \HL \NC Cat\NC Pretty cool \NC\MR \NC Bear \NC Kind of lazy\NC\MR \NC Sheep \NC Always hungry \NC\MR \HL \stoptabulate However, I need one of these tables to split over adjacent pages, which according to the documentation should be achievable with \setuptabulate[split=yes] However, that does not seem to work in connection with the \placetable line. That is, if I put that last line in front of the block mentioned above, the table does still not split across adjacent pages. I have to remove the \placetable line for the \setuptabulate line to have any effect, except then I loose my caption and can no longer cross-reference to table either. Any clues? Thank you, Malte. ___ 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] Defining a title font.
Trying to use an OTF font just for the title page. Ran mkluatexfontdb Used the name as defined in ../otfl-names.lua Here is my actual code: -- \usemodule[simplefonts] \definefont [titlefont][MyriadPro-Bold at 50bp] \startstandardmakeup \titlefont \centerline{Scribus} \centerline {for} \centerline{Book Covers} \centerline{Free Publishing Software Series} \rm \stopstandardmakeup -- And here are the pertinent error messages: -- (title.tex resolvers > modules > loaded: 'simplefonts' (/home/safe/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv loading > ConTeXt User Module / Simplefonts <+ /home/safe/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.lua>) fonts > defining > font with asked name 'MyriadPro-Bold' is not found using lookup 'file' fonts > defining > unknown font MyriadPro-Bold, loading aborted fonts > defining > unable to define MyriadPro-Bold as [titlefont--0] ) --- Clearly I don't know what I am doing. Can someone help? -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___ 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] xits font: some spacing and scaling problems
Hi, yet another one: \setupbodyfont[xits] \starttext $A \setminus B$ \stoptext looks strange to me. Cheers, Andreas Am Sep 27, 2012 um 7:01 PM schrieb Aditya Mahajan: > On Thu, 27 Sep 2012, Khaled Hosny wrote: > >> On Thu, Sep 27, 2012 at 04:58:11PM +0200, Andreas Mang wrote: >>> Hi there, >>> >>> Not quite sure if this is the right place. I wanted to send this >>> directly to Khaled Hosny, but then I thought it might be good to have >>> some additional opinion on some of these issues (I am not quite sure >>> if some of this is intended behaviour). >>> >>> I have collected some examples for which I think there are some >>> scaling and spacing problems in xits. >>> >>> Also, small caps are not supported. Is this intended?! >>> >>> Thanks for your help. >>> >>> Cheers, >>> Andreas >>> >>> >>> MINIMAL EXAMPLE >>> \setupbodyfont[xits,11pt] >>> >>> \starttext >>> $\diamond$ % too small?! >>> >>> $\square$ % OK?! >>> >>> $\blacktriangleright$ % too big?! >>> >>> $\blacktriangleleft$ % too big?! >>> >>> $\blacktriangle$ % too big?! >>> >>> $\blacktriangledown$ % too big?! >> >> None of those glyphs were changed in XITS, they are exactly the same as >> the ones in STIX fonts, so possibly ConTeXt is using the wrong Unicode >> character for those symbols. The later two are smaller with LaTeX >> package unicode-math. > > That is most likely the issue. I never really understood what all these > triangles should map to. Should we target unicode-math the reference > implmentation? > > Aditya > ___ > 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] Some align observations
On Tue, 2 Oct 2012, Wolfgang Schuster wrote: Am 02.10.2012 um 17:56 schrieb Aditya Mahajan : Wouldn't be nice to unite it? This is for historic reasons, (I think that there is a wiki FAQ on this). The easiest solution is to forget about left and right and use leftflushed and right flushed. The keywords are flushleft and flushright :) I'd say that we should add synonyms. I always get mixed between the two :) Aditya ___ 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] Some align observations
Am 02.10.2012 um 17:56 schrieb Aditya Mahajan : >> Wouldn't be nice to unite it? > > This is for historic reasons, (I think that there is a wiki FAQ on this). The > easiest solution is to forget about left and right and use leftflushed and > right flushed. The keywords are flushleft and flushright :) 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 ___
Re: [NTG-context] Some align observations
On Tue, 2 Oct 2012, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I'm just curious: I tried to apply align specification to \b/e-TABLE, inframed, \start/stop-alignment and \start/stop-tabulate: \setupbodyfont[11pt] \starttext \bTABLE \setupTABLE[width=4cm,align=middle] \setupTABLE[column][1][align=left] \setupTABLE[column][4][align=right] \bTR \bTD ali=L\eTD \bTD B\eTD \bTD \inframed[width=1.5cm,align=left]{ali=L}\eTD \bTD ali=R\eTD \eTR \eTABLE \startalignment[left] \input tufte \stopalignment \starttabulate[|pl|pc|pr|] \NC ali=L \input tufte\NC\input tufte\NC ali=R \input tufte\NC\NR \stoptabulate \stoptext The text aligned by "align=left" inside TABLE cell, inside \inframed and inside \startalignment is aligned to the right border of the "bounding box" (ragged left). The text aligned by "align=left" inside \start/stop-tabulate is aligned to the left edge of the "bounding box". That is not align=left but the `l` key. Read it as leftflushed :) I must admit than tabulate's behavior seems more natural to me, but this may be just my point of view. Anyway, why the behavior of alignment specification is different for {\b/e-TABLE, \inframed, \start/stop-alignment} and {\start/stop-tabulate}? Wouldn't be nice to unite it? This is for historic reasons, (I think that there is a wiki FAQ on this). The easiest solution is to forget about left and right and use leftflushed and rightflushed. Aditya___ 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] Some align observations
Hello, I'm just curious: I tried to apply align specification to \b/e-TABLE, inframed, \start/stop-alignment and \start/stop-tabulate: \setupbodyfont[11pt] \starttext \bTABLE \setupTABLE[width=4cm,align=middle] \setupTABLE[column][1][align=left] \setupTABLE[column][4][align=right] \bTR \bTD ali=L\eTD \bTD B\eTD \bTD \inframed[width=1.5cm,align=left]{ali=L}\eTD \bTD ali=R\eTD \eTR \eTABLE \startalignment[left] \input tufte \stopalignment \starttabulate[|pl|pc|pr|] \NC ali=L \input tufte\NC\input tufte\NC ali=R \input tufte\NC\NR \stoptabulate \stoptext The text aligned by "align=left" inside TABLE cell, inside \inframed and inside \startalignment is aligned to the right border of the "bounding box" (ragged left). The text aligned by "align=left" inside \start/stop-tabulate is aligned to the left edge of the "bounding box". I must admit than tabulate's behavior seems more natural to me, but this may be just my point of view. Anyway, why the behavior of alignment specification is different for {\b/e-TABLE, \inframed, \start/stop-alignment} and {\start/stop-tabulate}? Wouldn't be nice to unite it? Best regards, Lukas -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038 t-Align.mkiv Description: Binary data t-Align.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] disable expansion for one single component
On 10/02/2012 03:31 PM, Wolfgang Schuster wrote: Put \setupalign[nohz] before and \setupalign[hz] after your chapter. Ah, that's it! Thanks Wolfgang, precise and quick, as always! Thomas ___ 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] disable expansion for one single component
Am 02.10.2012 um 15:24 schrieb Thomas A. Schmitz : > Hi all, > > for a book I'm typesetting, I use adobe minion and have enabled > protrusion=pure,expansion=quality in the typescript and then > > \setupalign[hanging,hz] > > in the main environment. Now it turns out that in one of the > components/chapters of the book, this messes up the spacing of some > characters. Is there a way to disable expansion (but not of course > protrusion) for one single chapter? Put \setupalign[nohz] before and \setupalign[hz] after your chapter. 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] disable expansion for one single component
Hi all, for a book I'm typesetting, I use adobe minion and have enabled protrusion=pure,expansion=quality in the typescript and then \setupalign[hanging,hz] in the main environment. Now it turns out that in one of the components/chapters of the book, this messes up the spacing of some characters. Is there a way to disable expansion (but not of course protrusion) for one single chapter? Thanks, and all best Thomas ___ 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] Frozen callback.
On 2-10-2012 14:13, Philipp Gesang wrote: Why is "document.MyCharacterMess" a string? The sequencers use loadstring() internally (util-seq.lua), so you need to supply the namespace as a string. This happens all over the place with action/callbacks. more flexible this way (one can redefine, nil or whatever such functions) - 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 ___
Re: [NTG-context] Frozen callback.
On 2-10-2012 13:41, Andre Caldas wrote: I am trying to redefine the ’open_read_file’ callback. [...] utilities.sequencers.appendaction(textfileactions, "system","document.MyCharacterMess") All I want is to get the full path (or path relative to lfs.currentdir()). Is "textfileactions" the action I should trap? Also, shall I use "after" or "before" instead of "system"? Since it is a module, probably I should use "system", right? Just want to be sure... \startluacode resolvers.installinputfilehandler("before",function(str,filename,...) logs.report(string.format("path: %s",file.dirname(filename))) return str, filename, ... end) \stopluacode - 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 ___
Re: [NTG-context] Frozen callback.
· > > function document.MyCharacterMess(str,filename) > > What is this "str"? The raw file content as a Lua string. You can examine the arguments you get like so: ··· \startluacode document.arg_test = function (s, ...) table.print({...}, "file_content") return s end local textfileactions = resolvers.openers.helpers.textfileactions utilities.sequencers.appendaction(textfileactions,"system","document.arg_test") \stopluacode \starttext \input ward \input knuth \stoptext ··· > > if file.nameonly(filename) == "ward" then > > str = table.concat(string.totable(str,"."), " + ") > > What is this doing? Split the input at every byte and re-concatenate using "+" as delimiter. (It’s a bit confusing as string.totable() takes only one argument ;-) ) > > [...] > > utilities.sequencers.appendaction(textfileactions, > > "system","document.MyCharacterMess") > > Why is "document.MyCharacterMess" a string? The sequencers use loadstring() internally (util-seq.lua), so you need to supply the namespace as a string. This happens all over the place with action/callbacks. Regards Philipp pgpBZAUsa1Tuq.pgp Description: PGP signature ___ 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] Frozen callback.
Hello, Andre! Andre Caldas wrote: >> function document.MyCharacterMess(str,filename) > > What is this "str"? This is a function that takes two variables; the first one it calls 'str', the second one 'filename'. Example: function f(a, b) return a/b end function(8,2) --> 4, not 0.25 I do not know what sort of str and filename are being passed to document.MyCharacterMess. (To all the action functions in utilities.sequencers.appendaction, in fact). >> if file.nameonly(filename) == "ward" then >> str = table.concat(string.totable(str,"."), " + ") > What is this doing? file.nameonly strips path and extenstion, e.g. file.nameonly('a/b/cod.doc') returns 'cod'. You can see the file.* functions in l-file.lua. string.totable splits a string, and returns the pieces as an array. In this case, the string is split at the periods. table.concat combines a table into a string, optionally putting a string (" + ", in this case) where the pieces join. so the `str = ...` line turns "Hello. I am Sam. You are also Sam." into "Hello + I am Sam + You are also Sam" or "hello.txt" into "hello + txt" > Why is "document.MyCharacterMess" a string? Isn't it less error-prone > to use the function itself, instead of its name? No idea. Cheers, and good luck, Sietse ___ 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] Frozen callback.
Am 02.10.2012 um 13:41 schrieb Andre Caldas : > I am trying to redefine the ’open_read_file’ callback. > >> [...] >> utilities.sequencers.appendaction(textfileactions, >> "system","document.MyCharacterMess") > > All I want is to get the full path (or path relative to > lfs.currentdir()). Is "textfileactions" the action I should trap? \starttext \startluacode function document.MyCharacterMess(str,filename) local path = "Path: " .. file.dirname(filename) local text = "Text: " .. str return table.concat({path,text},"\n\n") end local textfileactions = resolvers.openers.helpers.textfileactions utilities.sequencers.appendaction(textfileactions,"system","document.MyCharacterMess") \stopluacode \input ward \stoptext 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 ___
Re: [NTG-context] Frozen callback.
I am trying to redefine the ’open_read_file’ callback. > [...] > utilities.sequencers.appendaction(textfileactions, > "system","document.MyCharacterMess") All I want is to get the full path (or path relative to lfs.currentdir()). Is "textfileactions" the action I should trap? Also, shall I use "after" or "before" instead of "system"? Since it is a module, probably I should use "system", right? Just want to be sure... Thank you all! André Caldas. ___ 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] Frozen callback.
Hello, Hans! >> Shall I simply do something like this? >> >> [...] > > this is not the recommended way .. better do somethign like this: > [...] > function document.MyCharacterMess(str,filename) Loved your function naming! :-) What is this "str"? > if file.nameonly(filename) == "ward" then > str = table.concat(string.totable(str,"."), " + ") What is this doing? > [...] > utilities.sequencers.appendaction(textfileactions, > "system","document.MyCharacterMess") Why is "document.MyCharacterMess" a string? Isn't it less error-prone to use the function itself, instead of its name? Sorry for my naive basic questions... :-) Cheers, André Caldas. ___ 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] Wrong results for chemical structures and reactions
2012-10-02 Alan BRASLAU : > Try the following: > > \starttext > > \startchemicalformula > \chemical{2H_2} > \chemical{+} > \chemical{O_2} > \chemical{->} > \chemical{2H_2O} > \stopchemicalformula \chemical{->} is not rendered correctly. > \startchemicalformula > \chemical{2H_2} > \chemical{PLUS} > \chemical{O_2} > \chemical{GIVES} > \chemical{2H_2O} > \stopchemicalformula The spacing is wrong. The following yields to better spacing: \startchemicalformula \chemical{2H_2} \chemical{PLUS} \chemical{} \chemical{O_2} \chemical{GIVES} \chemical{} \chemical{2H_2O} \stopchemicalformula > \startchemicalformula > \chemical{A} > \chemical{GIVES} > \chemical{B} > \chemical{EQUILIBRIUM} > \chemical{C} > \chemical{MESOMERIC} > \chemical{D} > \stopchemicalformula Same spacing problem, workaround: \chemical{} > \setupchemical > [width=fit, > height=fit, > scale=small, > size=small] > > \hbox{ > \startchemical > \chemical[ONE,Z0,DB1,SB46,MOV1,Z0,SB28][C,C] > \stopchemical > \startchemicalformula > \chemical{PLUS} > \stopchemicalformula > \startchemical > \chemical[ONE,Z0,SB146,Z6][N,H] > \stopchemical > \startchemicalformula > \chemical{GIVES} > \stopchemicalformula > \startchemical > \chemical[ONE,Z07,SB1357,MOV1,Z0,SB27,MOV2,Z0,SB13][C,H,C,N] > \stopchemical > } Worse than before. > 3. I believe that the syntax should be rationalized, but I will have to > discuss this further with Hans. Normally, commands have keywords > between [] and text to be typeset between {}. This would mean > \startchemical > \chemical[ONE,Z0,SB146,Z6]{N}{H} > \stopchemical > > Alternatively: > \startchemical > \chemical[ONE,Z0=N,SB146,Z6=H] > \stopchemical > but currently this puts "N" and "H" into lowercase as "n" and "h" > as a side effect of the way that Hans wrote the lua code. If you redo the syntax: My suggestion would be to try to reduce the use of the string “chemical” if that's feasible. > How to deal with inline equations, as in \chemical{2H_2,+,O_2,->,2H_2O}? > I would think that it could work as does math mode: > \chemical{2H_2 + O_2 -> 2H_2O} (no commas) with spaces (or none) > delimiting the keywords. That looks more practical. > Hans will have to answer me on this. We need to be a bit patient, I don't need that now. For the current project all structures look fine (ugly hacks included :). You may consider my comments above when you (or Hans) are redoing the code. Thanks for the \startchemicalformula hint, that was the missing piece. > as I'm sure that he is currently VERY busy preparing for EuroTeX 2012! Sure. Unfortunately I cannot come, I can't get a week off and for 1-2 days it's too far. Marco ___ 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] Header-Footer-Layout
Am 23.09.2012 um 16:07 schrieb Arne Runge : > Hi, > > I would like to have a doublesided layout with: > > - a titlepage with neither header nor footer, > - a frontpart with pagesnumbers(left/right) in roman > - a bodypart with pagesnumbers(left/right) in arabic > - an appendix with pagesnumbers(left/right) in arabic > > - first page of a chapter should not have a header + underline > - next page header(CHAPTER #: chapter) underlined > - next page header(section) underlined > > - if there is no section then only the line. > - if the next page is empty than only the pagenumber should be printed. > > Seems to be a common layout and I apologize for asking. > > Thanks in advance for any help. > > Regards, > > Arne Put the makeup environment in the front matter environment and remove the sectionblock settings. When you don’t want to start chapter at a right page you can add \setupsectionblock[page=yes] to your document. \setuppagenumbering[alternative=doublesided] \setupheadertexts[] \setupheadertexts[\setups{text a}][][][\setups{text b}] \startsetups[text a] CHAPTER \getmarking[chapternumber]: \WORD{\getmarking[chapter]} \stopsetups \startsetups[text b] \getmarking[section] \stopsetups \setupheader[text][after=\hrule] \setuphead[chapter][page={header,right},header=empty] \setupfootertexts[][pagenumber] \defineconversionset[frontpart:pagenumber][romannumerals][] \startsectionblockenvironment[bodypart] \setcounter[userpage][1] \stopsectionblockenvironment \starttext \startfrontmatter \startstandardmakeup[align=middle] {\tfd TITLE} \stopstandardmakeup \completecontent \stopfrontmatter \startbodymatter \chapter{Knuth} \dorecurse{12}{\input knuth\par} \stopbodymatter \startappendices \chapter{Zapf} \dorecurse{12}{\input zapf\par} \stopappendices \stoptext 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 ___
Re: [NTG-context] Wrong results for chemical structures and reactions
2012-10-02 Alan BRASLAU : Hi Alan > > chemical structures and reactions produce wrong results. Here is one > > example from the wiki and two from the manual. > > > > […] > > > \startchemicalformula > not > \startformula > > \startchemicalformula > \chemical{2H_2} > \chemical{PLUS} > \chemical{O_2} > \chemical{GIVES} > \chemical{2H_2O} > \stopchemicalformula The spacing is still wrong. Compare: \starttext \chemical{2H_2,+,O_2,->,2H_2O}\blank \startchemicalformula \chemical{2H_2} \chemical{PLUS} \chemical{O_2} \chemical{GIVES} \chemical{2H_2O} \stopchemicalformula \stoptext How to mid-align the reaction? Wrapping the \startchemicalformula in \startformula works, but it's clumsy. > Also, the shorthand "+" for "PLUS", "->" for "GIVES", etc. > seems to be interpreted only inline, not in displayed chemical formula > mode. > > > I am working (with Hans) to correct the mkiv chemical code, > which has been completely re-written (from ppchTeX macros). > Also working on a new manual, at the same time... That's brilliant! Marco ___ 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] Wrong results for chemical structures and reactions
On Tue, 2 Oct 2012 09:40:35 +0200 Marco Patzer wrote: > Hi, > > chemical structures and reactions produce wrong results. Here is one > example from the wiki and two from the manual. > > \starttext > > %% does not typeset the reaction, prints the commas, wrong spacing > %% and no arrow > \startformula > \chemical{2H_2,+,O_2,->,2H_2O} > \stopformula > > %% same here, GIVES is not interpreted > \startformula > \chemical{A,GIVES,B,EQUILIBRIUM,C,MESOMERIC,D} > \stopformula > > %% wrong alignment, rules overlay symbols > \startformula > \setupchemical > [width=fit, > height=fit, > scale=small, > size=small] > \startchemical > \chemical[ONE,Z0,DB1,SB46,MOV1,Z0,SB28][C,C] > \stopchemical > \startchemical > \chemical[SPACE,PLUS,SPACE] > \stopchemical > \startchemical > \chemical[ONE,Z0,SB146,Z6][N,H] > \stopchemical > \startchemical > \chemical[SPACE,GIVES,SPACE] > \stopchemical > \startchemical > \chemical[ONE,Z07,SB1357,MOV1,Z0,SB27,PB:Z2,ONE,Z0,SB13,PE][C,H,C,N] > \stopchemical > \stopformula > > \stoptext > > Am I missing something? Is this mechanism not supported any more or > just broken? > > > Marco \startchemicalformula not \startformula \startchemicalformula \chemical{2H_2} \chemical{PLUS} \chemical{O_2} \chemical{GIVES} \chemical{2H_2O} \stopchemicalformula Also, the shorthand "+" for "PLUS", "->" for "GIVES", etc. seems to be interpreted only inline, not in displayed chemical formula mode. I am working (with Hans) to correct the mkiv chemical code, which has been completely re-written (from ppchTeX macros). Also working on a new manual, at the same time... Alan ___ 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] Frozen callback.
On 2-10-2012 02:30, Andre Caldas wrote: I am trying to redefine the ’open_read_file’ callback. [...] direct callback access is disabled. There are usually some layers of abstraction on top of them, different ones for different callbacks. Mapping them all is a huge effort, so best refer to the source. In your case the function resolvers.openers.helpers.textopener() takes the place of the open_read_file callback. It can be found in data-tex.lua. Shall I simply do something like this? local function textopener(tag, filename, filehandle, coding) result = old_textopener(tag, filename, filehandle, coding) -- Do lots of things return result end resolvers.openers.helpers.textopener = textopener this is not the recommended way .. better do somethign like this: \starttext \startluacode function document.MyCharacterMess(str,filename) if file.nameonly(filename) == "ward" then str = table.concat(string.totable(str,"."), " + ") end return str end local textfileactions = resolvers.openers.helpers.textfileactions utilities.sequencers.appendaction(textfileactions,"system","document.MyCharacterMess") \stopluacode \input ward \input knuth \stoptext - 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 ___
Re: [NTG-context] blank lines above accentuated capital letter
On Tue, 2 Oct 2012 09:18:48 +0200 Wolfgang Schuster wrote: > > Am 01.10.2012 um 14:34 schrieb Stéphanie Vilayphiou > : > > > Hello, > > > > I'm typesetting a French brochure with a typeface created for this > > project But everytime I have an É (or any diacritic on a capital > > letter), it creates a blank line above) > > > > here's a screenshot of what it produces: > > > > https://www.dropbox.com/s/l7xuiuesba5lb9e/Capture%20d%E2%80%99%C3%A9cran%202012-09-26%20%C3%A0%2018.42.01.png > > > > I run version 2012.03.13 21:26 on arch linux > >The diacritic if over the 1000 truetype height, is this the > > problem? Stéphanie > > You can try to change the height/depth ratio for the strut, i.e. > \setupinterlinespace[height=0.8,depth=0.2] > > Wolfgang This seems to be a font problem, or some other special setting, as the above text typesets correctly by default, or using \setupbodyfont[dejavu] for example. Alan ___ 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] Wrong results for chemical structures and reactions
Hi, chemical structures and reactions produce wrong results. Here is one example from the wiki and two from the manual. \starttext %% does not typeset the reaction, prints the commas, wrong spacing %% and no arrow \startformula \chemical{2H_2,+,O_2,->,2H_2O} \stopformula %% same here, GIVES is not interpreted \startformula \chemical{A,GIVES,B,EQUILIBRIUM,C,MESOMERIC,D} \stopformula %% wrong alignment, rules overlay symbols \startformula \setupchemical [width=fit, height=fit, scale=small, size=small] \startchemical \chemical[ONE,Z0,DB1,SB46,MOV1,Z0,SB28][C,C] \stopchemical \startchemical \chemical[SPACE,PLUS,SPACE] \stopchemical \startchemical \chemical[ONE,Z0,SB146,Z6][N,H] \stopchemical \startchemical \chemical[SPACE,GIVES,SPACE] \stopchemical \startchemical \chemical[ONE,Z07,SB1357,MOV1,Z0,SB27,PB:Z2,ONE,Z0,SB13,PE][C,H,C,N] \stopchemical \stopformula \stoptext Am I missing something? Is this mechanism not supported any more or just broken? Marco ___ 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] blank lines above accentuated capital letter
Am 01.10.2012 um 14:34 schrieb Stéphanie Vilayphiou : > Hello, > > I'm typesetting a French brochure with a typeface created for this project >But everytime I have an É (or any diacritic on a capital letter), it >creates a blank line above) > > here's a screenshot of what it produces: > > https://www.dropbox.com/s/l7xuiuesba5lb9e/Capture%20d%E2%80%99%C3%A9cran%202012-09-26%20%C3%A0%2018.42.01.png > > I run version 2012.03.13 21:26 on arch linux >The diacritic if over the 1000 truetype height, is this the problem? >Stéphanie You can try to change the height/depth ratio for the strut, i.e. \setupinterlinespace[height=0.8,depth=0.2] 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] blank lines above accentuated capital letter
Hello, I'm typesetting a French brochure with a typeface created for this project But everytime I have an É (or any diacritic on a capital letter), it creates a blank line above) here's a screenshot of what it produces: https://www.dropbox.com/s/l7xuiuesba5lb9e/Capture%20d%E2%80%99%C3%A9cran%202012-09-26%20%C3%A0%2018.42.01.png I run version 2012.03.13 21:26 on arch linux The diacritic if over the 1000 truetype height, is this the problem? Stéphanie -- Stéphanie Vilayphiou http://stdin.fr/ +32 (0)4 89 00 88 59 ___ 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 ___