# [NTG-context] Re: error with _ in header?

Hans Hagen pragma at wxs.nl
Thu Aug 19 10:49:00 CEST 2004

Patrick Gundlach wrote:

>Hello,
>
>
>
>>>--------------------------------------------------
>>>\setupoutput[pdftex]
>>>
>>>\usetypescript[postscript][texnansi]
>>>\setupbodyfont[postscript,ss,13pt]
>>>
>>>
>>>\starttext
>>>\dorecurse{10}{\input tufte \par}
>>>
>>>\externalfigure[cow][scale=1424]
>>>
>>>\externalfigure[cow][scale=1424]
>>>
>>>\stoptext
>>>--------------------------------------------------
>>>
>>>
>>>
>>This file processes ok here; also, your bug is not so much related to
>>headers but more to some kind of \_ expansion In what path are your
>>graphics?
>>
>>
>
>it breaks on 2004.8.14 as well on live.contextgarden.net
>
>Graphics (cow.pdf) is in /opt/local/texmf/tex/context/sample
>
>If the two graphics are not on the same page, the error dissapears.
>The reproduction of the error is very sensitive to layout changes.
>
>
the problem occurs in the output routine (when the page is built); some tracing all learns that while flushing the fig box takes place, the meaning of textunderscore is changed; so we need to restore this before hand; actually this problem should be solved differently, i.e. no redefinition at all; the problem is that findinf good solutions is not that easy because of "moments of expansion"

fix (in core-fig.tex:)

\def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]%
{\doifsomething{#3}% catches \defineexternalfigure dummies
{\bgroup
\pushmacro\textunderscore
\edef\textunderscore{\string_}% brrr, temp hack, still needed?
\calculateexternalfigure[#1][#2][#3][#4][#5][#6]%
\calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]%
\popmacro\textunderscore
\box\foundexternalfigure
\egroup}}

-----------------------------------------------------------------
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.9236012697219849, "perplexity": 7830.84580544832}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-11/segments/1424936464303.77/warc/CC-MAIN-20150226074104-00249-ip-10-28-5-156.ec2.internal.warc.gz"}