Hello everybody, Currently I am typesetting a small dictionary. I want to have hanging indents if the text joined to the expression is longer than one line. In the past I had this definitions: \defineblank[Afterhangingparagraph][1pc] \starttext \def\Hangindent{\hangafter=1\hangindent=1em} \definestartstop[HangPar] [before={\bgroup\appendtoks\Hangindent\to\everypar}, after={\egroup\blank[Afterhangingparagraph]}] \starttext \startHangPar \input knuth \stopHangPar \startHangPar {\bf Aanslaan,} aanspreken. Een poging in 't werk stellen. Ik zal dat heertje reis aanslaan. Sla dien broger (man) aan, misschien heeft hij poen (geld). Jongens, er moet aangeslagen worden, daar loopt mooi gajes (menschen daar wat van te halen is). \stopHangPar \stoptext The strange thing is, that the first two paragraphs of the Knuth-text is showing a hanging indent, however the last paragraph does not which is unexpected. In the example from the dictionary no hanging indentation is shown. What do I mis here? Kind regards Willi
Am 10.03.2015 um 22:00 schrieb Willi Egger
: Hello everybody,
Currently I am typesetting a small dictionary. I want to have hanging indents if the text joined to the expression is longer than one line.
In the past I had this definitions:
\defineblank[Afterhangingparagraph][1pc]
\starttext \def\Hangindent{\hangafter=1\hangindent=1em}
\definestartstop[HangPar] [before={\bgroup\appendtoks\Hangindent\to\everypar}, after={\egroup\blank[Afterhangingparagraph]}]
\starttext \startHangPar \input knuth \stopHangPar
\startHangPar {\bf Aanslaan,} aanspreken. Een poging in 't werk stellen.
Ik zal dat heertje reis aanslaan. Sla dien broger (man) aan, misschien heeft hij poen (geld). Jongens, er moet aangeslagen worden, daar loopt mooi gajes (menschen daar wat van te halen is). \stopHangPar \stoptext
The strange thing is, that the first two paragraphs of the Knuth-text is showing a hanging indent, however the last paragraph does not which is unexpected. In the example from the dictionary no hanging indentation is shown.
What do I mis here?
You have to add \par at the end of your environment, i.e. \definestartstop [HangPar] [before=\begingroup\EveryPar{\hangafter\plusone\hangindent\emwidth\relax}, after={\par\endgroup\blank[1pc]}] Wolfgang
Dear Wolfgang, adding to my environment or using your code instead seems not to have the desired result. I still have the situation as before… Using Context 2015-03-11 Kind regards Willi
On 11 mrt. 2015, at 00:41, Wolfgang Schuster
wrote: Am 10.03.2015 um 22:00 schrieb Willi Egger
: Hello everybody,
Currently I am typesetting a small dictionary. I want to have hanging indents if the text joined to the expression is longer than one line.
In the past I had this definitions:
\defineblank[Afterhangingparagraph][1pc]
\starttext \def\Hangindent{\hangafter=1\hangindent=1em}
\definestartstop[HangPar] [before={\bgroup\appendtoks\Hangindent\to\everypar}, after={\egroup\blank[Afterhangingparagraph]}]
\starttext \startHangPar \input knuth \stopHangPar
\startHangPar {\bf Aanslaan,} aanspreken. Een poging in 't werk stellen.
Ik zal dat heertje reis aanslaan. Sla dien broger (man) aan, misschien heeft hij poen (geld). Jongens, er moet aangeslagen worden, daar loopt mooi gajes (menschen daar wat van te halen is). \stopHangPar \stoptext
The strange thing is, that the first two paragraphs of the Knuth-text is showing a hanging indent, however the last paragraph does not which is unexpected. In the example from the dictionary no hanging indentation is shown.
What do I mis here?
You have to add \par at the end of your environment, i.e.
\definestartstop [HangPar] [before=\begingroup\EveryPar{\hangafter\plusone\hangindent\emwidth\relax}, after={\par\endgroup\blank[1pc]}]
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 ___________________________________________________________________________________
Am 11.03.2015 um 16:50 schrieb Willi Egger
: Dear Wolfgang,
adding to my environment or using your code instead seems not to have the desired result. I still have the situation as before… Using Context 2015-03-11
The following definition for the environment works: \define\startHangPar {\begingroup\EveryPar{\hangafter\plusone\hangindent\emwidth\relax}} \define\stopHangPar {\par\endgroup\blank[Afterhangingparagraph]} Wolfgang
Hello Wolfgang, thank you so much for looking into this matter again. Indeed now the hanging indent works, provided that the paragraph das not start with {\bf Aanslaan,}. It seems that there is interference with the bold-switch. So I am puzzled again. \define\startHangPar {\begingroup\EveryPar{\hangafter\plusone\hangindent\emwidth\relax}} \define\stopHangPar {\par\endgroup\blank[Afterhangingparagraph]} \starttext \startHangPar \input knuth \stopHangPar \startHangPar Aanslaan, aanspreken. Een poging in 't werk stellen. Ik zal dat heertje reis aanslaan. Sla dien broger (man) aan, misschien heeft hij poen (geld). Jongens, er moet aangeslagen worden, daar loopt mooi gajes (menschen daar wat van te halen is). \stopHangPar \startHangPar Afleggen, beloeren, ongemerkt nagaan, verkennen. De russen (rechercheurs) hebben hem afgelegen (beloerd). Dat spiese (huis) moet eerst afgelegen worden. Een smeris legt je af. (Een agent bespiedt je). \stopHangPar \startHangPar {\bf Aanslaan,} aanspreken. Een poging in 't werk stellen. Ik zal dat heertje reis aanslaan. Sla dien broger (man) aan, misschien heeft hij poen (geld). Jongens, er moet aangeslagen worden, daar loopt mooi gajes (menschen daar wat van te halen is). \stopHangPar \startHangPar {\bf Afleggen,} beloeren, ongemerkt nagaan, verkennen. De russen (rechercheurs) hebben hem afgelegen (beloerd). Dat spiese (huis) moet eerst afgelegen worden. Een smeris legt je af. (Een agent bespiedt je). \stopHangPar \stoptext Best wishes Willi
On 11 mrt. 2015, at 17:04, Wolfgang Schuster
wrote: Am 11.03.2015 um 16:50 schrieb Willi Egger
: Dear Wolfgang,
adding to my environment or using your code instead seems not to have the desired result. I still have the situation as before… Using Context 2015-03-11
The following definition for the environment works:
\define\startHangPar {\begingroup\EveryPar{\hangafter\plusone\hangindent\emwidth\relax}}
\define\stopHangPar {\par\endgroup\blank[Afterhangingparagraph]}
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 ___________________________________________________________________________________
Am 11.03.2015 um 18:23 schrieb Willi Egger
: Hello Wolfgang,
thank you so much for looking into this matter again. Indeed now the hanging indent works, provided that the paragraph das not start with {\bf Aanslaan,}. It seems that there is interference with the bold-switch. So I am puzzled again.
You have to add \dontleavehmode in front of the font switch. \startHangPar \dontleavehmode{\bf Afleggen,} beloeren, ongemerkt nagaan, verkennen. De russen (rechercheurs) hebben hem afgelegen (beloerd). Dat spiese (huis) moet eerst afgelegen worden. Een smeris legt je af. (Een agent bespiedt je). \stopHangPar Wolfgang
Wow! this helps! Thank you so much for your answer. best wishes Willi
On 12 mrt. 2015, at 01:02, Wolfgang Schuster
wrote: Am 11.03.2015 um 18:23 schrieb Willi Egger
: Hello Wolfgang,
thank you so much for looking into this matter again. Indeed now the hanging indent works, provided that the paragraph das not start with {\bf Aanslaan,}. It seems that there is interference with the bold-switch. So I am puzzled again.
You have to add \dontleavehmode in front of the font switch.
\startHangPar \dontleavehmode{\bf Afleggen,} beloeren, ongemerkt nagaan, verkennen. De russen (rechercheurs) hebben hem afgelegen (beloerd). Dat spiese (huis) moet eerst afgelegen worden. Een smeris legt je af. (Een agent bespiedt je). \stopHangPar
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 ___________________________________________________________________________________
participants (2)
-
Willi Egger
-
Wolfgang Schuster