Skip to content

Commit

Permalink
chore: 添加dtx语法高亮 [WIP]
Browse files Browse the repository at this point in the history
  • Loading branch information
atxy-blip committed May 12, 2023
1 parent 6f47e23 commit e5b80d1
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion source/njuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,16 @@ To produce the documentation run the original source files ending with
%<*driver>
\ProvidesFile{njuthesis.dtx}
\documentclass[fontset=fandol]{ctxdoc}
\usepackage{listings,njuvisual,tabularray,unicode-math,xeCJKfntef,zhlineskip}
\usepackage{
codehigh,
listings,
njuvisual,
tabularray,
unicode-math,
xeCJKfntef,
zhlineskip
}
\CodeHigh{language=latex/latex3}
\usepackage[firstpage=true]{background}
\backgroundsetup{
contents={\njuemblem[white!85!gray]{22cm}{!}},
Expand Down Expand Up @@ -323,6 +332,13 @@ To produce the documentation run the original source files ending with
\group_end:
}
\group_end:
\cs_set_protected_nopar:Npn \__ctxdoc_output_line:
{
\tex_noindent:D
\__ctxdoc_replace_at_at:N \l__ctxdoc_verbatim_line_tl
\tl_gset_eq:NN \g__codehigh_code_tl \l__ctxdoc_verbatim_line_tl
\__codehigh_typeset_code_text: \tex_par:D
}
\NewDocumentCommand \grd { m }
{ \__ctxdoc_module_angle:n { \color { njuviolet } #1 } }
\NewDocumentCommand \sgrd { m }
Expand All @@ -332,6 +348,8 @@ To produce the documentation run the original source files ending with
\ExplSyntaxOff
\makeatother
\begin{document}
^^A \DisableDocumentation
^^A \DisableImplementation
\DocInput{njuthesis.dtx}
\PrintChanges
\PrintIndex
Expand Down

0 comments on commit e5b80d1

Please sign in to comment.