Re: [NTG-context] How to call a ctx command with parameters from Lua
... Thanks, Wolfgang. Lukas On Thu, 14 Oct 2010 22:43:44 +0200, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: context.typefile( { default }, MyFile.txt ) 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] modes
Am 2010-10-14 um 15:57 schrieb Hans Hagen: (for module writers) The latest beta gives access to modes at the lua end Wikified (unmodified): http://wiki.contextgarden.net/Modes#Modes_in_LuaTeX Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] \typefile from n-th line
Hello, I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). Is there such an option for \typefile macro? (http://wiki.contextgarden.net/Reference/en/typefile is silent.) I tried: \typefile[default][lines={10}]{a_file.txt} % Start at line 10 \typefile[default][lines={10,+1}]{a_file.txt} % Start at line 10, step = 1 \typefile[default][start=10]{a_file.txt} % Start at line 10 \typefile[default][from=10]{a_file.txt} % Start at line 10 No success. (The last Ctx minimals, WinXP.) Lukas ___ 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] Access figure data?
Am 15.10.2010 07:16, schrieb Peter Münster: On Thu, Oct 14 2010, Peter Rolf wrote: Nice to have. Is this also possible from the lua side? Hello, Perhaps with the img library of luatex (see luatex manual). Thanks Peter! Stupid me haven't thought about the luatex manual. local f = img.scan{ filename = cow.jpg } print(xsize = ,f.xsize,, ysize = ,f.ysize) Best wishes, 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 ___
Re: [NTG-context] \typefile from n-th line
2010/10/15 Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz: Hello, I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). Is there such an option for \typefile macro? (http://wiki.contextgarden.net/Reference/en/typefile is silent.) I tried: \typefile[default][lines={10}]{a_file.txt} % Start at line 10 \typefile[default][lines={10,+1}]{a_file.txt} % Start at line 10, step = 1 \typefile[default][start=10]{a_file.txt} % Start at line 10 \typefile[default][from=10]{a_file.txt} % Start at line 10 No success. (The last Ctx minimals, WinXP.) Lukas Not an answer, but quick recipe: With mkiv is trivial ; use lua to skip the first n-1 lines. With mkii just use luatex as lua interpreter to call with \executesystemcommand and then see previous point. -- 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] \typefile from n-th line
Am 2010-10-15 um 09:16 schrieb Procházka Lukáš Ing. - Pontex s. r. o.: I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). \typefile[default][start=10]{a_file.txt} % Start at line 10 According to older ML messages and the source, \typefile[start=10] should work. Maybe it need stop also? Otherwise it's undocumented. see http://source.contextgarden.net/tex/context/base/buff-ver.mkii?search=typefile (MkII) http://source.contextgarden.net/tex/context/base/buff-ver.mkiv?search=typefile (MkIV) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] \typefile from n-th line
On Fri, Oct 15 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote: I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). \starttext% 1 \typefile[range=3]{test.tex} % 2 bla % 3 bla % 4 bla % 5 bla % 6 \stoptext % 7 See also: http://tracker.luatex.org/view.php?id=475 Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] \typefile from n-th line
Hello, it doesn't seem to work. Let's have t-TypeF2.mkiv with the following content: --- \setuptyping[default][bodyfont=small,style={\ttx\setupinterlinespace}] % 1 % 2 \starttext % 3 \typefile[default][start=4]{t-TypeF2.mkiv} % = This file; 4 \typefile[default][start=4,stop=99]{t-TypeF2.mkiv} % = This file; 5 \typefile[default][lines={4,+1}]{t-TypeF2.mkiv} % = This file; 6 \stoptext % 7 --- If you see the result, all lines are printed in all cases. Moreover, 4 and 99 are also printed in the front and at the end of the typed file in the second case. 2Luigi: Not an answer, but quick recipe: With mkiv is trivial ; use lua to skip the first n-1 lines. With mkii just use luatex as lua interpreter to call with \executesystemcommand and then see previous point. I had also such idea, but I believed to be simply solvable even with the existing \typefile command - supposing there is start/stop line option (or it couldn't be so complicated to provide them). So I supposed the valid syntax is unknown for me. Lukas On Fri, 15 Oct 2010 10:00:10 +0200, Henning Hraban Ramm hra...@fiee.net wrote: \typefile[default][start=10]{a_file.txt} % Start at line 10 According to older ML messages and the source, \typefile[start=10] should work. Maybe it need stop also? Otherwise it's undocumented. see http://source.contextgarden.net/tex/context/base/buff-ver.mkii?search=typefile (MkII) http://source.contextgarden.net/tex/context/base/buff-ver.mkiv?search=typefile (MkIV) -- 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-TypeF2.mkiv Description: Binary data t-TypeF2.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] \typefile from n-th line
... Yes, thanks, that's it: \typefile[default][range={3,5}]{t-TypeF2.mkiv} % If also the upper limit is to be specified Regards, Lukas On Fri, 15 Oct 2010 10:09:13 +0200, Peter Münster pmli...@free.fr wrote: On Fri, Oct 15 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote: I'd need to \typefile a file from n-th line (= ignoring first n-1 lines). \starttext% 1 \typefile[range=3]{test.tex} % 2 bla % 3 bla % 4 bla % 5 bla % 6 \stoptext % 7 See also: http://tracker.luatex.org/view.php?id=475 Cheers, Peter -- 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 ___ 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] A few puzzling problems (bugs?) with enumerations
Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. After fixing that in my code, theorems now have proper numbers and references to theorems work properly too. However, \starttheorem[number=no] blah \stoptheorem and \starttheorem[-] blih \stoptheorem still don't work as expected inside sections, and I still have problem 1 listed in one of my previous emails, namely Any ideas? On a sidenote, I would like to contribute to the wiki or whatever is the main documentation source of the ConTeXt project something to document those parameters that are specific de \setupenumerations. The context reference manual and the wiki both just refer to \setupdescriptions yet there are a number of parameters that don't exist for \setupdescriptions, such as number, counter, prefix, prefixcomponents, etc. Many thanks, Mathieu On Wed, Oct 13, 2010 at 12:57 PM, Mathieu Boespflug 0xbadc...@gmail.com wrote: Also, I notice that the context reference manual from the svn repository at supelec has the same problem when built with the latest beta (p 241). -- Mathieu On Wed, Oct 13, 2010 at 12:08 PM, Mathieu Boespflug 0xbadc...@gmail.com wrote: Hi, using the latest beta, I've had a bunch of problems using enumerations in mkiv. Earlier betas have had the same problems. Consider the following document: \defineenumeration [definition] [ text=Definition, title=yes, list=all, listtext={Definition }] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, number=definition, listtext={Theorem }] \defineenumeration [proof] [ text=Proof, number=no, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal] \starttext blah blah \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof \section{Inside sections} \subsection{Inside subsections} \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem[thm:pnp] $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof Let's talk about \in{theorem}[thm:pnp]. \stoptext I see five problems : 1. Even when the enumeration has no title, the parentheses appear. Judging by Aditya's code in his MyWay on theorems, it used to be that when there is no title, the parens don't appear. How do I recover this behaviour? 2. I want the theorem enumeration to share its number with the definition environment. That doesn't seem to work. Outside of any section, the theorem just doesn't have any number. Inside a section, the theorem very oddly displays the section number. 3. I want the proof enumeration to have no number. That doesn't work inside a section. As for the theorem enumeration, the section number is printed even though here i requested no number at all! 4. Suppressing the number for a specific enumeration using the [-] switch doesn't work. As before, inside a section, the section number appears instead of no number. 5. Citing a specific theorem using \in{theorem}[thm:pnp] doesn't show the number of a theorem. I'm guessing the last four points are all related. Best regards, Mathieu ___ 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] Extra spaces in APA bibliography style
Hi, I just noticed that there is an extra space after the booktitle and before ', pages' in the publicationlayout inproceedings in the english APA bibliography style. Here is a suggested patch: --- texmf-context/tex/context/bib/bibl-apa.tex.orig 2009-01-05 15:03:34.0 +0100 +++ texmf-context/tex/context/bib/bibl-apa.tex 2010-10-15 11:47:41.0 +0200 @@ -307,7 +307,7 @@ {}% {}% \insertchap{\unskip, }{ }{ }% - \insertpages{, pages~}{}{}% + \insertpages{\unskip, pages~}{}{}% \insertorg{. }{.}{.}% }% {In \insertcrossref{}{}{}% Best, Florian ___ 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] en-dash for ranges of numbers in Bibliographies
Hi, in BibTeX databases ranges of numbers are usually listed with a single dash (e.g. 3-7) for compatibility reasons. Therefore the standard BibTeX styles convert a single dash in page numbers or range of numbers to a double dash (3--7). How do I get the same behaviour for \volume \issue \pages in the bibliographic module? Thanks! Cheers, Florian ___ 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] A few puzzling problems (bugs?) with enumerations
Am 15.10.2010 um 10:20 schrieb Mathieu Boespflug: Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. After fixing that in my code, theorems now have proper numbers and references to theorems work properly too. \unprotected\def\doenumerationextratext {\doif{\descriptionparameter\c!title}\v!yes {\doifsomething\@@dodoenumerationtext % WS: added this test {\begingroup \dosetdescriptionattributes\c!titlestyle\c!titlecolor \hskip\descriptionparameter\c!titledistance \descriptionparameter\c!titlecommand {\descriptionparameter\c!titleleft \begstrut\@@dodoenumerationtext\endstrut \descriptionparameter\c!titleright}% \endgroup}}} \unprotected\def\doenumerationfullnumber#1% text, title {\begingroup \dosetdescriptionattributes\c!headstyle\c!headcolor \the\everyenumeration %\descriptionparameter\c!command{\strut#1\doenumerationnumber\doenumerationextratext}% \descriptionparameter\c!command{\strut#1\ifconditional\enumerationnumberenabled\doenumerationnumber\fi\doenumerationextratext}% \endgroup} 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] Problem with \date command
Hi all, Today I wanted to use the command \date[d=15,m=10,y=2010][weekday]. It gives Friday as it should. However \date[d=2,m=1,y=2011][weekday] gives the same result which is wrong (it's a Sunday). In fact, whatever the supplied date, it gives Friday. I guess the parameter isn't taken into account here. Bug or feature? -- Cédric ___ 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] Problem with \date command
On Fri, Oct 15 2010, Cedric Mauclair wrote: Today I wanted to use the command \date[d=15,m=10,y=2010][weekday]. It gives Friday as it should. However \date[d=2,m=1,y=2011][weekday] gives the same result which is wrong (it's a Sunday). In fact, whatever the supplied date, it gives Friday. I guess the parameter isn't taken into account here. No problem here: \starttext \doifmodeelse{mkiv}{MKIV}{MKII}: Sunday = \date[d=2,m=1,y=2011][weekday] ? \stoptext Perhaps you use a very old version? There was a bug more than 2 years ago: http://archive.contextgarden.net/message/20080331.082509.7fc304a9.en.html Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] Problem with \date command
I use the minimal from 3 days ago. Here is what I do actually. \def\mydate{\doifnextcharelse\space\domydate\domydate } \def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]} \mydate 2/1/2011 -- Friday 2 january 2011 \date[d=2,m=1,y=2011][weekday,day+,month,year] -- Sunday 2 january 2011 Any ideas? -- Cédric On Fri, Oct 15, 2010 at 15:14, Peter Münster pmli...@free.fr wrote: \doifmodeelse{mkiv}{MKIV}{MKII}: Sunday = \date[d=2,m=1,y=2011][weekday] ? ___ 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] Problem with \date command
On Fri, Oct 15 2010, Cedric Mauclair wrote: Any ideas? Test file: \def\mydate{\doifnextcharelse\space\domydate\domydate } \def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]} \starttext \mydate 2/1/2011 \par % token #3 = 2 \mydate 2/1/2 \par % token #3 = 2 \mydate 2/1/{2011} \par % token #3 = 2011 \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] Problem with \date command
Right, I forgot about the catcodes. Thank you. -- Cédric On Fri, Oct 15, 2010 at 15:37, Peter Münster pmli...@free.fr wrote: On Fri, Oct 15 2010, Cedric Mauclair wrote: Any ideas? Test file: \def\mydate{\doifnextcharelse\space\domydate\domydate } \def\domydate #1/#2/#3{\date[d=#1,m=#2,y=#3][weekday,day+,month,year]} \starttext \mydate 2/1/2011 \par % token #3 = 2 \mydate 2/1/2 \par % token #3 = 2 \mydate 2/1/{2011} \par % token #3 = 2011 \stoptext Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] Furigana
Thank you, it's almost working. I am making use of projects, products, environments and components. My \usemodule[ruby] sits in my environment file, but I'm using the \ruby command down in the component file. The environment is only called in the project file, but the component links back to the product (with \product - I guess that's how you do it?) and the product back to the project. The error occurs, no matter at which level (project/product/component) I am compiling. Do I really need to call the module in each component? I thought the component should trace back to the higher levels to find which modules to load... Many thanks for your quick answers, Severin I am looking to add furigana (readings) above the Kanji (Chinese characters) in a Japanese text. In XeTeX I'd be used to something translating to \usemodule[simplefonts] \usemodule[ruby] \starttext \ruby{??}{}? \stoptext What would be the correct command for mkiv? You wrote it yourself above but you need at least a font with japanese characters. 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] A few puzzling problems (bugs?) with enumerations
Wow, thank you very much for your fix, Wolfgang! I can confirm that it works. I hope this fix makes it into the next beta? Abount documenting these extra parameters that \setupenumerations has over \setupdefinitions, I figure that I should contribute that to the wiki. But I wonder, how does this kind of user generated documentation on the wiki get synchronized with the ConTeXt Reference manual hosted at Supelec? -- Mathieu On Fri, Oct 15, 2010 at 1:19 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 15.10.2010 um 10:20 schrieb Mathieu Boespflug: Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. After fixing that in my code, theorems now have proper numbers and references to theorems work properly too. \unprotected\def\doenumerationextratext {\doif{\descriptionparameter\c!title}\v!yes {\doifsomething\@@dodoenumerationtext % WS: added this test {\begingroup \dosetdescriptionattributes\c!titlestyle\c!titlecolor \hskip\descriptionparameter\c!titledistance \descriptionparameter\c!titlecommand {\descriptionparameter\c!titleleft \begstrut\@@dodoenumerationtext\endstrut \descriptionparameter\c!titleright}% \endgroup}}} \unprotected\def\doenumerationfullnumber#1% text, title {\begingroup \dosetdescriptionattributes\c!headstyle\c!headcolor \the\everyenumeration %\descriptionparameter\c!command{\strut#1\doenumerationnumber\doenumerationextratext}% \descriptionparameter\c!command{\strut#1\ifconditional\enumerationnumberenabled\doenumerationnumber\fi\doenumerationextratext}% \endgroup} 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] A few puzzling problems (bugs?) with enumerations
But I wonder, how does this kind of user generated documentation on the wiki get synchronized with the ConTeXt Reference manual hosted at Supelec? How do you think? There are little dwarves collecting the data and doing semantic analysis on it in order to update the reference manual periodically (every hour during business days, every third hours on week-ends and holidays, and once a day when the griffins are on strike protesting about their retirement plan). Seriously, it is manually edited, which is the only way to make a consistent document. For several years, there has been one single person writing it, namely Taco, and very few proofreaders, despite his repeated requests for feedback. This makes any progress verry difficult. And Taco is more of the elven kind anyway. Arthur ___ 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] Is it possible to pass unmarked paragraphs into Lua for processing
I confess, I hadn't considered anything quite so bold as reading the whole of the text into Lua and then processing it back out. I suppose I was expecting one of the true TeXperts to offer suggestions involving \appendtoks ... \to \everypar. I also realized that I forgot to mention that I want to be able to do this all while using the ConTeXt project/product/component support. Any other suggestions on how I could process unmarked paragraphs in Lua? Kevin On Thu, Oct 14, 2010 at 3:48 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 Oct 2010, Kevin D. Robbins wrote: Hi all, I am wondering if and how it might be possible to catch all unmarked paragraphs in a TeX file and pass them into Lua. So, in the following example, each of the first three unmarked paragraphs would be passed to the Lua function process_paragraph for optional processing, but the fourth paragraph between \startmarkedparagraph...\stopmarkedparagraph would not be passed to process_paragraph. If you are willing to add some more markup, then you can do \starttext \startMarking ... \startmarkedparagraph ... \stopmarkedparagraph \stopMarking \stoptext where \startMarking .. \stopMarking passes everything to lua ( http://wiki.contextgarden.net/Programming_in_LuaTeX#Manipulating_verbatim_text_for_dummies) and you can then search for \startmarkedparagraph ... \stopmarkedparagraph in lua. Or you could just redefine \starttext ... \stoptext to do the capturing. Something like: \let\normalstarttext\starttext \let\normalstoptext\stoptext \def\starttext{} And in the lua end call \normalstarttext before starting typesetting and \normalstoptext after all typesetting is done. 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] A few puzzling problems (bugs?) with enumerations
On Fri, 15 Oct 2010, Mathieu Boespflug wrote: Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. Partly my fault. I requested some of the features that are in that article but haven't really tested them in MkIV. On a sidenote, I would like to contribute to the wiki or whatever is the main documentation source of the ConTeXt project something to document those parameters that are specific de \setupenumerations. The context reference manual and the wiki both just refer to \setupdescriptions yet there are a number of parameters that don't exist for \setupdescriptions, such as number, counter, prefix, prefixcomponents, etc. Adding the missing options to the wiki is a good start. Currently, there is no syncing between the wiki and the cont-en.xml file (in texmf-context/tex/context/interface) that was used to generate that content. You could simulaneously add the appropriate keys to cont-en.xml and send the diff file to Hans. (There were plans to reimplement that in lua, but I do not know what is the current state of it). It will be nice to have a comprehensive wiki page on enumerations. 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] Thesis example, source files
On Mon, 4 Oct 2010, Shishir Kumar wrote: I am a PhD student and am starting on writing my thesis. I have looked at Aditya's and The Thanh's thesis, and they are very nice. Unfortunately, I could not find the sources for these. Does anybody know if they are available somewhere? It would be nice to have them on the wiki. Reuploaded at http://www.eecs.umich.edu/~adityam/projects/thesis/thesis.zip (ConTeXt now runs bibtex automatically and my hand tuned bbl files gets overwritten. I have not bothered to change the souce to prevent that) 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] How to set the caption length?
When a figure is placed, but this figure size is much smaller than the textwidth, the caption length will adjust after the figure size. \placefigure [][fig:xxx] {} {\externalfigure[xxx]} when set the figure size to an arbitrary size, the caption length will also change. But what I expect is, i change the figure size, but the caption size is always the textwith, or i can set it arbitrarily, for example 90% of the text size. I know it should be very easy, but honestly, i do not know. ___ 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 ___