diff options
author | Karl Berry <karl@freefriends.org> | 2018-09-24 20:23:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-09-24 20:23:18 +0000 |
commit | a495fe970496337011c0698a03476ce888a26105 (patch) | |
tree | 592b35bc873870f28ec4883e3ba0fdd6a4d68119 /Master/texmf-dist/source/latex/l3kernel/l3doc.dtx | |
parent | 68966bb4bfd52e8d9d91b9fd5e6ff36d3d74a57e (diff) |
l3 (24sep18)
git-svn-id: svn://tug.org/texlive/trunk@48749 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3doc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3doc.dtx | 57 |
1 files changed, 43 insertions, 14 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx index b1f0a63c060..9d3746ca2aa 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3doc.dtx @@ -77,7 +77,7 @@ and all files in that bundle must be distributed together. % % \title{The \cls{l3doc} class} % \author{\Team} -% \date{Released 2018-08-23} +% \date{Released 2018-09-24} % \maketitle % \tableofcontents % @@ -281,6 +281,10 @@ and all files in that bundle must be distributed together. % \item |replace| is a boolean key (\texttt{true} by default) which % indicates whether to replace |@@| as \pkg{l3docstrip} does. % \end{itemize} +% These commands allow hyphenation of control sequences after (most) underscores. +% By default, a hyphen is used to mark the hyphenation, but this can be changed with +% the \texttt{cs-break-nohyphen} class option. +% To disable hyphenation of control sequencies entirely, use \texttt{cs-break-off}. % \end{function} % % @@ -687,6 +691,7 @@ and all files in that bundle must be distributed together. % \g_@@_lmodern_bool, % \g_@@_checkfunc_bool, % \g_@@_checktest_bool, +% \g_@@_cs_break_bool, % \g_@@_kernel_bool % } % Information about package options. @@ -695,6 +700,8 @@ and all files in that bundle must be distributed together. \bool_new:N \g_@@_checkfunc_bool \bool_new:N \g_@@_checktest_bool \bool_new:N \g_@@_kernel_bool +\bool_new:N \g_@@_cs_break_bool +\bool_gset_true:N \g_@@_cs_break_bool % \end{macrocode} % \end{variable} % @@ -1412,6 +1419,13 @@ and all files in that bundle must be distributed together. % \end{macrocode} % % \begin{macrocode} +\DeclareOption { cs-break-off } + { \bool_gset_false:N \g_@@_cs_break_bool } +\DeclareOption { cs-break-nohyphen } + { \PassOptionsToPackage{nohyphen}{underscore} } +% \end{macrocode} +% +% \begin{macrocode} \DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } } \ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default } \PassOptionsToClass { a4paper } { article } @@ -1460,9 +1474,9 @@ and all files in that bundle must be distributed together. pifont, textcomp, trace, - underscore, csquotes, fancyvrb, + underscore, verbatim } \raggedbottom @@ -1933,19 +1947,34 @@ and all files in that bundle must be distributed together. \@@_replace_at_at:N \l_@@_cmd_tl \tl_replace_all:Nno \l_@@_cmd_tl { _ } \l_@@_tmpb_tl } +% \end{macrocode} +% \paragraph{Typesetting} +% Note the replacement for the underscore is to permit linebreaks. +% The \texttt{underscore} package adds the linebreak, +% and the regex results in applying the breakable underscore only to the \emph{last} +% of a run of underscores, and not if the underscore follows a backslash. +% \begin{macrocode} \mode_if_math:T { \mbox } - { - \verbatim@font - \@@_if_almost_str:VT \l_@@_cmd_tl - { - \tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl } - \tl_replace_all:Non \l_@@_cmd_tl - { \token_to_str:N _ } { \_ } - } - \tl_replace_all:Nnn \l_@@_cmd_tl { ~ } { \@xobeysp } - \l_@@_cmd_tl - \@ - } + { + \verbatim@font + \@@_if_almost_str:VT \l_@@_cmd_tl + { + \tl_set:Nx \l_@@_cmd_tl { \tl_to_str:N \l_@@_cmd_tl } + \bool_if:NT \g_@@_cs_break_bool + { + \regex_replace_all:nnN + {([^\\])_([^\_])} + {\1\c{BreakableUnderscore}\2} + \l_@@_cmd_tl + } + } + \tl_replace_all:Nnn \l_@@_cmd_tl { ~ } { \@xobeysp } + \l_@@_cmd_tl + \@ + } +% \end{macrocode} +% \paragraph{Indexing} +% \begin{macrocode} \bool_if:NF \l_@@_cmd_noindex_bool { \quark_if_no_value:NF \l_@@_cmd_index_tl |