summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-07 21:08:29 +0000
committerKarl Berry <karl@freefriends.org>2017-08-07 21:08:29 +0000
commit3789b48e375fa4cf571aba22961afe3feee202ef (patch)
tree7a81f5312e24846127baef0d81bd31b711556f9b /Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
parent7861a6fb7a7b64db8e54f302f3e5b6eda299e177 (diff)
ctex (7aug17)
git-svn-id: svn://tug.org/texlive/trunk@44974 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctxdoc.cls')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctxdoc.cls24
1 files changed, 19 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
index a792316d9cc..3eb6ab774cb 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx c498d8c 2017-04-01 21:33:50 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx e177d82 2017-08-07 16:58:14 +0800 Qing Lee <sobenlee@gmail.com> $
{ctex documentation (CTEX)}
\ProvidesExplClass{ctxdoc}
- {\ExplFileDate}{2.4.9}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.10}{\ExplFileDescription}
\ExplSyntaxOff
\let\pdfmdfivesum\mdfivesum
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}}
@@ -438,7 +438,7 @@
{ \if@inlabel \leavevmode \fi }
{ \partopsep \z@skip }
\group_begin:
- \int_set_eq:NN \tex_endlinechar:D \c_minus_one
+ \int_set:Nn \tex_endlinechar:D { -1 }
\use:n
{
\char_set_catcode_active:n { 32 }
@@ -476,6 +476,13 @@
\__ctxdoc_verbatim_read_line:w
}
}
+ \cs_new_protected:Npn \__ctxdoc_swap_cr:
+ { \exp_after:wN \__ctxdoc_swap_cr:w \l__ctxdoc_verbatim_line_tl }
+ \cs_new_protected:Npn \__ctxdoc_swap_cr:w #1 ^^M
+ {
+ \group_insert_after:N ^^M
+ \tl_set:Nn \l__ctxdoc_verbatim_line_tl {#1}
+ }
\tl_const:Nn \c__ctxdoc_active_cr_tl { ^^M }
\group_end:
\tl_new:N \l__ctxdoc_verbatim_line_tl
@@ -496,7 +503,10 @@
\cs_gset_eq:NN \__ctxdoc_verbatim_process_line: \__ctxdoc_process_normal_line:
\__ctxdoc_output_module:nn
{ \color { verb@guard } }
- { \__ctxdoc_module_pop:n { \l__ctxdoc_verbatim_line_tl } }
+ {
+ \__ctxdoc_swap_cr:
+ \__ctxdoc_module_pop:n { \l__ctxdoc_verbatim_line_tl }
+ }
}
{ \tl_use:N \l__ctxdoc_verbatim_line_tl }
}
@@ -573,7 +583,10 @@
{ \c_percent_str \tl_tail:n {#1} }
\__ctxdoc_output_module:nn
{ \color { verb@guard } }
- { \__ctxdoc_module_push:n { \l__ctxdoc_verbatim_line_tl } }
+ {
+ \__ctxdoc_swap_cr:
+ \__ctxdoc_module_push:n { \l__ctxdoc_verbatim_line_tl }
+ }
}
\group_end:
\cs_new_protected_nopar:Npn \__ctxdoc_output_line:
@@ -613,6 +626,7 @@
\tex_noindent:D
\group_begin:
\color { code@gray }
+ \__ctxdoc_swap_cr:
\str_if_eq_x:nnTF { \f@shape } { \updefault }
{ \slshape }
{ \upshape }