[NTG-context] Chinese footnotes too wide
Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk: Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? No, you need “cn” for chinese. Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \starttext Hello, World \footnote{话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了 出来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗 去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身回 来,无精打彩的卸了残妆。} Hello, World \footnote{There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever.} \stoptext mtx-context | current version: 2012.09.16 23:18 -- John Devereux ___ 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] Underbar quotation
Hello, in the following example the space before the leading quotation mark (between 'f' and 'g') is not colored: \definebar[MyBar][color=green,rulethickness=2.8,order=background,offset=1.5,continue=yes] \starttext \MyBar{Abc def \quotation{ghi}.} \stoptext How to make the bar color the uncolored space as well? TIA. 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-Bar.mkiv Description: Binary data t-Bar.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] Chinese setuplabeltext
John Devereux wrote: There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? Wolfgang Schuster wrote: No, you need “cn” for chinese. Might it be advisable to add 'zh' as a synonym? Technically, 'cn' means the country China, and 'zh' means the Chinese language. (Country code vs. language code.) Thankfully 'cn' is not in use as a language code, so retaining it won't cause any collisions. --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] Chinese footnotes too wide
Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk: Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? No, you need “cn” for chinese. Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points. 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] align and location in \setupcombination
Am 28.10.2012 um 15:59 schrieb Marco Patzer home...@lavabit.com: So I have to enclose \startcombination … \stopcombination in \placefigure[][]{}. How to locate the combined figures at the horizontal center? \midaligned {\startcombination[2*1] {\externalfigure[dummy][]}{aa} {\externalfigure[dummy][]}{bb} \stopcombination} With the new beta you can replace \midaligned{…} with \startmidaligned … \stopmidaligned 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] Chinese footnotes too wide
Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk: Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? No, you need “cn” for chinese. Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points. Hi Wolfgang, I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See: \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant] \starttext 话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了出 来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗 去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身 回来,无精打彩的卸了残妆。\footnote{话说林黛玉正自悲泣,忽听院门响 处,只见宝钗出来了,宝玉袭人一群人送了出来。待要上去问着宝玉,又恐当 着众人问羞了宝玉不便,因而闪过一旁,让宝钗去了,宝玉等进去关了门,方 转过来,犹望着门洒了几点泪。自觉无味,方转身回来,无精打彩的卸了残妆。} \blank There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever. \footnote{There were a king with a large jaw and a queen with a plain face, on the throne of England; there were a king with a large jaw and a queen with a fair face, on the throne of France. In both countries it was clearer than crystal to the lords of the State preserves of loaves and fishes, that things in general were settled for ever.} \stoptext -- John Devereux ___ 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] align and location in \setupcombination
2012-10-30 Wolfgang Schuster: \midaligned {\startcombination[2*1] {\externalfigure[dummy][]}{aa} {\externalfigure[dummy][]}{bb} \stopcombination} With the new beta you can replace \midaligned{…} with \startmidaligned … \stopmidaligned I already noted that. I appreciate the movement to a more uniform \start…\stop syntax. Just a random thought: Would it be possible or even make sense to uniform the syntax even further and maybe merge the functionality into \startalignment? At the moment we have one command with an argument for alignments: \startalignment [right|middle|left] \input knuth \stopalignment however three different command for boxed alignments (furthermore, \startrightaligned works just the opposite of \startalignment[right]): \startrightaligned FooBar \stoprightaligned \startmidaligned FooBar \stopmidaligned \startleftaligned FooBar \stopleftaligned This might be easy to remember for us who still know the \midaligned{} syntax, but I guess for new users it's confusing. Additionally, the difference between the commands is unclear. What about an interface like this: \startlinealignment [right|middle|left] FooBar \stoplinealignment Taking this one step further would be to merge both into one command: \startalignment [align=left, alternative=???] \input knuth \stopalignment \startalignment [align=left, alternative=!!!] FooBar \stopalignment 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] Chinese footnotes too wide
Am 30.10.2012 um 13:25 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk: Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? No, you need “cn” for chinese. Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points. Hi Wolfgang, I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See: \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant] Add this the following code to your document, context resets a few settings for footnotes to prevent unwanted side effects from a few commands and I guess this disables also the chinese line break mechanism. \startsetups footnote:hanzi \setscript[hanzi] \stopsetups \setupnote[footnote][setups={footnote:hanzi}] 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] Chinese footnotes too wide
Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 30.10.2012 um 13:25 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk: Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk: Hi, There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? No, you need “cn” for chinese. Oh yes that works a lot better! :) Thanks Wolfgang. Another issue I have is footnotes. Chinese footnotes extend past the right hand edge of the page. By default context breaks lines only at spaces or between word which are in the hyphenations patterns but none of this applies for chinese, to enable line breaks you have to add \setscript[hanzi] to your document. With this commands context checks the input for chinese and breaks lines at valid points. Hi Wolfgang, I did actually try this too but the problem remains in the footnotes (it fixes it for text in the main body). See: \usemodule[simplefonts] \setmainfont[Microsoft YaHei] \mainlanguage[cn] \language[cn] \setscript[hanzi] \setupfootnotes[split=tolerant] Add this the following code to your document, context resets a few settings for footnotes to prevent unwanted side effects from a few commands and I guess this disables also the chinese line break mechanism. \startsetups footnote:hanzi \setscript[hanzi] \stopsetups \setupnote[footnote][setups={footnote:hanzi}] Wolfgang Beautiful, that did it, thank you very much. -- John Devereux ___ 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] emtpy TOC (beta)
Hi, I get an empty TOC for my document with the latest beta (works with 2012-10-19). I have deleted the *.tuc file (just to be sure), but still no TOC after a fresh run. Sorry, no small example yet. The document is the draft documentation of a not yet published module (won't compile without the module files). No time to look deeper into this, as I have to finish the documentation... Peter ___ 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] Search path for .tex files (mkiv)
Hi, What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] I want to be able to do for example \input disclaimer And have it use the correct version. (There are more complicated scenarios too). In case there is a better way to do it, what I want is to have language- or mode- specific versions of some boilerplate texts. These would be in individual files. Documents elsewhere in a directory tree could reference these using a standard name and it would be picked according to the set language/mode. Thanks, John -- John Devereux ___ 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] Search path for .tex files (mkiv)
Am 30.10.2012 um 15:31 schrieb John Devereux j...@devereux.me.uk: Hi, What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] Figures: \startmodeset [en] {\setupexternalfigures[directory={fig,fig/lang_en}]} [de] {\setupexternalfigures[directory={fig,fig/lang_de}]} [default]{\setupexternalfigures[directory={fig}]} \stopmodeset Language: \startmodeset [en]{\mainlanguage[en]} [de]{\mainlanguage[de]} \stopmodeset Suffix: \define\DocumentSuffix {\doifmodeelse{en}{EN}{\doifmode{de}{DE}}} or \startmodeset [en] {\defineexpandable\DocumentSuffix{EN}} [de] {\defineexpandable\DocumentSuffix{DE}} [default]{\defineexpandable\DocumentSuffix{EN}} \stopmodeset 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] emtpy TOC (beta)
Am 30.10.2012 um 15:22 schrieb Peter Rolf indi...@gmx.net: Hi, I get an empty TOC for my document with the latest beta (works with 2012-10-19). I have deleted the *.tuc file (just to be sure), but still no TOC after a fresh run. Sorry, no small example yet. The document is the draft documentation of a not yet published module (won't compile without the module files). No time to look deeper into this, as I have to finish the documentation… Do you write the manual as a normal document or in the source? 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] Search path for .tex files (mkiv)
2012-10-30 John Devereux: What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] I want to be able to do for example \input disclaimer You can either trigger on the language or on the mode. The directory structure looks like this text/en/alpha.tex text/en/beta.tex text/de/alpha.tex text/de/beta.tex images/en images/de You can create the individual files as components and create a product file: \startproduct * \mainlanguage [de] \project [project] \component [a] \component [b] \stopproduct and a project file: \startproject * \startmode [*en] \usepath [text/en] \setupexternalfigures [directory={images/en}] \stopmode \startmode [*de] \usepath [text/de] \setupexternalfigures [directory={images/de}] \stopmode \stopproject To trigger by language, you use *en, *de, etc. To trigger by mode, you use the mode name, in that case you can move the \mainlanguage call to the corresponding language setup. 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] emtpy TOC (beta)
Am 30.10.2012 16:00, schrieb Wolfgang Schuster: Am 30.10.2012 um 15:22 schrieb Peter Rolf indi...@gmx.net: Hi, I get an empty TOC for my document with the latest beta (works with 2012-10-19). I have deleted the *.tuc file (just to be sure), but still no TOC after a fresh run. Sorry, no small example yet. The document is the draft documentation of a not yet published module (won't compile without the module files). No time to look deeper into this, as I have to finish the documentation… Do you write the manual as a normal document or in the source? as a normal document 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 ___ ___ 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] emtpy TOC (beta)
Am 30.10.2012 um 16:06 schrieb Peter Rolf indi...@gmx.net: Am 30.10.2012 16:00, schrieb Wolfgang Schuster: Am 30.10.2012 um 15:22 schrieb Peter Rolf indi...@gmx.net: Hi, I get an empty TOC for my document with the latest beta (works with 2012-10-19). I have deleted the *.tuc file (just to be sure), but still no TOC after a fresh run. Sorry, no small example yet. The document is the draft documentation of a not yet published module (won't compile without the module files). No time to look deeper into this, as I have to finish the documentation… Do you write the manual as a normal document or in the source? as a normal document I can reproduce it with a minimal example: \starttext \completecontent \chapter{First chapter} \section{First section} \section{Second section} \chapter{Second chapter} \section{Third section} \section{Fourth section} \stoptext The problem is the following function in strc-doc.lua table.setmetatableindex(collected, { __index = function(t,i) sections.load() return collected[i] or { } end }) In a previous version the first line was setmetatable(collected, { and I get also the TOC when I make this change in the source but but none with table.setmetatableindex(collected, { I guess there is a reason for this change but I have no idea for which purpose. 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] Search path for .tex files (mkiv)
Wolfgang Schuster wolfgang.schus...@gmail.com writes: Am 30.10.2012 um 15:31 schrieb John Devereux j...@devereux.me.uk: Hi, What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] Figures: \startmodeset [en] {\setupexternalfigures[directory={fig,fig/lang_en}]} [de] {\setupexternalfigures[directory={fig,fig/lang_de}]} [default]{\setupexternalfigures[directory={fig}]} \stopmodeset Language: \startmodeset [en]{\mainlanguage[en]} [de]{\mainlanguage[de]} \stopmodeset Suffix: \define\DocumentSuffix {\doifmodeelse{en}{EN}{\doifmode{de}{DE}}} or \startmodeset [en] {\defineexpandable\DocumentSuffix{EN}} [de] {\defineexpandable\DocumentSuffix{DE}} [default]{\defineexpandable\DocumentSuffix{EN}} \stopmodeset Thank you Wolfgang, these modesets are neat. But it was primarily the .tex file search path I was interested in, I have figures working already, although your way is nicer. Is there something like \setuptexfilesdirectory? -- John Devereux ___ 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] Search path for .tex files (mkiv)
Am 30.10.2012 um 17:12 schrieb John Devereux j...@devereux.me.uk: Thank you Wolfgang, these modesets are neat. But it was primarily the .tex file search path I was interested in, I have figures working already, although your way is nicer. Is there something like \setuptexfilesdirectory? You can set search directories with the \usepath ind \usesubpath commands, e.g. \usepath[de] searches components in the “de” directory \usesubpath[one,two,three] search components in the “one”, “two” and “three” subdirectories of the “de” etc. directories 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] Search path for .tex files (mkiv)
Marco Patzer home...@lavabit.com writes: 2012-10-30 John Devereux: What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] I want to be able to do for example \input disclaimer You can either trigger on the language or on the mode. The directory structure looks like this text/en/alpha.tex text/en/beta.tex text/de/alpha.tex text/de/beta.tex images/en images/de You can create the individual files as components and create a product file: \startproduct * \mainlanguage [de] \project [project] \component [a] \component [b] \stopproduct and a project file: \startproject * \startmode [*en] \usepath [text/en] \setupexternalfigures [directory={images/en}] \stopmode \startmode [*de] \usepath [text/de] \setupexternalfigures [directory={images/de}] \stopmode \stopproject To trigger by language, you use *en, *de, etc. To trigger by mode, you use the mode name, in that case you can move the \mainlanguage call to the corresponding language setup. Marco Hello Marco, It looks like \usepath is the key to what I want, thank you. I don't quite understand your overall structure. Is the * a literal * with some special meaning, or are you using it as a placeholder for something? Sorry if I am being dense. I am not using the project/product/component system, perhaps I should look into it again. Hmmm, alpha.tex defines component a, beta.tex defines b, is that right? -- John Devereux ___ 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] Search path for .tex files (mkiv)
Am 30.10.2012 um 17:24 schrieb John Devereux j...@devereux.me.uk: Marco Patzer home...@lavabit.com writes: 2012-10-30 John Devereux: What is the correct way to set or modify the search path for tex files? I want to make it mode-dependent. For example, for figures I have something like \doifmode{en} {\def\FigDirLanguage{fig/lang_en}\def\DocumentSuffix{EN}\mainlanguage[en]} \doifmode{de} {\def\FigDirLanguage{fig/lang_de}\def\DocumentSuffix{DE}\mainlanguage[de]} [...] \setupexternalfigures[directory={fig,{\FigDirLanguage},{../fig},{../\FigDirLanguage}}] I want to be able to do for example \input disclaimer You can either trigger on the language or on the mode. The directory structure looks like this text/en/alpha.tex text/en/beta.tex text/de/alpha.tex text/de/beta.tex images/en images/de You can create the individual files as components and create a product file: \startproduct * \mainlanguage [de] \project [project] \component [a] \component [b] \stopproduct and a project file: \startproject * \startmode [*en] \usepath [text/en] \setupexternalfigures [directory={images/en}] \stopmode \startmode [*de] \usepath [text/de] \setupexternalfigures [directory={images/de}] \stopmode \stopproject To trigger by language, you use *en, *de, etc. To trigger by mode, you use the mode name, in that case you can move the \mainlanguage call to the corresponding language setup. Marco Hello Marco, It looks like \usepath is the key to what I want, thank you. I don't quite understand your overall structure. Is the * a literal * with some special meaning, or are you using it as a placeholder for something? Sorry if I am being dense. I am not using the project/product/component system, perhaps I should look into it again. When you write a component file (assume it name is alpha.tex) you would begin the file with \startcomponent alpha where \startcomponent takes the name of the current file as argument, the name of the file is tired in the command \currentcomponent. In MkIV you can replace the name with “*” and context would still print the correct name with \currentcomponent. The asterisk in modes indicates that you use a system mode which created by system, i.e. when you put \mainlanguage[en] in your document context enables the mode “*en”. The opposite of this are user modes which are enable by the user itself with \enablemode[…]. Hmmm, alpha.tex defines component a, beta.tex defines b, is that right? No, that should be a typo because the command takes the name of the file as argument like \input but it doesn’t stop the processing when the file isn’t available. 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] Search path for .tex files (mkiv)
2012-10-30 John Devereux: It looks like \usepath is the key to what I want, thank you. Yes, combine \usepath with the \startmodeset syntax that Wolfgang suggested and you should have a clean solution. I don't quite understand your overall structure. You're right. Without file names it's hard to follow, especially with the mistake I made. Is the * a literal * with some special meaning, or are you using it as a placeholder for something? It is a literal `*`. That means that the file name will be used as a component (or product) name. I am not using the project/product/component system, perhaps I should look into it again. Hmmm, alpha.tex defines component a, beta.tex defines b, is that right? No, that's my fault. Of course they have to match. 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] emtpy TOC (beta)
On 30-10-2012 16:50, Wolfgang Schuster wrote: Am 30.10.2012 um 16:06 schrieb Peter Rolf indi...@gmx.net: Am 30.10.2012 16:00, schrieb Wolfgang Schuster: Am 30.10.2012 um 15:22 schrieb Peter Rolf indi...@gmx.net: Hi, I get an empty TOC for my document with the latest beta (works with 2012-10-19). I have deleted the *.tuc file (just to be sure), but still no TOC after a fresh run. Sorry, no small example yet. The document is the draft documentation of a not yet published module (won't compile without the module files). No time to look deeper into this, as I have to finish the documentation… Do you write the manual as a normal document or in the source? as a normal document I can reproduce it with a minimal example: \starttext \completecontent \chapter{First chapter} \section{First section} \section{Second section} \chapter{Second chapter} \section{Third section} \section{Fourth section} \stoptext The problem is the following function in strc-doc.lua table.setmetatableindex(collected, { __index = function(t,i) sections.load() return collected[i] or { } end }) should be table.setmetatableindex(collected, function(t,i) sections.load() return collected[i] or { } end) - 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] scripts
Hi, I wasted a whole afternoon figuring out why a job that runs ok on many opensuse machines fails on a machine that runs a debian alpha distribution (customer demand). I already had to fix all kind of startup scripts due to the fact that sh(ell scripts) are run with dash which is incompatible so maybe I should have be more suspicious towards the os instead of trying to fix the tex end. Anyhow, one thing I noticed is that setuptex doesn't seem to work ok i.e. there is something wrong with determining $OWNPATH which makes the initialization fail. Maybe some volunteer can figure that out (there are some catches for other shells in the script too so adding yet another doesn't hurt). But, the biggest surprise (if I got it right) is that in some of the scripts that I use and run from within context, the to be produced results sometimes were there and sometimes not. This got obscured by the fact that in a second run the content actually was there (it has to be fetched from a remote database) but that code like page \pagenumber\ of \lastpage failed to report the right last page which in fact was a side effect of the first run not using content. Okay, it got somewhat more obscured by the fact that I used --runs=2 Accidentally, by adding more tracing code, I figured out is that I pipe the messages to a log file using which is pretty valid in bash but not so in dash where the puts the job in the background and thereby let the tex run carry on without waiting. So, it looks like we need to use filename 21 instead of filename. I checked the scripts in the context tree and so far found no occurences but first-setup.sh has two 's in it that might need fixing. 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 ___
Re: [NTG-context] Chinese setuplabeltext
On 30-10-2012 12:21, Sietse Brouwer wrote: John Devereux wrote: There do not seem to be translations for the labels for Chinese, is that correct? Is zh the correct language code? Wolfgang Schuster wrote: No, you need “cn” for chinese. Might it be advisable to add 'zh' as a synonym? Technically, 'cn' means the country China, and 'zh' means the Chinese language. (Country code vs. language code.) Thankfully 'cn' is not in use as a language code, so retaining it won't cause any collisions. we shouldn't confuse scripts with languages - 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] scripts
On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism I checked the scripts in the context tree and so far found no occurences but first-setup.sh has two 's in it that might need fixing. Hans -- Bill Meahan Westland, Michigan USA ___ 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] scripts
On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice on strict-POSIX shell scripting: https://wiki.ubuntu.com/DashAsBinSh#I_am_a_developer._How_can_I_avoid_this_problem_in_future.3F Pont ___ 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] scripts
On 30-10-2012 18:26, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is a good idea -) (i wouldn't be surprised if it can backfire badly in more complex situations) 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 ___
Re: [NTG-context] scripts
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice hm, so i wonder why setuptex fails on that box then (not that i care much as i can set the path) on strict-POSIX shell scripting: https://wiki.ubuntu.com/DashAsBinSh#I_am_a_developer._How_can_I_avoid_this_problem_in_future.3F yes but it renders past workflows pretty useless then .. anyway, someone has to adapt the installer scripts to such changes ok, context also changes, but a proper 'crash' is imo better than silent side effects .. in fact there the how-can is easy: use primitives only -) 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 ___
Re: [NTG-context] scripts
On Tue 30 Oct 2012, Hans Hagen wrote: FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice hm, so i wonder why setuptex fails on that box then (not that i care much as i can set the path) I was briefly confused as to why I (and other Ubuntu users) have never had a problem with setuptex... then I remembered that while sh links to dash (because it's fast), bash is still used explicitly as the default *login* shell (because it's featureful). So ‘source setuptex’ has always worked for me but would presumably give trouble in a non-login shell. Don't know how Debian does it. Pont ___ 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] scripts
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice on strict-POSIX shell scripting: https://wiki.ubuntu.com/DashAsBinSh#I_am_a_developer._How_can_I_avoid_this_problem_in_future.3F Mojca, we need to change such lines in first-setup: if which rsync /dev/null; then Maybe a dashing user can check it for more non posix things. 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 ___
Re: [NTG-context] scripts
On 30-10-2012 18:38, Pontus Lurcock wrote: On Tue 30 Oct 2012, Bill Meahan wrote: On 10/30/2012 01:20 PM, Hans Hagen wrote: filename 21 This has been the correct Bourne shell (POSIX) syntax for many years. I think it goes all the way back to Bell Labs V7 IIRC instead of filename. is a bash-ism FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice on strict-POSIX shell scripting: https://wiki.ubuntu.com/DashAsBinSh#I_am_a_developer._How_can_I_avoid_this_problem_in_future.3F This also needs checking (in setuptex): if [ z$BASH_SOURCE != z ]; then SCRIPTPATH=$BASH_SOURCE elif [ z$KSH_VERSION != z ]; then SCRIPTPATH=${.sh.file} else SCRIPTPATH=$0 fi OWNPATH=$(cd -P -- $(dirname -- $SCRIPTPATH) pwd -P) - 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] Search path for .tex files (mkiv)
Marco Patzer home...@lavabit.com writes: 2012-10-30 John Devereux: It looks like \usepath is the key to what I want, thank you. Yes, combine \usepath with the \startmodeset syntax that Wolfgang suggested and you should have a clean solution. I don't quite understand your overall structure. You're right. Without file names it's hard to follow, especially with the mistake I made. Is the * a literal * with some special meaning, or are you using it as a placeholder for something? It is a literal `*`. That means that the file name will be used as a component (or product) name. I am not using the project/product/component system, perhaps I should look into it again. Hmmm, alpha.tex defines component a, beta.tex defines b, is that right? No, that's my fault. Of course they have to match. Excellent, thanks to you and Wolfgang. -- John Devereux ___ 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] scripts
On 30-10-2012 18:50, Pontus Lurcock wrote: On Tue 30 Oct 2012, Hans Hagen wrote: FWIW, Debian and Ubuntu have a package ‘devscripts’ which includes a program ‘checkbashisms’ to catch such things (Ubuntu started using dash as the default sh back in 2006). Ubuntu also has some advice hm, so i wonder why setuptex fails on that box then (not that i care much as i can set the path) I was briefly confused as to why I (and other Ubuntu users) have never had a problem with setuptex... then I remembered that while sh links to dash (because it's fast), bash is still used explicitly as the default *login* shell (because it's featureful). So ‘source setuptex’ has always worked for me but would presumably give trouble in a non-login shell. Don't know how Debian does it. It somehow also works for me (i occasionally use a xubuntu vm) using . setuptex but that doesn't seem to work from another script. 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 ___
Re: [NTG-context] align and location in \setupcombination
Am 30.10.2012 um 13:36 schrieb Marco Patzer home...@lavabit.com: 2012-10-30 Wolfgang Schuster: \midaligned {\startcombination[2*1] {\externalfigure[dummy][]}{aa} {\externalfigure[dummy][]}{bb} \stopcombination} With the new beta you can replace \midaligned{…} with \startmidaligned … \stopmidaligned I already noted that. I appreciate the movement to a more uniform \start…\stop syntax. Not all people on the list to read the dev list :) Just a random thought: Would it be possible or even make sense to uniform the syntax even further and maybe merge the functionality into \startalignment? At the moment we have one command with an argument for alignments: \startalignment [right|middle|left] \input knuth \stopalignment however three different command for boxed alignments (furthermore, \startrightaligned works just the opposite of \startalignment[right]): \startrightaligned FooBar \stoprightaligned \startmidaligned FooBar \stopmidaligned \startleftaligned FooBar \stopleftaligned This might be easy to remember for us who still know the \midaligned{} syntax, but I guess for new users it's confusing. Additionally, the difference between the commands is unclear. What about an interface like this: \startlinealignment [right|middle|left] FooBar \stoplinealignment +1 Taking this one step further would be to merge both into one command: \startalignment [align=left, alternative=???] \input knuth \stopalignment \startalignment [align=left, alternative=!!!] FooBar \stopalignment Not sure if this method is too complicated for a few people. 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] align and location in \setupcombination
On 30-10-2012 18:57, Wolfgang Schuster wrote: Not all people on the list to read the dev list :) maybe we need a warning (like the mandate 'this site uses cookies' in NL) like 'if you read this message you agree not to complain about an undocumented feature' Just a random thought: Would it be possible or even make sense to uniform the syntax even further and maybe merge the functionality into \startalignment? At the moment we have one command with an argument for alignments: \startalignment [right|middle|left] \input knuth \stopalignment however three different command for boxed alignments (furthermore, \startrightaligned works just the opposite of \startalignment[right]): \startrightaligned FooBar \stoprightaligned \startmidaligned FooBar \stopmidaligned \startleftaligned FooBar \stopleftaligned This might be easy to remember for us who still know the \midaligned{} syntax, but I guess for new users it's confusing. Additionally, the difference between the commands is unclear. What about an interface like this: \startlinealignment [right|middle|left] FooBar \stoplinealignment +1 I've added something for you to check. Taking this one step further would be to merge both into one command: \startalignment [align=left, alternative=???] \input knuth \stopalignment \startalignment [align=left, alternative=!!!] FooBar \stopalignment Not sure if this method is too complicated for a few people. Indeed, 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 ___
Re: [NTG-context] align and location in \setupcombination
Am 30.10.2012 um 19:39 schrieb Hans Hagen pra...@wxs.nl: Additionally, the difference between the commands is unclear. What about an interface like this: \startlinealignment [right|middle|left] FooBar \stoplinealignment +1 I've added something for you to check. I found a typo: \unexpanded\def\leftaligned {\spac_align_wrapper_handle\v!left } -\unexpanded\def\midaligned {\spac_align_wrapper_handle\v!middle} +\unexpanded\def\middlealigned{\spac_align_wrapper_handle\v!middle} \unexpanded\def\rightaligned {\spac_align_wrapper_handle\v!right } \unexpanded\def\maxaligned {\spac_align_wrapper_handle\v!max } 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] align and location in \setupcombination
On 30-10-2012 20:04, Wolfgang Schuster wrote: I found a typo: fixed - 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] scripts
On 10/30/2012 01:39 PM, Hans Hagen wrote: sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is a good idea -) (i wouldn't be surprised if it can backfire badly in more complex situations) Hans My background is in commercial Unix and I've had situations like having to administer an HP box (HPUX) a Sun box (Solaris) a Teradata box (some flavor or other of SYS V R4) some BSD and Linux on the same day. :) Only thing I could count on was the official ATT Bourne shell syntax. I use ksh93 (the ATT distribution) as my login shell. -- Bill Meahan Westland, Michigan USA ___ 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] scripts
On 30-10-2012 22:33, Bill Meahan wrote: On 10/30/2012 01:39 PM, Hans Hagen wrote: sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is a good idea -) (i wouldn't be surprised if it can backfire badly in more complex situations) Hans My background is in commercial Unix and I've had situations like having to administer an HP box (HPUX) a Sun box (Solaris) a Teradata box (some flavor or other of SYS V R4) some BSD and Linux on the same day. :) Only thing I could count on was the official ATT Bourne shell syntax. I use ksh93 (the ATT distribution) as my login shell. This assumes control over the login shell as well as control over what the launchers of system processes use. I must admit that till now I always assumed some stability in this, which is probably okay as long as one sticks to one specific distribution (of linux). I think that the main problem is that #! /bin/sh can mean anything (although in your case I suppose you expect it to be the bourne shell). So the question is, should the scripts that come with context (like the installer) be explicit and become #! /bin/bash ? 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 ___
Re: [NTG-context] scripts
On Wed, Oct 31, 2012 at 12:21 AM, Hans Hagen pra...@wxs.nl wrote: On 30-10-2012 22:33, Bill Meahan wrote: On 10/30/2012 01:39 PM, Hans Hagen wrote: sure, till one replaces bash by something non-bash-ish while the user still thinks he's running bash (i always fear the moment that someone decides that swapping the 'cp' arguments without renaming the command is a good idea -) (i wouldn't be surprised if it can backfire badly in more complex situations) Hans My background is in commercial Unix and I've had situations like having to administer an HP box (HPUX) a Sun box (Solaris) a Teradata box (some flavor or other of SYS V R4) some BSD and Linux on the same day. :) Only thing I could count on was the official ATT Bourne shell syntax. I use ksh93 (the ATT distribution) as my login shell. This assumes control over the login shell as well as control over what the launchers of system processes use. I must admit that till now I always assumed some stability in this, which is probably okay as long as one sticks to one specific distribution (of linux). I think that the main problem is that #! /bin/sh can mean anything (although in your case I suppose you expect it to be the bourne shell). So the question is, should the scripts that come with context (like the installer) be explicit and become #! /bin/bash ? In my opinion, yes. And then bash first-setup.sh and source setuptex are ok. -- luigi ___ 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] scripts
On 10/30/2012 07:21 PM, Hans Hagen wrote: So the question is, should the scripts that come with context (like the installer) be explicit and become #! /bin/bash ? Hans If you're depending on specific syntax or features of bash, that would be the way to go. I suspect most/all Linux and BSD distributions come with bash, even if it's not the default shell. Solaris or HPUX or AIX not so much. Since I didn't always have root, I couldn't install bash even if I wanted to so I stuck to Bourne shell. KSH93 is a superset but 100% upwards compatible so anything written for the Bourne shell will run as expected. Not quite sure what PDKSH does. -- Bill Meahan Westland, Michigan USA ___ 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 ___