[NTG-context] export images
Dear gang, How do we get images in the export? Here is my sample (also attached): == \setupbackend[export=yes] \starttext \startalignment [middle] \dontleavehmode \externalfigure[mill.png] \stopalignment \stoptext == div output: == == So it seems that \externalfigure[mill.png] is tagged in the output but the image itself is ignored. What am I missing here? pdf output is correct; I copied mill.png from the context sample folder /tex/texmf-context/tex/context/sample/mill.png (png too big to attach here) Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 mill.tex Description: TeX 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] define macros only visible in a definestartstop-block that have arguments?
OK, took me a while to figure out that this was not an empty response but an attachement was available ;) I did a quick test run and realized that it seems to do what I want, I'll take a further look into it tommorrow, thank you! 2015-03-20 17:23 GMT+01:00 Hans Hagen : > On 3/20/2015 12:05 PM, Norbert Melzer wrote: > >> Hi! >> >> I have trouble to define macros which are only visible inside a block >> defined using `\definestartstop`: >> >> ```tex >> \setuppapersize[A6] >> \definestartstop[Foo][before={Foo}] >> \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] >> %\definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}} >> ,after={\egroup}] >> >> \starttext >>\startFoo >> Bar >>\stopFoo >> >>\startBar >> \Foo Bar >>\stopBar >> >> % \startBaz >> %\Foo{Bar} >> % \stopBaz >> \stoptext >> ``` >> >> The code as above works and typesets "FooBar" on two separate lines. But >> if I uncomment everything `Baz`-related, I end up with the following >> error: >> >> ```plain >> tex error > error on line 4 in file C:/HIDDEN/mwe.tex: ! Illegal >> parameter number in definition of \m_syst_action_yes >> >> 1 >> ...{Baz}][{before={\bgroup \define [1]\Foo {Foo##1 >>}},after={\egroup }}] >> \doifnextoptionalelse ...ef \m_syst_action_yes {#1 >>}\def >> \m_syst_action_nop {... >> l.4 ...bgroup\define[1]\Foo{Foo#1}},after={\egroup}] >> 1 \setuppapersize[A6] >> 2 \definestartstop[Foo][before={Foo}] >> 3 >> \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] >> 4 >> >> \definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}}, >> after={\egroup}] >> 5 >> 6 \starttext >> 7 \startFoo >> 8 Bar >> 9 \stopFoo >> 10 >> 11 \startBar >> 12 \Foo Bar >> 13 \stopBar >> 14 >> ``` >> >> Can someone help me get this running? >> >> >> >> ___ >> 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 >> >> ___ >> >> > > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] mkiv versus mkii: whitespace issues
> Am 20.03.2015 um 14:43 schrieb Gerben Wierda : > > Sorry to ask again, but is there no solution? Can you send a *working* minimal example! 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] define macros only visible in a definestartstop-block that have arguments?
On 3/20/2015 12:05 PM, Norbert Melzer wrote: Hi! I have trouble to define macros which are only visible inside a block defined using `\definestartstop`: ```tex \setuppapersize[A6] \definestartstop[Foo][before={Foo}] \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] %\definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}},after={\egroup}] \starttext \startFoo Bar \stopFoo \startBar \Foo Bar \stopBar % \startBaz %\Foo{Bar} % \stopBaz \stoptext ``` The code as above works and typesets "FooBar" on two separate lines. But if I uncomment everything `Baz`-related, I end up with the following error: ```plain tex error > error on line 4 in file C:/HIDDEN/mwe.tex: ! Illegal parameter number in definition of \m_syst_action_yes 1 ...{Baz}][{before={\bgroup \define [1]\Foo {Foo##1 }},after={\egroup }}] \doifnextoptionalelse ...ef \m_syst_action_yes {#1 }\def \m_syst_action_nop {... l.4 ...bgroup\define[1]\Foo{Foo#1}},after={\egroup}] 1 \setuppapersize[A6] 2 \definestartstop[Foo][before={Foo}] 3 \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] 4 >> \definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}},after={\egroup}] 5 6 \starttext 7 \startFoo 8 Bar 9 \stopFoo 10 11 \startBar 12 \Foo Bar 13 \stopBar 14 ``` Can someone help me get this running? ___ 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 ___ -- - 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 - setups-003.tex Description: TeX 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] # in file name
On 3/20/2015 2:25 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, I need to insert a figure "PrehlSit#A2.pdf" - a file whose name contains # - by Lua. How to "code" the name? I tried: \startluacode context.pagefigure({PrehlSit#A2.pdf"}, {scale=500}) context.pagefigure({PrehlSit\#A2.pdf"}, {scale=500}) context.pagefigure({PrehlSit##A2.pdf"}, {scale=500}) \stopluacode But nothing works. one can flush with verbatim catcodes but another solution is: foo\\letterhash bar How to "code" the file name? (BTW: I'm aware that # in file names is not recommended. But files with # mean "final" among all files I (and others) are working on, so keeping # in the file name (like a flag) is really desirable.) Best regards, Lukas -- - 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] mkiv versus mkii: whitespace issues
Sorry to ask again, but is there no solution? G On 16 Mar 2015, at 15:03, Gerben Wierda wrote: > > On 15 Mar 2015, at 23:24, Wolfgang Schuster > wrote: > >> >>> Am 14.03.2015 um 15:54 schrieb Gerben Wierda : >>> >>> I am running into two issues with my mkii-to-mkiv conversion project >>> >>> - The \chapter command in mkiv uses more whitespace between the header and >>> the first paragraph. How can I influence this? >> >> The different space before the \chapter is caused by the “fixed” keyword for >> \blank >> which produce different result with MkII and MkIV and the MkIV behaviour need >> to be corrected. >> >> The space after \chapter comes from your \writetolist entry and you can >> correct >> this with the \GotoPar command at the end of the entry as shown below. >> >> begin example >> \showgrid >> >> \setuphead[chapter][before={\blank[force,2*line]}] >> >> \starttext >> >> \chapter{Knuth} >> >> \writetolist[chapter]{}{}\GotoPar >> >> \input knuth >> >> \stoptext >> end example > > Thanks. I tried this > > % Every chapter starts with a quote on the LHS page: > \setuphead > [chapter] > [page=, >before={\setups[chapter:before]}, >after={\setups[chapter:after]}] > > \startsetups chapter:before > \page[left] > \noheaderandfooterlines > \startalignment[left,nothyphenated] > \startnarrower[4*left] > \em \getbuffer[chapter:quote] > \stopnarrower > \stopalignment > \resetsetups[quote:text] > \page[right] > \noheaderandfooterlines > \blank[force,2*big] > \stopsetups > > \startsetups chapter:after > \blank[3*big] > \stopsetups > > \definelist[chaptertext] > \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument] > \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}\GotoPar} > > > (Adding the \GotoPar at the end) but it did not had any effect. At one place > (no chapter but an unnumbered title, it doesn’t work as well. Here I now have: > > \title[h:grief1]{Intermezzo:\\ > A short story about grief} > \writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar > \ChapterAbstract{A small fragment of a movie script that beautifully > illustrates the gap between the rational and the real.} > > I changed it to > \title[h:grief1]{Intermezzo:\\ > A short story about grief} > \writetolist[chapter]{}{Intermezzo: A Short Story about Grief}\GotoPar > \ChapterAbstract{A small fragment of a movie script that beautifully > illustrates the gap between the rational and the real.}\GotoPar > > And that works. So I changed it in another chapter to > > \chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti} > \ChapterAbstract{Starting with an example of how things can go wrong in a > current Business-IT landscape, we notice that these kinds of problems have > existed almost for as long as IT has existed, and that no proposed `silver > bullet' has ever solved them. The goal of the book is introduced.}\GotoPar > > \placeinitial S{\kap{\bf uppose we}} have a system for the approval of loans. > The > business logic has been put into a Business Rule Engine (BRE) > system\footnote{If you are not technical and terms like `application server', > > But there it doesn’t. Apparently, I am still missing something. > > G > > >> >> 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 > ___ ___ 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] # in file name
Hello, I need to insert a figure "PrehlSit#A2.pdf" - a file whose name contains # - by Lua. How to "code" the name? I tried: \startluacode context.pagefigure({PrehlSit#A2.pdf"}, {scale=500}) context.pagefigure({PrehlSit\#A2.pdf"}, {scale=500}) context.pagefigure({PrehlSit##A2.pdf"}, {scale=500}) \stopluacode But nothing works. How to "code" the file name? (BTW: I'm aware that # in file names is not recommended. But files with # mean "final" among all files I (and others) are working on, so keeping # in the file name (like a flag) is really desirable.) 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 241 096 751 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 ___
[NTG-context] define macros only visible in a definestartstop-block that have arguments?
Hi! I have trouble to define macros which are only visible inside a block defined using `\definestartstop`: ```tex \setuppapersize[A6] \definestartstop[Foo][before={Foo}] \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] %\definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}},after={\egroup}] \starttext \startFoo Bar \stopFoo \startBar \Foo Bar \stopBar % \startBaz %\Foo{Bar} % \stopBaz \stoptext ``` The code as above works and typesets "FooBar" on two separate lines. But if I uncomment everything `Baz`-related, I end up with the following error: ```plain tex error > error on line 4 in file C:/HIDDEN/mwe.tex: ! Illegal parameter number in definition of \m_syst_action_yes 1 ...{Baz}][{before={\bgroup \define [1]\Foo {Foo##1 }},after={\egroup }}] \doifnextoptionalelse ...ef \m_syst_action_yes {#1 }\def \m_syst_action_nop {... l.4 ...bgroup\define[1]\Foo{Foo#1}},after={\egroup}] 1 \setuppapersize[A6] 2 \definestartstop[Foo][before={Foo}] 3 \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}] 4 >> \definestartstop[Baz][before={\bgroup\define[1]\Foo{Foo#1}},after={\egroup}] 5 6 \starttext 7 \startFoo 8 Bar 9 \stopFoo 10 11 \startBar 12 \Foo Bar 13 \stopBar 14 ``` Can someone help me get this running? ___ 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 ___