On 2/26/2015 10:22 AM, Alan BRASLAU wrote:
Hello,
For a multilingual document, alternating one language or another, not
necessarily a bilingual, translated text, I thought about using
textbackground to set-off paragraphs. This technique could also apply
to a single language text having multiple levels of information,
perhaps statements followed by discussion, etc.
A problem appears with respect to footnotes that I do not know how to
handle. If the backgrounded text goes across pages placing footnotes,
then the footnote also gets the background. This is incorrect, perhaps
a bug.
Second problem, if a footnote of a backgrounded text gets placed on a
following page, then it may not get a background. (It is not clear to me
whether it would be correct for footnotes to get the background or
not.) Of course, a solution to this secondary problem might be
before={\startlocalfootnotes},
after={\placelocalfootnotes\stoplocalfootnotes},
although such a solution would postpone backgrounded footnotes to the
end of the backgrounded text.
Alan
MWE:
\definetextbackground
[spanish]
[location=paragraph,
frame=off,
before={\language[es]},
background=color,
backgroundcolor=lightgray]
\starttext
\input darwin%
\startfootnote
\input dawkins
\stopfootnote
\input tufte
\startspanish
\input quevedo-es%
\startfootnote
\input cervantes-es
\stopfootnote
\stopspanish
\input zapf
\stoptext
\definetextbackground[en]
\definetextbackground[nl]
\setnewconstant\kindofpagetextareas 1 % low level, no high level switch
(yet)
\starttext
\starttextbackground[en]
\dorecurse{10}{\input tufte \footnote{tufte} \par}
\stoptextbackground
\starttextbackground[nl]
\dorecurse{10}{\input tufte \footnote{tufte} \par}
\stoptextbackground
\stoptext
-----------------------------------------------------------------
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
___________________________________________________________________________________