[NTG-context] n-dash and line break

Thomas A. Schmitz thomas.schmitz at uni-bonn.de
Fri Jul 15 12:59:46 CEST 2011


On 07/15/2011 11:53 AM, Hans Hagen wrote:

> On 15-7-2011 10:33, Thomas A. Schmitz wrote:

>> I think lines should be broken at n-dashes.
>
> intended indeed in the sense that this is the way tex works

Hmm, that caused me a lot of troubles especially in bibliographical 
lists where the ndash is used to separate numbers.

> you can play with auto-break ... example from source:

I tried to modify my example:

\setuplayout[width=5cm]
\mainlanguage[de]

\installbreakpoint [compound] [–] 
[language=de,nleft=2,nright=2,left=,right=-,type=5]
\setbreakpoints[compound]

\showframe

\starttext

0--1--2--3--4--5--6--7--8--9--0--0--1--2--3

0–1–2–3–4–5–6–7–8–9–0–0–1–2–3

\stoptext

but that doesn't change anything.

>
> % \start \hsize 1.5cm \setbreakpoints[compound]
> % \installbreakpoint [compound] [-]
> [nleft=3,nright=3,type=5,left=,right={-},middle={-}]
> % \installbreakpoint [compound] [(]
> [nleft=3,nright=3,type=5,left=,right={(-},middle={(}]
> % \installbreakpoint [compound] [)]
> [nleft=3,nright=3,type=5,left={-)},right=,middle={)}]
> % composed-word\par composed(word)\par
> % \stop
>
> % \mainlanguage[czech]
> % \installbreakpoint [compound] [\number`-]
> [language=cs,nleft=3,nright=3,type=4]
> % \setbreakpoints[compound]
> % \start \hsize 1mm test-test \par \stop
>
> % \setbreakpoints[compound]
>

When I try to run this with yesterday's beta, I get

loading         > ConTeXt Page Macros / Runtime Macros
)error: ...text/tex/texmf-context/tex/context/base/node-aux.lua:226: 
attempt to call global 'current_font' (a nil value)
.

system          > tex > error on line 17 in file test.tex: ? ...

Thomas


More information about the ntg-context mailing list