diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx b/Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx index 4f3a926f460..02808f4060e 100644 --- a/Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx +++ b/Master/texmf-dist/source/latex/testhyphens/testhyphens.dtx @@ -63,7 +63,7 @@ charge for copying, etc. %</driver> %<package>\ProvidesPackage{testhyphens}[% %<*driver,package> -2014/09/13 v.0.6 +2015/11/23 v.0.7 %<package>Prints list of hyphenated words] %</driver,package> %<*driver> @@ -89,7 +89,7 @@ charge for copying, etc. \newcommand*\pack[1]{\textsf{#1}} \newcommand*\prog[1]{\texttt{#1}} \newcommand*\Arg[1]{{\normalfont\texttt{\{}\meta{#1}\texttt{\}}}} - \renewcommand*\oarg[1]{\texttt{[}\marg{#1}\texttt{]}} + \renewcommand*\oarg[1]{\texttt{[}\meta{#1}\texttt{]}} \let\marg\Arg \newcommand*\acro[1]{\expandafter\textsc\expandafter{\MakeLowercase{#1}}} \usepackage{multicol} @@ -196,7 +196,7 @@ charge for copying, etc. % for |lualatex| a package |showhyphens| exists that marks the hyphen % points of an entire document with thin red vertical strokes at the % possible break points. The user may use the package s/he prefers by -% taking into consideration Her/his needs with respect with the features +% taking into consideration her/his needs with respect with the features % and the functionalities of package |testhyphens| compared to those % of |showhyphens|. % @@ -219,7 +219,7 @@ charge for copying, etc. %\begin{sintassi} % |\begin{checkhyphens}|\oarg{hyphenation parameters} % \marg{word list} -% |\end{checklist}| +% |\end{checkhyphens}| %\end{sintassi} % where \meta{hyphenation parameters} is a \emph{hyphen separated list} of two % digits that in order will be assigned by the environment respectively to @@ -229,7 +229,7 @@ charge for copying, etc. % list is preceded and followed by spaces; setting the environment with the % opening and closing statements on single lines, as shown above, is sufficient, % while a source line such as -% |\begin{checkhyphens}|\oarg{hyphenation parameters}\marg{word list}|\end{checklist}| +% |\begin{checkhyphens}|\oarg{hyphenation parameters}\marg{word list}|\end{checkhyphens}| % might not produce the desired result. % % \section[Hyphenation parameters]{Using hyphenation parameters} @@ -252,7 +252,9 @@ charge for copying, etc. % If you use |checkhyphens| with the optional hyphenation parameters specified to % 1 and~1 in Italian or in English, as in %\begin{verbatim} -%checkhyphens[1:1] idea +%\begin{checkhyphens}[1-1] +%idea +%\end{checkhyphens} %\end{verbatim} % you don't get any useful result in English, and the word remains un-hyphenated; % but in Italian is turns out to be \emph{i-de-a} as in Greek. @@ -262,8 +264,8 @@ charge for copying, etc. % to 2 and~2. In English the patterns were created by means of the program % \prog{patgen} where parameters 2 and~3 were set. Typographically speaking % the values 1 and~1 for Italian are almost useless, but in certain difficult -% narrow-measure texts the user has the possibility to locally set the first and/or the -% second parameter to 1, and solve that particular instance of +% narrow-measure texts the user has the possibility to locally set the first +% and/or the second parameter to 1, and solve that particular instance of % problematic narrow-measure typesetting. % % \section{Examples} @@ -277,12 +279,12 @@ charge for copying, etc. %he analyses the samples and submits the analyses to the federal office %} %\end{verbatim} -% The result produced by this package is: +% The result produced by this package, typeset within a four-column multicols environment, is: % -%{\testhyphens +%\begin{multicols}{4}{\testhyphens %manifests instruments %he analyses the samples and submits the analyses to the federal office -%} +%}\end{multicols} % Notice the two instances of the word |analyses|; \TeX\ hyphenates them the % same way in English, but one of the two is hyphenated in a wrong way; % unfortunately there is no way for \TeX\ to distinguish homographic words @@ -304,67 +306,76 @@ charge for copying, etc. %\end{checkhyphens} %\end{verbatim} % that produces the following result: +%\begin{multicols}{4} %\begin{otherlanguage*}{italian} %\begin{checkhyphens} %ebbe la bell'idea di viaggiare in scooter %\end{checkhyphens} -%\end{otherlanguage*} +%\end{otherlanguage*}\end{multicols} %Notice that ``idea'' cannot be hyphenated by \TeX\ when it is an isolated % word; but in Italian the apostrophe is used (also) to mark a vocalic elision, % therefore for hyphenation purposes, even if it is not a letter, it is assigned % a lowercase code, and it legally becomes part of a word, in our case the word % ``bell'idea''. Therefore the patterns that involve the apostrophe produce -% the result shown above, where the first grammatical hyphen shows up again. +% the result shown above, where the first grammatical hyphen point shows up again. % % While typesetting in Greek we might insert in the source file the following code: %\begin{flushleft}\ttfamily\obeylines %|\begin{checkhyphens}| %\begin{otherlanguage*}{greek} -%επεξεργάζεται αρχεία τα οποἰα περιἐχουν τουσ χαρακτήρες που -% υπάρχουν στο πληκτρολὀγιο του υπολογιστἠ σας +%επεξεργάζεται αρχεία τα οποία περιέχουν τουσ χαρακτήρες που +% υπάρχουν στο πληκτρολόγιο του υπολογιστή σας %\end{otherlanguage*} %|\end{checkhyphens}| %\end{flushleft} %and we would get: +%\begin{multicols}{4} %\begin{otherlanguage*}{greek} %\begin{checkhyphens} -%επεξεργάζεται αρχεία τα οποἰα περιἐχουν τουσ χαρακτήρες που υπάρχουν -%στο πληκτρολὀγιο του υπολογιστἠ σας +%επεξεργάζεται αρχεία τα οποία περιέχουν τουσ χαρακτήρες που υπάρχουν +%στο πληκτρολόγιο του υπολογιστή σας %\end{checkhyphens} -%\end{otherlanguage*} -%while, had we set the hyphenation parameters different from the default +%\end{otherlanguage*}\end{multicols} +%\noindent while, had we set the hyphenation parameters different from the default % values 1 and~1, as in: %\begin{flushleft}\ttfamily\obeylines %|\begin{checkhyphens}[2-2]| %\begin{otherlanguage*}{greek} -%επεξεργάζεται αρχεία τα οποἰα περιἐχουν τουσ χαρακτήρες που -%υπάρχουν στο πληκτρολὀγιο του υπολογιστἠ σας +%επεξεργάζεται αρχεία τα οποία περιέχουν τουσ χαρακτήρες που +%υπάρχουν στο πληκτρολόγιο του υπολογιστή σας %\end{otherlanguage*} %|\end{checkhyphens}| %\end{flushleft} -%the result would be +%the result would be: +%\begin{multicols}{4} %\begin{otherlanguage*}{greek} %\begin{checkhyphens}[2-2] -%επεξεργάζεται αρχεία τα οποἰα περιἐχουν τουσ χαρακτήρες που υπάρχουν -%στο πληκτρολὀγιο του υπολογιστἠ σας +%επεξεργάζεται αρχεία τα οποία περιέχουν τουσ χαρακτήρες που υπάρχουν +%στο πληκτρολόγιο του υπολογιστή σας %\end{checkhyphens} -%\end{otherlanguage*} +%\end{otherlanguage*}\end{multicols} % % Notice that as things are at the moment of writing this documentations, % the monotonic Greek hyphenation patterns fail to hyphenate after an -% accented vowel followed by a consonant; the grammar allows to hyphenate -% in that position; but it correctly recognises the hiathus between an -% unaccented vowel and an accented one; at the same time the first Greek -% example shows very clearly the effect of |\lefthyphenmin=1| compared -% to the second example where |\lefthyphenmin=2|. On the other hand, missing -% some hyphen points is certainly a feature that precludes full hyphenation, -% but it does not produce hyphenation errors. +% accented vowel followed by a consonant\footnote{My PDF file of this +% documentations does not exhibit this feature, because I have available the +% correct hyphenations patterns for the three Greek orthographic spellings, but +% these are not yet officially available to the \TeX\ community because the Greek +% maintainers have not yet finished testing them. You might be reading a +% re-typeset version of this documentation, and this feature might be present.}; +% the grammar allows to hyphenate in that position; in any case the patterns +% correctly recognise the hiatus between an accented vowel and an unaccented one. +% The first Greek example shows very clearly the effect of |\lefthyphenmin=1| +% compared to the second example where |\lefthyphenmin=2|. On the other hand, +% the fact that some hyphen points are missing is certainly a feature that +% precludes full hyphenation, but it does not produce hyphenation errors. % % For the user information it was the very use of this package that highlighted % the features/bugs in the Greek hyphenation patterns; at the moment of writing -% this documentation, work is in progress for solving this behaviour. Notice -% that this behaviour is present when typesetting with |babel|, -% while these features are absent when |polyglossia| is used. +% this documentation, work is in progress for testing new hyphen sets. Notice +% that this behaviour is present when typesetting with |pdflatex| and |babel|, +% while these features are absent when |xelatex| or |lualatex| are used with +% |polyglossia|. % \StopEventually{} % % \section{The code} @@ -375,7 +386,7 @@ charge for copying, etc. % published by Victor Eijkout. For my own benefit I changed the declaration % name from |\printhyphens| to |\t@sthyphens|; with an at-sign internal name % it is less likely that the declaration is redefined by a user. I also moved -% the commend |\offinterlineskip| from its penultimate position in the original +% the command |\offinterlineskip| from its penultimate position in the original % code to the first command to be executed within the |\vbox|; in this way % I avoided certain cases in which the lack of interline skip would remain % active after closing the environment. |