\definetype[xxx][linebreaks=yes, breakpoints=name]
Hi, Is it already possible to define a new \type{} command that allows linebreaks and perhaps also a breakpoint set? If not, here my feature request: something like \definetype[xxx][linebreaks=yes, breakpoints=compound] TIA, -- Peter
On 10/7/2013 1:09 AM, Peter Münster wrote:
Hi,
Is it already possible to define a new \type{} command that allows linebreaks and perhaps also a breakpoint set?
If not, here my feature request: something like \definetype[xxx][linebreaks=yes, breakpoints=compound]
\definetype[whatever][lines=yes,space=stretch] -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On 10/7/2013 1:09 AM, Peter Münster wrote:
Hi,
Is it already possible to define a new \type{} command that allows linebreaks and perhaps also a breakpoint set?
If not, here my feature request: something like \definetype[xxx][linebreaks=yes, breakpoints=compound]
this should be redefined: \unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax} (used \interwordstretch which is zero) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Mon, Oct 07 2013, Hans Hagen wrote:
If not, here my feature request: something like \definetype[xxx][linebreaks=yes, breakpoints=compound]
this should be redefined:
\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}
Hi Hans, Unfortunately it does not work: --8<---------------cut here---------------start------------->8--- \unprotect \unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax} \protect \definetype[whatever][lines=yes, space=stretch] \setbreakpoints[compound] \starttext \hsize4cm \whatever{fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla} fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla \stoptext --8<---------------cut here---------------end--------------->8--- What am I doing wrong please? -- Peter
On 10/7/2013 10:30 AM, Peter Münster wrote:
On Mon, Oct 07 2013, Hans Hagen wrote:
If not, here my feature request: something like \definetype[xxx][linebreaks=yes, breakpoints=compound]
this should be redefined:
\unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax}
Hi Hans,
Unfortunately it does not work:
--8<---------------cut here---------------start------------->8--- \unprotect \unexpanded\def\specialstretchedspace{\hskip.5\interwordspace\s!plus.125\interwordspace\relax} \protect \definetype[whatever][lines=yes, space=stretch] \setbreakpoints[compound] \starttext \hsize4cm \whatever{fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla} fasdfjkl-fjsdkal-jskla-fjksdla-fjksdl-afjksdla \stoptext --8<---------------cut here---------------end--------------->8---
What am I doing wrong please?
I uploaded a bit more robust variant: \starttext \setuplayout[width=4cm] \showframe \setupalign[stretch,verytolerant] \definetype[whatever][lines=hyphenated,space=stretch] A quote from ward: \expanded{\whatever{\cldloadfile{ward}}} That's it. \definetype[whatever][lines=normal,space=stretch] A quote from ward: \expanded{\whatever{\cldloadfile{ward}}} That's it. \stoptext Should work ok. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hello Hans, Is it also possible, to break inside the \type{} only at well defined characters and without hyphenation? Example: --8<---------------cut here---------------start------------->8--- \definebreakpoint[compound][_] \setuplayout[width=25mm] \startsetups Test \setbreakpoints[compound] \stopsetups \definetype[Test][lines=hyphenated, setups=Test, space=stretch] \showframe \starttext hellohello hellohello % should break like this: hel- lohello (ok) hellohello \Test{hel_lohello} % should break like this: hel_ lohello (not ok) hellohello \Test{hellohello} % should not break at all (not ok) \stoptext --8<---------------cut here---------------end--------------->8--- TIA for any help, -- Peter
On 10/29/2013 3:19 PM, Peter Münster wrote:
Hello Hans,
Is it also possible, to break inside the \type{} only at well defined characters and without hyphenation?
Example:
--8<---------------cut here---------------start------------->8--- \definebreakpoint[compound][_] \setuplayout[width=25mm] \startsetups Test \setbreakpoints[compound] \stopsetups \definetype[Test][lines=hyphenated, setups=Test, space=stretch] \showframe \starttext hellohello hellohello % should break like this: hel- lohello (ok)
hellohello \Test{hel_lohello} % should break like this: hel_ lohello (not ok)
hellohello \Test{hellohello} % should not break at all (not ok) \stoptext --8<---------------cut here---------------end--------------->8---
TIA for any help,
\setuplayout [width=25mm] \definebreakpoint [compound] [_] \definetype [Test] [lines=hyphenated, setups=Test, space=stretch, style={\tttf\setbreakpoints[compound]}] \showframe \starttext hellohello hellohello hellohello \Test{hel_lohello} hellohello \Test{hellohello} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Peter Münster