ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Separation of delimited text symbol
@ 2013-03-08  9:22 Marco Patzer
  2013-03-08 17:41 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Patzer @ 2013-03-08  9:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi,

this issue was raised on stackexchange¹. When setting up a delimited
text, a line break is allowed between the character and the
following text, which is always undesired (maybe I lack imagination
where this might be intended). Example:

\setuplayout [width=10cm]

\definedelimitedtext
  [quotation]
  %% [left={\symbol[leftquotation]}] %% works
  [left=“]                           %% separates symbol from the text

\starttext
  När jag som liten uppgett att teckningen föreställer \quotation{Tomtarnas eld
  i skogen} kanske det inte alls var menat som en optisk liknelse av denna
  händelse.
\stoptext

Setting the delimiter as part of the language setting does not cause
the symbol to be separated.

If there's no use-case for this behaviour, can it be fixed?


Marco

¹ http://tex.stackexchange.com/q/101130/5245

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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] 3+ messages in thread

* Re: Separation of delimited text symbol
  2013-03-08  9:22 Separation of delimited text symbol Marco Patzer
@ 2013-03-08 17:41 ` Wolfgang Schuster
  2013-03-12  9:38   ` Marco Patzer
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-03-08 17:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 08.03.2013 um 10:22 schrieb Marco Patzer <homerow@lavabit.com>:

> Hi,
> 
> this issue was raised on stackexchange¹. When setting up a delimited
> text, a line break is allowed between the character and the
> following text, which is always undesired (maybe I lack imagination
> where this might be intended). Example:
> 
> \setuplayout [width=10cm]
> 
> \definedelimitedtext
>  [quotation]
>  %% [left={\symbol[leftquotation]}] %% works
>  [left=“]                           %% separates symbol from the text
> 
> \starttext
>  När jag som liten uppgett att teckningen föreställer \quotation{Tomtarnas eld
>  i skogen} kanske det inte alls var menat som en optisk liknelse av denna
>  händelse.
> \stoptext
> 
> Setting the delimiter as part of the language setting does not cause
> the symbol to be separated.
> 
> If there's no use-case for this behaviour, can it be fixed?

The following change in typo-del.mkiv prevents the line break.

\def\typo_delimited_handle_left#1%
  {\begingroup
   \setbox\scratchbox\hbox{\delimitedtextparameter#1}%
   \ifdim\wd\scratchbox>\zeropoint
     \ifdim\lastkern=\d_typo_delimited_signal
       \unkern
       \hskip\hspaceamount\currentlanguage{interquotation}%
     \else\ifdim\lastskip=\d_typo_delimited_signal
       \unskip
       \hskip\hspaceamount\currentlanguage{interquotation}%
     \fi\fi
     \strut % new, needed below
     \ifhmode % else funny pagebeaks
       \penalty\plustenthousand
       \hskip\zeropoint % == \prewordbreak
     \fi
     \strut % new, needed below
     \delimitedtextparameter#1% unhbox\scratchbox
+    \penalty\plustenthousand
     \hskip\d_typo_delimited_signal % +- \prewordbreak
   \fi
   \endgroup}

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] 3+ messages in thread

* Re: Separation of delimited text symbol
  2013-03-08 17:41 ` Wolfgang Schuster
@ 2013-03-12  9:38   ` Marco Patzer
  0 siblings, 0 replies; 3+ messages in thread
From: Marco Patzer @ 2013-03-12  9:38 UTC (permalink / raw)
  To: ntg-context


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

On 2013–03–08 Wolfgang Schuster wrote:

> The following change in typo-del.mkiv prevents the line break.
> 
> […]

Thanks Wolfgang for the code and thanks to Hans for incorporating
this into the core.

Marco

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 490 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] 3+ messages in thread

end of thread, other threads:[~2013-03-12  9:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-08  9:22 Separation of delimited text symbol Marco Patzer
2013-03-08 17:41 ` Wolfgang Schuster
2013-03-12  9:38   ` Marco Patzer

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).