ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Hanging indent
@ 2015-03-10 21:00 Willi Egger
  2015-03-10 23:41 ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Willi Egger @ 2015-03-10 21:00 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-10 21:00 Hanging indent Willi Egger
@ 2015-03-10 23:41 ` Wolfgang Schuster
  2015-03-11 15:50   ` Willi Egger
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-03-10 23:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 10.03.2015 um 22:00 schrieb Willi Egger <context@boede.nl>:
> 
> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-10 23:41 ` Wolfgang Schuster
@ 2015-03-11 15:50   ` Willi Egger
  2015-03-11 16:04     ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Willi Egger @ 2015-03-11 15:50 UTC (permalink / raw)
  To: NTG-Context ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2265 bytes --]

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 <schuster.wolfgang@gmail.com> wrote:
> 
>> 
>> Am 10.03.2015 um 22:00 schrieb Willi Egger <context@boede.nl>:
>> 
>> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 14346 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-11 15:50   ` Willi Egger
@ 2015-03-11 16:04     ` Wolfgang Schuster
  2015-03-11 17:23       ` Willi Egger
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-03-11 16:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 11.03.2015 um 16:50 schrieb Willi Egger <context@boede.nl>:
> 
> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-11 16:04     ` Wolfgang Schuster
@ 2015-03-11 17:23       ` Willi Egger
  2015-03-12  0:02         ` Wolfgang Schuster
  0 siblings, 1 reply; 7+ messages in thread
From: Willi Egger @ 2015-03-11 17:23 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

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 <schuster.wolfgang@gmail.com> wrote:
> 
> 
>> Am 11.03.2015 um 16:50 schrieb Willi Egger <context@boede.nl>:
>> 
>> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-11 17:23       ` Willi Egger
@ 2015-03-12  0:02         ` Wolfgang Schuster
  2015-03-12 19:08           ` Willi Egger
  0 siblings, 1 reply; 7+ messages in thread
From: Wolfgang Schuster @ 2015-03-12  0:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 11.03.2015 um 18:23 schrieb Willi Egger <context@boede.nl>:
> 
> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Hanging indent
  2015-03-12  0:02         ` Wolfgang Schuster
@ 2015-03-12 19:08           ` Willi Egger
  0 siblings, 0 replies; 7+ messages in thread
From: Willi Egger @ 2015-03-12 19:08 UTC (permalink / raw)
  To: NTG-Context ConTeXt users

Wow! this helps! Thank you so much for your answer.

best wishes

Willi
> On 12 mrt. 2015, at 01:02, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:
> 
> 
>> Am 11.03.2015 um 18:23 schrieb Willi Egger <context@boede.nl>:
>> 
>> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-03-12 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 21:00 Hanging indent Willi Egger
2015-03-10 23:41 ` Wolfgang Schuster
2015-03-11 15:50   ` Willi Egger
2015-03-11 16:04     ` Wolfgang Schuster
2015-03-11 17:23       ` Willi Egger
2015-03-12  0:02         ` Wolfgang Schuster
2015-03-12 19:08           ` Willi Egger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).