Hey list, I can't recall if either I explicitly changed something in my ConTeXt typesetting or if this happened with the most recent version of ConTeXt I pulled from Adam's PPA. I am using version 2011.11.02 20:10. Here is a minimal example: \definestartstop [CodeExample] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground \startlines }, after={ \stoplines \stopbackground \crlf }, commands={\setupalign[right]}, style=type] \starttext Hello World \startCodeExample \starttyping Hello World Again \stoptyping \stopCodeExample \stoptext Here is the output: $ context foo.tex resolvers | resolving | loading configuration file 'selfautodir:/share/texmf/web2c/contextcnf.lua' resolvers | resolving | loading configuration file '/usr/share/texmf/web2c/contextcnf.lua' mtx-context | run 1: luatex --fmt="/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en" --lua="/home/kip/.texmf-var/luatex-cache/context/e570cb3e0e3ab0118ca08dd148bbec7d/formats/cont-en.lui" --backend="pdf" "./foo.tex" \stoptext This is LuaTeX, Version beta-0.71.0-2011101421 (rev 4358) \write18 enabled. resolvers > resolving > loading configuration file '/usr/share/texmf/web2c/contextcnf.lua' (foo.tex ConTeXt ver: 2011.11.02 20:10 MKIV fmt: 2011.11.2 int: english/english system > cont-new.mkiv loaded (/usr/share/texmf/tex/context/base/cont-new.mkiv system > beware: some patches loaded from cont-new.mkiv ) system > foo.top loaded (foo.top) fonts > latin modern fonts are not preloaded languages > language en is active {/usr/share/texmf/fonts/map/pdftex/context/mkiv-base.map} fonts > preloading latin modern fonts (second stage) (/usr/share/texmf/tex/context/base/type-siz.mkiv) (/usr/share/texmf/tex/context/base/type-otf.mkiv) files > readfile > asked name: 'loc', not found {/usr/share/texmf/fonts/map/dvips/lm/lm-math.map}{/usr/share/texmf/fonts/map/dvips/lm/lm-rm.map} fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath7-Regular subfont 9 with name stmary10.afm at 458752 is skipped, not found fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath9-Regular subfont 9 with name stmary10.afm at 589824 is skipped, not found fonts > defining > forced type afm of stmary10 not found fonts > defining > font with asked name 'stmary10' is not found using lookup 'file' fonts > virtual math > loading font LMMath12-Regular subfont 9 with name stmary10.afm at 786432 is skipped, not found fonts > fallback modern rm 12pt is loaded Underfull \hbox (badness 10000) in paragraph at lines 25--26 ! TeX capacity exceeded, sorry [input stack size=10000]. \obeylines ...andafter \def \activeendoflinetoken {\obeyedline } \dostarttyping ...f \currenttyping {#1}\obeylines \futurelet \nexttoken \dod... \obeyedline ...ed \t!line \empty \futurelet \next \dobetweenthelines \obeylines ...andafter \def \activeendoflinetoken {\obeyedline } \dostarttyping ...f \currenttyping {#1}\obeylines \futurelet \nexttoken \dod... \obeyedline ...ed \t!line \empty \futurelet \next \dobetweenthelines ... l.29 \stoptyping ! ==> Fatal error occurred, no output PDF file produced! mtx-context | fatal error: return code: 1 Any help appreciated. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
Am 03.11.2011 um 03:41 schrieb Kip Warner:
Hey list,
I can't recall if either I explicitly changed something in my ConTeXt typesetting or if this happened with the most recent version of ConTeXt I pulled from Adam's PPA. I am using version 2011.11.02 20:10.
Here is a minimal example: \definestartstop [CodeExample] [before={ \crlf \setupbackground[frame=on, before=\blank, after=\blank, corner=round, topoffset=0.5cm, leftoffset=0.5cm, rightoffset=0.5cm, bottomoffset=0.5cm] \startbackground \startlines }, after={ \stoplines \stopbackground \crlf }, commands={\setupalign[right]}, style=type]
??? \defineframedtext [CodeExampleFrame] [before=\blank, after=\blank, corner=round, offset=0.5cm] \definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame] \starttext Hello World \startCodeExample Hello World Again \stopCodeExample \stoptext or \definetextbackground [CodeExampleFrame] [before=\blank, after=\blank, corner=round, frame=on, background=, location=paragraph, topoffset=0.5cm, leftoffset=0.5cm] \definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame] \starttext Hello World \startCodeExample Hello World Again \stopCodeExample \stoptext Wolfgang
On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote:
???
What's wrong?
\defineframedtext [CodeExampleFrame] [before=\blank, after=\blank, corner=round, offset=0.5cm]
\definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame]
\starttext
Hello World
\startCodeExample Hello World Again \stopCodeExample
\stoptext
or
\definetextbackground [CodeExampleFrame] [before=\blank, after=\blank, corner=round, frame=on, background=, location=paragraph, topoffset=0.5cm, leftoffset=0.5cm]
\definetyping [CodeExample] [before=\startCodeExampleFrame, after=\stopCodeExampleFrame]
Ok, this latter method works, but the frame is gone now around it. How do I get it back? Thanks Wolfgang. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
Am 04.11.2011 um 02:33 schrieb Kip Warner:
On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote:
???
There was so many nonsense on your definition for your CodeExample environment, I don’t know where you found the code but I’m going to explain what was wrong, this will help you write something better next time. What you defined was the following piece of code: \crlf \setupbackground[..,.=.,..] \startbackground \startlines[style=type] \setupalign[right] \starttyping … \stoptyping \stoplines \stopbackground \crlf 1. You used \crlf to add a empty line at the begin and end of the environment, better is to use \blank or \blank[line]. 2. You used the lines environment but it useless here because the typing environment already takes care that each line in the input is also line of its own in the output. 3. The style “type” is also useless because typing will overwrite this setting with its own style which is also “type”. 4. The alignment setup is another setting which is ignored because typing itself has a align key which is used. Wolfgang
On Fri, 2011-11-04 at 15:15 +0100, Wolfgang Schuster wrote:
Am 04.11.2011 um 02:33 schrieb Kip Warner:
On Thu, 2011-11-03 at 05:26 +0100, Wolfgang Schuster wrote:
???
There was so many nonsense on your definition for your CodeExample environment, I don’t know where you found the code but I’m going to explain what was wrong, this will help you write something better next time.
What you defined was the following piece of code:
\crlf \setupbackground[..,.=.,..] \startbackground \startlines[style=type] \setupalign[right] \starttyping … \stoptyping \stoplines \stopbackground \crlf
1. You used \crlf to add a empty line at the begin and end of the environment, better is to use \blank or \blank[line].
2. You used the lines environment but it useless here because the typing environment already takes care that each line in the input is also line of its own in the output.
3. The style “type” is also useless because typing will overwrite this setting with its own style which is also “type”.
4. The alignment setup is another setting which is ignored because typing itself has a align key which is used.
Wolfgang
Thanks for the explanation, Wolfgang. -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com
participants (2)
-
Kip Warner
-
Wolfgang Schuster