summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-09-24 20:23:18 +0000
committerKarl Berry <karl@freefriends.org>2018-09-24 20:23:18 +0000
commita495fe970496337011c0698a03476ce888a26105 (patch)
tree592b35bc873870f28ec4883e3ba0fdd6a4d68119 /Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
parent68966bb4bfd52e8d9d91b9fd5e6ff36d3d74a57e (diff)
l3 (24sep18)
git-svn-id: svn://tug.org/texlive/trunk@48749 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/l3kernel/l3doc.cls')
-rw-r--r--Master/texmf-dist/tex/latex/l3kernel/l3doc.cls37
1 files changed, 24 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
index 3247d6f568c..f796c9937a9 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3doc.cls
@@ -57,6 +57,8 @@
\bool_new:N \g__codedoc_checkfunc_bool
\bool_new:N \g__codedoc_checktest_bool
\bool_new:N \g__codedoc_kernel_bool
+\bool_new:N \g__codedoc_cs_break_bool
+\bool_gset_true:N \g__codedoc_cs_break_bool
\tl_new:N \l__codedoc_tmpa_tl
\tl_new:N \l__codedoc_tmpb_tl
\int_new:N \l__codedoc_tmpa_int
@@ -416,6 +418,10 @@
{ \bool_gset_false:N \g__codedoc_lmodern_bool }
\DeclareOption { lm-default }
{ \bool_gset_true:N \g__codedoc_lmodern_bool }
+\DeclareOption { cs-break-off }
+ { \bool_gset_false:N \g__codedoc_cs_break_bool }
+\DeclareOption { cs-break-nohyphen }
+ { \PassOptionsToPackage{nohyphen}{underscore} }
\DeclareOption* { \PassOptionsToClass { \CurrentOption } { article } }
\ExecuteOptions { full, kernel, nocheck, nochecktest, lm-default }
\PassOptionsToClass { a4paper } { article }
@@ -446,9 +452,9 @@
pifont,
textcomp,
trace,
- underscore,
csquotes,
fancyvrb,
+ underscore,
verbatim
}
\raggedbottom
@@ -686,18 +692,23 @@
\tl_replace_all:Nno \l__codedoc_cmd_tl { _ } \l__codedoc_tmpb_tl
}
\mode_if_math:T { \mbox }
- {
- \verbatim@font
- \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl
- {
- \tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl }
- \tl_replace_all:Non \l__codedoc_cmd_tl
- { \token_to_str:N _ } { \_ }
- }
- \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp }
- \l__codedoc_cmd_tl
- \@
- }
+ {
+ \verbatim@font
+ \__codedoc_if_almost_str:VT \l__codedoc_cmd_tl
+ {
+ \tl_set:Nx \l__codedoc_cmd_tl { \tl_to_str:N \l__codedoc_cmd_tl }
+ \bool_if:NT \g__codedoc_cs_break_bool
+ {
+ \regex_replace_all:nnN
+ {([^\\])_([^\_])}
+ {\1\c{BreakableUnderscore}\2}
+ \l__codedoc_cmd_tl
+ }
+ }
+ \tl_replace_all:Nnn \l__codedoc_cmd_tl { ~ } { \@xobeysp }
+ \l__codedoc_cmd_tl
+ \@
+ }
\bool_if:NF \l__codedoc_cmd_noindex_bool
{
\quark_if_no_value:NF \l__codedoc_cmd_index_tl