|
4 | 4 | \setlength{\alectryonMargin}{0.3em} |
5 | 5 | \newlength{\alectryonRuleSkip} |
6 | 6 | \setlength{\alectryonRuleSkip}{0.3em} |
| 7 | +\newlength{\alectryonHypH} |
| 8 | +\setlength{\alectryonHypH}{2em} |
| 9 | +\newlength{\alectryonHypV} |
| 10 | +\setlength{\alectryonHypV}{0.6em} |
7 | 11 |
|
8 | 12 | \definecolor{alectryon@tango@light@aluminium}{HTML}{EEEEEC} |
9 | 13 | \definecolor{alectryon@tango@medium@aluminium}{HTML}{D3D7CF} |
|
49 | 53 | % \alectryon@parsetup removes paragraph skips and indents |
50 | 54 | \newcommand*{\alectryon@parsetup} |
51 | 55 | {\setlength{\parskip}{0pt} |
52 | | - \setlength{\parindent}{0pt}} |
| 56 | + \setlength{\parindent}{0pt}} |
| 57 | +% \alectryon@setlineskip{LENGTH} ensures that lines are LENGTH apart |
| 58 | +\newlength{\alectryon@@lineskip} |
| 59 | +\newlength{\alectryon@@lineskiplimit} |
| 60 | +\newcommand{\alectryon@setlineskip}[1] |
| 61 | + {\setlength{\alectryon@@lineskip}{\lineskip}% |
| 62 | + \setlength{\lineskip}{#1}% |
| 63 | + \setlength{\alectryon@@lineskiplimit}{\lineskiplimit}% |
| 64 | + \setlength{\lineskiplimit}{#1}} |
| 65 | +% \alectryon@resetlineskip resets line-skip settings |
| 66 | +\newcommand{\alectryon@resetlineskip} |
| 67 | + {\setlength{\lineskip}{\alectryon@@lineskip}% |
| 68 | + \setlength{\lineskiplimit}{\alectryon@@lineskiplimit}} |
| 69 | + |
| 70 | +% \alectryon@parbox{WIDTH}{TEXT} wraps TEXT in a box with standard line skip |
| 71 | +\newcommand*{\alectryon@parbox}[2] |
| 72 | + {{\alectryon@resetlineskip% |
| 73 | + % \setlength{\fboxsep}{0pt}% |
| 74 | + % \fbox{% |
| 75 | + \parbox[t][][t]{\alectryon@@width}{#2}% |
| 76 | + % }% |
| 77 | + }} |
| 78 | +% \alectryon@maxwidth{WIDTH}{TEXT} typesets TEXT as a paragraph of maximum width WIDTH |
| 79 | +\newlength{\alectryon@@width@initial} |
| 80 | +\newlength{\alectryon@@width} |
| 81 | +\newcommand*{\alectryon@maxwidth}[2] |
| 82 | + {\settowidth{\alectryon@@width@initial} |
| 83 | + {\begin{tabular}[t]{@{}l@{}}#2\end{tabular}}% |
| 84 | + \setlength{\alectryon@@width} |
| 85 | + {\ifdim\alectryon@@width@initial>#1 #1\else\alectryon@@width@initial\fi}% |
| 86 | + \alectryon@parbox{\alectryon@@width}{#2}} |
| 87 | + |
53 | 88 | \newcommand{\alectryon@prelude} |
54 | 89 | {\alectryon@fontsetup |
55 | 90 | \alectryon@parsetup |
|
63 | 98 | \tcbsetforeverylayer{boxsep=0pt, left=\alectryonMargin, right=\alectryonMargin, top=\alectryonMargin, bottom=\alectryonMargin} |
64 | 99 | \tcbsetforeverylayer{boxrule=0pt, sharp corners}} |
65 | 100 |
|
66 | | -\newcommand{\alectryon@hypn}[1]{\textbf{#1}} |
67 | 101 | \newcommand{\alectryon@par}{\leavevmode\par\ignorespaces} |
68 | | -\newcommand{\alectryon@cr}{\-\cr\ignorespaces} |
| 102 | +\newcommand{\alectryon@newline}{\-\\\ignorespaces} |
69 | 103 | \newcommand{\alectryon@vsep}{\vspace{0.15em}} |
70 | 104 | \newcommand{\alectryon@sep}{\relax} |
71 | 105 | \newcommand{\alectryon@nl}{\alectryon@par} |
|
118 | 152 | {\alectryon@goal@rule} |
119 | 153 | \alectryon@newenvironment{hyps} |
120 | 154 | {\alectryon@hyphens% |
121 | | - \begin{minipage}{\linewidth}% |
122 | | - \alectryon@raggedright |
123 | | - \advance\baselineskip by \alectryonRuleSkip\relax} |
124 | | - {\end{minipage}} % Minipage needed for baselineskip adjustment |
125 | | - {\discretionary{}{}{\hbox{\hspace{2em}}}} |
126 | | -\alectryon@newenvironment[1]{hyp} |
127 | | - {\mbox{#1}:\nobreak\hspace{0.25em}\nobreak% |
128 | | - \def\alectryon@nl{\alectryon@cr}% |
129 | | - \begin{tabular}[t]{@{}l@{}}} |
130 | | - {\end{tabular}} |
131 | | - {} |
| 155 | + \alectryon@raggedright% |
| 156 | + \alectryon@setlineskip{\alectryonHypV}} |
| 157 | + {\par} |
| 158 | + {\discretionary{}{}{\hbox{\hspace{\alectryonHypH}}}} |
| 159 | +\newcommand*{\alectryon@hyp}[3][] |
| 160 | + {{\def\alectryon@nl{\alectryon@newline}% |
| 161 | + \alectryon@maxwidth{\textwidth} |
| 162 | + {{\alectryon@hypn{#2}\hspace{0.25em plus 1fil}\penalty500% |
| 163 | + \def\alectryon@space{\rule{0pt}{0pt} \rule{0pt}{0pt}}% |
| 164 | + \lineskiplimit=\alectryonRuleSkip% |
| 165 | + \lineskip=\alectryonRuleSkip% |
| 166 | + \alectryon@maxwidth{\dimexpr\textwidth\relax}{#3}}}}} |
| 167 | +\newcommand*{\alectryon@hypn}[1] |
| 168 | + {\mbox{\textbf{#1}:}} |
132 | 169 | \alectryon@newenvironment{extragoals}{}{} |
133 | 170 | {\par\alectryon@vsep} |
134 | 171 | \alectryon@newenvironment{messages}{\begin{alectryon@outer}}{\end{alectryon@outer}} |
|
0 commit comments