summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexhook.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexhook.sty')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexhook.sty76
1 files changed, 76 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty
new file mode 100644
index 00000000000..f492b7444dd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty
@@ -0,0 +1,76 @@
+%%
+%% This is file `ctexhook.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `ctexhook')
+%%
+%% Copyright (C) 2003--2015
+%% CTEX.ORG and any individual authors listed in the documentation.
+%% ------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainers of this work are Leo Liu, Qing Lee and Liam Huang.
+%%
+%% ------------------------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\GetIdInfo$Id: ctex.dtx 6255367 2015-07-01 01:15:24 +0800 Qing Lee <sobenlee@gmail.com> $
+ {Document and package hooks (CTEX)}
+\ProvidesExplPackage{ctexhook}
+ {\ExplFileDate}{2.2}{\ExplFileDescription}
+\cs_new_protected:Npn \ctex_at_end_preamble:n #1
+ { \tl_gput_right:Nn \g__ctex_end_preamble_hook_tl {#1} }
+\cs_new_protected:Npn \ctex_after_end_preamble:n #1
+ { \tl_gput_right:Nn \g__ctex_after_end_preamble_hook_tl {#1} }
+\cs_new_protected_nopar:Npn \CTEX@document@left@hook
+ { \group_end: \g__ctex_end_preamble_hook_tl \group_begin: }
+\cs_new_protected_nopar:Npn \CTEX@document@right@hook
+ { \scan_stop: \g__ctex_after_end_preamble_hook_tl \tex_ignorespaces:D }
+\cs_set_nopar:Npx \document
+ {
+ \CTEX@document@left@hook
+ \exp_not:o { \document }
+ \CTEX@document@right@hook
+ }
+\tl_new:N \g__ctex_end_preamble_hook_tl
+\tl_new:N \g__ctex_after_end_preamble_hook_tl
+\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
+ {
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
+ }
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
+ {
+ \tl_if_exist:NF #1 { \tl_new:N #1 }
+ \tl_gput_right:Nn #1 {#2}
+ }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
+\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
+ {
+ \cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
+ { \cs_undefine:c { g__ctex_at_end_ #1 _hook_tl } }
+ }
+\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
+\tl_put_left:Nn \@popfilename
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
+%%
+%%
+%% End of file `ctexhook.sty'.