summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/base/ltdefns.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltdefns.dtx')
-rw-r--r--Master/texmf-dist/source/latex/base/ltdefns.dtx128
1 files changed, 76 insertions, 52 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltdefns.dtx b/Master/texmf-dist/source/latex/base/ltdefns.dtx
index ea55d76b7e9..7cc8a1361b1 100644
--- a/Master/texmf-dist/source/latex/base/ltdefns.dtx
+++ b/Master/texmf-dist/source/latex/base/ltdefns.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1993-2016
+% Copyright 1993-2017
% The LaTeX3 Project and any individual authors listed elsewhere
% in this file.
%
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdefns.dtx}
- [2015/02/21 v1.4b LaTeX Kernel (definition commands)]
+ [2017/03/73 v1.5b LaTeX Kernel (definition commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdefns.dtx}
@@ -144,58 +144,13 @@
% \end{macro}
%
% \begin{macro}{\@@hyph}
-% \begin{macro}{\-}
-% \changes{1.2x}{1995/12/13}{Documentation changed.}
-% The following comment was added when these commands were first set
-% up, 19 April 1986:
-% the |\-| command is redefined to allow it to work in the |\ttfamily|
-% type style, where automatic hyphenation is suppressed by setting
-% |\hyphenchar| to~$-1$. The original primitive \TeX{} definition is
-% saved as |\@@hyph| just in case anyone needs it.
-%
-% There is a need for a robust command for a discretionary hyphen
-% since its exact representation depends on the glyphs available in
-% the current font. For example, with suitable fonts and the
-% \texttt{T1} font encoding it is possible to use hanging hyphens.
-%
-% A suitable robust definition that allows for many possible types of
-% font and encoding may be as follows:
-% \begin{verbatim}
-% \DeclareRobustCommand {\-}{%
-% \discretionary {%
-% \char \ifnum\hyphenchar\font<\z@
-% \defaulthyphenchar
-% \else
-% \hyphenchar\font
-% \fi
-% }{}{}%
-% }
-% \end{verbatim}
-%
-% The redefinition (via |\let|) of |\-| within tabbing also makes the
-% use of a robust command advisable since then any redefinition
-% of |\-| via |\DeclareRobustCommand| will not cause a conflict.
-%
-% Therefore, macro writers should be hereby warned that
-% these internals will probably change! It is likely that a future
-% release of \LaTeX{} will make |\-| effectively an encoding specific
-% text command.
-%
-% \begin{macrocode}
-\let\@@hyph=\- % Save original primitive definition
-\def\-{\discretionary{-}{}{}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\@dischyph}
-% \changes{v1.0g}{1994/04/12}
-% {Define \cs{@dischyph}, was previously in ltboxes.dtx}
+% Save original primitive definition.
% \begin{macrocode}
-\let\@dischyph=\-
+\let\@@hyph=\-
% \end{macrocode}
% \end{macro}
%
+%
% \begin{macro}{\@@italiccorr}
% Save the original italic correction.
% \changes{v1.0a}{1994/03/07}{Macro added}
@@ -659,7 +614,7 @@
% version |\let#1=\relax| but this does not work too well if |#1|
% is |\@temp|\emph{a--e}.)
% \changes{LaTeX2e}{1993/11/23}{Macro reimplemented and extended}
-% \changes{v1.1f}{1994/05/2}{Removed surplus \cs{space} in error}
+% \changes{v1.1f}{1994/05/02}{Removed surplus \cs{space} in error}
% \begin{macrocode}
\def\renewcommand{\@star@or@long\renew@command}
% \end{macrocode}
@@ -766,7 +721,7 @@
% |\newenvironment|. It is OK to |\let| the argument to |\relax|
% here as there should not be a |@temp|\ldots\ environment.
% \changes{LaTeX2e}{1993/11/23}{Macro reimplemented and extended}
-% \changes{v1.1f}{1994/05/2}{Removed surplus \cs{space} in error}
+% \changes{v1.1f}{1994/05/02}{Removed surplus \cs{space} in error}
% \begin{macrocode}
\def\renewenvironment{\@star@or@long\renew@environment}
% \end{macrocode}
@@ -1445,6 +1400,75 @@
% \end{macrocode}
% \end{macro}
%
+% \section{Discretionary Hyphenation}
+% \begin{macro}{\-}
+% \changes{1.2x}{1995/12/13}{Documentation changed.}
+% \changes{v1.5a}{2017/03/13}{Define \cs{-} in terms of \cs{hyphenchar}}
+% \begin{macro}{\@dischyph}
+% \changes{v1.0g}{1994/04/12}
+% {Define \cs{@dischyph}, was previously in ltboxes.dtx}
+% \changes{v1.5b}{2017/03/27}{Define \cs{@dischyph} after \cs{-}}
+% \end{macro}
+% Moved here to be after the definition of |\DeclareRobustCommand|.
+%
+% The primitive |\-| command adds a discretionary hyphen using the
+% current font's |\hyphenchar|. Monospace fonts are usually declared
+% with |\hyphenchar| set to $-1$ to suppress hyhenation.
+%
+% \LaTeX, from \LaTeX2.09 in 1986 defined |\-| by
+% \begin{verbatim}
+% \def\-{\discretionary{-}{}{}}
+% \end{verbatim}
+% The following comment was added when these commands were first set
+% up, 19 April 1986:
+% \begin{quote}
+% the |\-| command is redefined to allow it to work in the |\ttfamily|
+% type style, where automatic hyphenation is suppressed by setting
+% |\hyphenchar| to~$-1$. The original primitive \TeX{} definition is
+% saved as |\@@hyph| just in case anyone needs it.
+% \end{quote}
+%
+% \LaTeXe, between 1993 and 2017, had a comment at this point
+% saying that the definition ``would probably change'' because
+% the definition always uses |-|. The definition used below
+% was given in comments at this point during time.
+%
+% In 2017 we finally enabled this definition by default, with the
+% older \LaTeX\ definition accessible via \textsf{latexrelease}
+% as usual.
+%
+% \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2017/04/15}{\-}{Use \hyphenchar in \-}%
+% \end{macrocode}
+% Temporary definition of |\@latex@info|, final definition is later.
+% \begin{macrocode}
+%<*2ekernel>
+\def\@latex@info#1{}
+%</2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel|latexrelease>
+\DeclareRobustCommand{\-}{%
+ \discretionary{%
+ \char \ifnum\hyphenchar\font<\z@
+ \defaulthyphenchar
+ \else
+ \hyphenchar\font
+ \fi
+ }{}{}%
+}
+\let\@dischyph=\-
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}{\-}{Use \hyphenchar in \-}%
+%<latexrelease>\def\-{\discretionary{-}{}{}}
+%<latexrelease>\let\@dischyph=\-
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
%</2ekernel>
% \end{macrocode}