summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex3/galley/xhj-test.tex
blob: 6ba6fa5486f801be8b29b4b8e609cc391da310e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
\documentclass{article}


\setlength\textwidth{5cm}

\usepackage{xparse,xhj,galley2}
\tracinggalleys=2  % want tracing here


\def\trace{\tracingassigns=1\tracingall}

\IgnoreWhiteSpace

% simple definition for \\
% ignoring * form
%
\DeclareDocumentCommand\\{so}
  {\leavevmode \unskip
   \hskip \GAL@@linefillskip 
   \IfNoValueF{#2}{\vadjust{\vskip #2}}\break
  }



\setlength\parindent{12pt}

\begin{document}

some starting text

%\trace
\UseInstance{pshape}{staggered}

\section{This should\\ be\\ 
         a really staggered\\heading (but isn't)}

In fact we should not be surprised since the standard \LaTeX{} heading
code is essentially using its own pshape and thus overwriting the
outer pshape declaration.

\UseInstance{pshape}{staggered}
\UseInstance{justification}{raggedright}
This is a paragraph for testing various justification\\ settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.

\section{Linebreaks}


A line break with linebreak\linebreak
and now ...

% A line break with oldlinebreak\oldlinebreak
% what takes longer?


\section{Justified}

%\trace
some text\marginpar{\UseInstance{justification}{raggedright}\fussy
       \fontfamily{pop}\fontsize{7}{9}\selectfont ZZZ Some text in
       optima. Some text in optima. Some text in optima. Some text in
       optima. Some text in optima.}
some text some text some text some text some text some text some text
some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text
some text some text some text some text some text some text some text
some text some text some text some text some text some text

%\trace

\section{Raggedright}

\UseInstance{justification}{raggedright}
This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.

\section{Left}

\UseInstance{justification}{raggedleft}
\UseInstance{hyphenation}{off}\sloppy
This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.



And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.

\tracingpages=1

\section{Adjust}

\UseInstance{justification}{adjust}
\UseInstance{hyphenation}{on}\fussy
This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text. 

\section{Center}

\UseInstance{justification}{center}
This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.

\section{Center first}

\UseInstance{justification}{centerfirst-adjust}
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some
This is a paragraph for testing various justification settings. We have some


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.


\section{Center middle}

\hrule

\UseInstance{justification}{centermiddle}

This is a paragraph for testing various justification settings. We have some
text and after the word `word' \\ we just had a forced line break. We
do some more line break testing, e.g., this\\[7pt] one was supposed to
add 7pts of extra space.


And here a paragraph for comparison with some text some text some text
also-containing-a-longer-word some text some text some text some text
some text some text some text.

\hrule

\end{document}