Henning Hraban Ramm schrieb am 04.09.2020 um 15:34:
Am 04.09.2020 um 13:25 schrieb Henning Hraban Ramm <te...@fiee.net>:
My current book contains a lot of quotations with their sources marked as
footnotes, e.g.
\definedelimitedtext[Zitat][
%setups=Zitat, % doesn’t work!?
left=»,
right=«,
leftmargin=2em,
rightmargin=1.5em,
]
\startZitat
A rose is a rose is a rose.\footnote{Marx brothers}
\stopZitat
Now, since the quotations are whole sentences or paragraphs, the footnote
marker needs to be placed _after_ the closing quotation mark. (German
typography, I learned it’s different at least in US English.)
I tried several approaches e.g. with my own single start/stop macros that call
\start/stopnarrower or \start/stopZitat – that always lead to unclosed
environments.
This looks as I want it to:
\setupnarrower[left=2em,right=1.5em]
\startnarrower
\hskip-0.33em\quotation{Im übrigen ist der Mensch ein Lebewesen, das klopft,
schlechte Musik macht und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe,
aber dann ist er tot.}\footnote[f:9]{Kaspar Hauser (Kurt Tucholsky), Weltbühne
24, 16.\,6.\,1931}
\stopnarrower
But how can I make that into a single environment?
\startsetups [userdata:myquote]
\startnarrow [left=2em,right=1.5em]
%\dontleavehmode\llap{\symbol[leftquotation]}\getinlineuserdata\symbol[rightquotation]
\symbol[leftquotation]\getinlineuserdata\symbol[rightquotation]
\doifsomething{\userdataparameter{source}}
{\footnote[\userdataparameter{reference}]{\userdataparameter{source}}}
\stopnarrow
\stopsetups
\defineuserdataalternative
[myquote]
[renderingsetup=userdata:myquote]
\defineuserdata
[myquote]
[alternative=myquote]
\showframe
\definefontfeature [default] [default] [protrusion=quality]
\setupalign [hanging]
\starttext
\startuserdata [myquote] [reference={f:9},source={Kaspar Hauser (Kurt
Tucholsky), Weltbühne 24, 16.\,6.\,1931}]
Im übrigen ist der Mensch ein Lebewesen, das klopft, schlechte Musik
macht und seinen Hund bellen läßt. Manchmal gibt er auch Ruhe, aber dann
ist er tot.
\stopuserdata
\stoptext
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________