Skip to content
Snippets Groups Projects
Commit 6bac97ee authored by Luigi Scarso's avatar Luigi Scarso
Browse files

example added for hyphenationbounds

[[Split portion of a mixed commit.]]
parent e43fef67
Branches
Tags
No related merge requests found
......@@ -263,6 +263,65 @@ The word end is determined as follows:
\NC adjust \NC when hyphenationbounds 2 or 3 \NC \NR
\stoptabulate
\in{Figures}[hb:1] upto \in[hb:5] show some examples. In all cases we set the min
values to 1 and make sure that the words hyphenate at each character.
\hyphenation{o-n-e t-w-o}
\def\SomeTest#1#2%
{\lefthyphenmin \plusone
\righthyphenmin \plusone
\parindent \zeropoint
\everypar \emptytoks
\dontcomplain
\hbox to 2cm {%
\vtop {%
\hsize 1pt
\hyphenationbounds#1
#2
\par}}}
\startplacefigure[reference=hb:1,title={\type{one}}]
\startcombination[4*1]
{\SomeTest{0}{one}} {\type{0}}
{\SomeTest{1}{one}} {\type{1}}
{\SomeTest{2}{one}} {\type{2}}
{\SomeTest{3}{one}} {\type{3}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:2,title={\type{one\null two}}]
\startcombination[4*1]
{\SomeTest{0}{one\null two}} {\type{0}}
{\SomeTest{1}{one\null two}} {\type{1}}
{\SomeTest{2}{one\null two}} {\type{2}}
{\SomeTest{3}{one\null two}} {\type{3}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:3,title={\type{\null one\null two}}]
\startcombination[4*1]
{\SomeTest{0}{\null one\null two}} {\type{0}}
{\SomeTest{1}{\null one\null two}} {\type{1}}
{\SomeTest{2}{\null one\null two}} {\type{2}}
{\SomeTest{3}{\null one\null two}} {\type{3}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:4,title={\type{one\null two\null}}]
\startcombination[4*1]
{\SomeTest{0}{one\null two\null}} {\type{0}}
{\SomeTest{1}{one\null two\null}} {\type{1}}
{\SomeTest{2}{one\null two\null}} {\type{2}}
{\SomeTest{3}{one\null two\null}} {\type{3}}
\stopcombination
\stopplacefigure
\startplacefigure[reference=hb:5,title={\type{\null one\null two\null}}]
\startcombination[4*1]
{\SomeTest{0}{\null one\null two\null}} {\type{0}}
{\SomeTest{1}{\null one\null two\null}} {\type{1}}
{\SomeTest{2}{\null one\null two\null}} {\type{2}}
{\SomeTest{3}{\null one\null two\null}} {\type{3}}
\stopcombination
\stopplacefigure
% (Future versions of \LUATEX\ might provide more granularity.)
In traditional \TEX\ ligature building and hyphenation are interwoven with the
......
......@@ -1091,8 +1091,6 @@ with zero being the default behaviour.
\def\OneLiner#1#2%
{\NC #1
% \NC \ruledhbox{\mathsurroundmode#1\relax\hsize 100pt x$x$x}
% \NC \ruledhbox{\mathsurroundmode#1\relax\hsize 100pt x $x$ x}
\NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x$x$x}
\NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x $x$ x}
\NC #2
......@@ -1124,7 +1122,7 @@ with zero being the default behaviour.
Method six omits the surround glue when there is (x)spacing glue present while
method seven does the opposite, the glue is only applied when there is (x)space
glue present too. Anything more fance, like checking the begining or end of a
glue present too. Anything more fancy, like checking the begining or end of a
paragraph (or edges of a box) would not be robust anyway. If you want that you
can write a callback that runs over a list and analyzes a paragraph. Actually, in
that case you could also inject glue (or set the properties of a math node)
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment