├── .gitattributes ├── examples ├── bilingual-toc.pdf ├── nested-tables.pdf ├── beamer-no-headline.pdf ├── beamer-set-list.pdf ├── bnf-syntax-pkg.pdf ├── latex-meta-avator.pdf ├── lineno-displaymath.pdf ├── use-cc-icons-font.pdf ├── xhat-in-tensor.pdf ├── booktabs-specialrule.pdf ├── dvipdfmx-pdf-literal.pdf ├── fancyvrb-improvements.pdf ├── float-caption-anatomy.pdf ├── footnote-chinese-style.pdf ├── list-keep-selected-items.pdf ├── listings-output-of-002D.pdf ├── menukeys-stacked-keys.pdf ├── symbol-parallelogram-2.pdf ├── symbol-parallelogram.pdf ├── tabular-cell-generator.pdf ├── tikz-example-flowchart1.pdf ├── tikz-example-flowchart2.pdf ├── tikz-example-planimetry.pdf ├── tikz-mark-right-angle.pdf ├── add-math-active-character.pdf ├── beamer-no-headline-merged.pdf ├── bnf-alignat-and-tabularx.pdf ├── els-cas-caption-in-subfig.pdf ├── fancy-toc-chapter-on-left.pdf ├── graphicx-output-every-page.pdf ├── nfss-declare-math-symbol.pdf ├── output-of-textunderscore.pdf ├── tcolorbox-in-section-title.pdf ├── footnote-chinese-style-examples.pdf ├── unicode-math-multiple-math-fonts.pdf ├── matrix-from-plaintex-to-nicematrix.pdf ├── tikz-example-flowchar2-fit-a4paper.pdf ├── beamer-no-headline-merged.tex ├── symbol-parallelogram-2.tex ├── latex-meta-avator.tex ├── unicode-math-multiple-math-fonts.tex ├── nested-tables.tex ├── symbol-parallelogram.tex ├── add-math-active-character.tex ├── beamer-no-headline.tex ├── output-of-textunderscore.tex ├── tikz-mark-right-angle.tex ├── nfss-declare-math-symbol.tex ├── booktabs-specialrule.tex ├── bnf-syntax-pkg.tex ├── footnote-chinese-style-examples.tex ├── dvipdfmx-pdf-literal.tex ├── use-cc-icons-font.tex ├── fancyvrb-improvements.tex ├── float-caption-anatomy.tex ├── menukeys-stacked-keys.tex ├── cc-icons-mapping.tex ├── els-cas-caption-in-subfig.tex ├── tikz-example-planimetry.tex ├── tcolorbox-in-section-title.tex ├── bnf-alignat-and-tabularx.tex ├── footnote-chinese-style.tex ├── bilingual-toc.tex ├── lineno-displaymath.tex ├── xhat-in-tensor.tex ├── beamer-set-list.tex ├── ieeeaccess-new-float-syntax.md ├── tikz-example-flowchart1.tex ├── list-keep-selected-items.tex ├── tikz-example-flowchart2.tex ├── tikz-example-flowchar2-fit-a4paper.tex ├── listings-output-of-002D.tex ├── fancy-toc-chapter-on-left.tex ├── matrix-from-plaintex-to-nicematrix.tex ├── tabular-cell-generator.tex └── graphicx-output-every-page.tex ├── figures ├── demo-multipage-pdf.pdf └── demo-multipage-pdf.tex ├── tests ├── code-with-output-test.pdf ├── test-print-definition.pdf ├── unique-csname-test.pdf ├── hyperref-autonameref-test.pdf ├── hyperref-sublinkcolor-test.pdf ├── pgfkeys-handler-patch-test.pdf ├── test-tikz-auto-mark-nodes.pdf ├── xcolor-quick-variants-test.pdf ├── pgfkeys-handler-store-in-test.pdf ├── tcb-documentation-test-deprecated.pdf ├── pgfkeys-handler-store-in-test.tex ├── code-with-output-test.tex ├── test-print-definition.tex ├── hyperref-autonameref-test.tex ├── pgfkeys-handler-patch-test.tex ├── hyperref-sublinkcolor-test.tex ├── unique-csname-test.tex ├── test-tikz-auto-mark-nodes.tex ├── tcb-documentation-test-deprecated.tex └── xcolor-quick-variants-test.tex ├── utilities ├── pgfkeyslibraryconditionals.test.pdf ├── print-definition.tex ├── code-with-output.tex ├── pgfkeys-handler-store-in.tex ├── unique-csname.tex ├── xcolor-quick-variants.tex ├── hyperref-autonameref.tex ├── tikz-auto-mark-nodes.tex ├── pgfkeys-handler-patch.tex ├── pgfkeyslibraryconditionals.code.tex ├── hyperref-sublinkcolor.tex ├── pgfkeyslibraryconditionals.test.tex └── tcb-documentation-deprecated.tex ├── .gitignore └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pdf filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /examples/bilingual-toc.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0b59b94da8b89888033bc98c1ba5396f6ea6031a986ec72d2c377952843eb2ba 3 | size 31020 4 | -------------------------------------------------------------------------------- /examples/nested-tables.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b81fd3a8a0d7b1cc5edfc5e494e8d88f9d2d019532c142f202b246f2b7686b61 3 | size 18776 4 | -------------------------------------------------------------------------------- /examples/beamer-no-headline.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5a2c4dfbe7a3916f598a3d784c9db9be58d2ff53347087f9e428171482121611 3 | size 21004 4 | -------------------------------------------------------------------------------- /examples/beamer-set-list.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eb52d59aa8ed24d506d6a80c9973426de3189d074418feb5cc172d9282648f10 3 | size 26846 4 | -------------------------------------------------------------------------------- /examples/bnf-syntax-pkg.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e6efe90eed7f6f2ad34eda028b8b5bc9942dd38a23fd4ba3346a3539ace948a1 3 | size 28203 4 | -------------------------------------------------------------------------------- /examples/latex-meta-avator.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:819f7a6f01bfb8fabd379eb72f6ce4dc0416dbdcd3de8930e50d8448fcb1badf 3 | size 4220 4 | -------------------------------------------------------------------------------- /examples/lineno-displaymath.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:53f312f3b126b28c04c5fe55822810b423c54372f772e656badabc6eb989ab7a 3 | size 25860 4 | -------------------------------------------------------------------------------- /examples/use-cc-icons-font.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e59aed3e76684db7922757cceeb636865fbff9270f0eed87f8b524589913e20 3 | size 93010 4 | -------------------------------------------------------------------------------- /examples/xhat-in-tensor.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c52b86afe0bc75538f9a075814df1418583851d3293b4d4b7f179af6568277ed 3 | size 33825 4 | -------------------------------------------------------------------------------- /figures/demo-multipage-pdf.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:deb531e4b2dee69d80fcf79c639e0f1596f1aeb44bfc2440d74d2587289a60f2 3 | size 10855 4 | -------------------------------------------------------------------------------- /tests/code-with-output-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0cfd3f5351e0093c9a1a99fbbd1a121885fb4b5840cd170e8079e6bec1692787 3 | size 55614 4 | -------------------------------------------------------------------------------- /tests/test-print-definition.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:aa020fa33ecede8575212d978f26e98dd948a1f52fba37208cb0201814b88ad6 3 | size 7602 4 | -------------------------------------------------------------------------------- /tests/unique-csname-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:be4f1b0dd6e05aed92cb2d39873838e3c642a522f8bde6da0605e177dea5c3ac 3 | size 21434 4 | -------------------------------------------------------------------------------- /examples/booktabs-specialrule.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:20dabb008614c31ff25ea5caf7310c7f4db70cffc4515d41bfb411017522abe2 3 | size 16325 4 | -------------------------------------------------------------------------------- /examples/dvipdfmx-pdf-literal.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:647a07fc166d2ef0e240e249e7a437f3dcd0aa52d3405b723ab5fad6036d775e 3 | size 44066 4 | -------------------------------------------------------------------------------- /examples/fancyvrb-improvements.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a942cfb7b459cb7a22d8c26425fb8bf781db9367d07dc294811bed380e397aba 3 | size 8349 4 | -------------------------------------------------------------------------------- /examples/float-caption-anatomy.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b66c3e89004332f36b9f0f9e98c6d0b97520ac88cd2460ecb7d9f048bb2f0481 3 | size 10689 4 | -------------------------------------------------------------------------------- /examples/footnote-chinese-style.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6c564b090b0d0c3b8743020160b5a535fc30706c495af57b48578ed521259d48 3 | size 13122 4 | -------------------------------------------------------------------------------- /examples/list-keep-selected-items.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e6bcb3905393ab4d9fd8d56c2fa11b11b9718febbcc58f8d3f18a0962c7d5e99 3 | size 3500 4 | -------------------------------------------------------------------------------- /examples/listings-output-of-002D.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ae23f4182a45ee16a60aa65f964759515ed9c6b4f9ea28b664d5897243112616 3 | size 51870 4 | -------------------------------------------------------------------------------- /examples/menukeys-stacked-keys.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:583d9ed617b0e2631b2680e47e799996e4d88ff740bf473d61b9aa030f8cc4a7 3 | size 32437 4 | -------------------------------------------------------------------------------- /examples/symbol-parallelogram-2.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:de31700b808eeb370b9302b81eb16a70a6248b71d25fba37ce02612c3b82c0db 3 | size 21324 4 | -------------------------------------------------------------------------------- /examples/symbol-parallelogram.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a56d65983868f2b1c05ac09ecd2b2e1e003eba0d1c84930fdbb1f72bd906b16a 3 | size 25107 4 | -------------------------------------------------------------------------------- /examples/tabular-cell-generator.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:71c806fc20369551476d091d09d3ca84a8660d170ad251279c5be39fa84e9558 3 | size 26343 4 | -------------------------------------------------------------------------------- /examples/tikz-example-flowchart1.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:598bb1f241b106d7880a971c17d125b94647efb44fe09805c47a2be3a737a1fe 3 | size 8034 4 | -------------------------------------------------------------------------------- /examples/tikz-example-flowchart2.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e6da0a38ab8570e44f110df29bbd7827d5140ba87a6bd76fe6ee2a0444169e0 3 | size 15084 4 | -------------------------------------------------------------------------------- /examples/tikz-example-planimetry.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3f4817bab0250957f317f65c15827272b440dac19e9df3796f5833a00cf81b47 3 | size 5925 4 | -------------------------------------------------------------------------------- /examples/tikz-mark-right-angle.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:579e569b16427ba09bb15282ebe1ed999dbd24e5f7a4b5079d12a41444199f22 3 | size 20160 4 | -------------------------------------------------------------------------------- /tests/hyperref-autonameref-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d89799b4c418cecfd7d34d6a75fed3f2c6e0371943c81130172ba654affccd4a 3 | size 43607 4 | -------------------------------------------------------------------------------- /tests/hyperref-sublinkcolor-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bff624a475688c643409f2768e0ca2837d678582ca1e249604c777a9907060e3 3 | size 14741 4 | -------------------------------------------------------------------------------- /tests/pgfkeys-handler-patch-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bf59b6716539c6efc71fea7cfb107fe2b506c41c6565a933d0bbeae04b602b2a 3 | size 5705 4 | -------------------------------------------------------------------------------- /tests/test-tikz-auto-mark-nodes.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4ff199d7382b3218395b69a7740ca904c2e7e56153bf18eca292772c2f2e7378 3 | size 41541 4 | -------------------------------------------------------------------------------- /tests/xcolor-quick-variants-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4d8087aec3a83f5cb7dfd6388102dbec536e9403c8171f56869d7db0b4e347a1 3 | size 30118 4 | -------------------------------------------------------------------------------- /examples/add-math-active-character.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ecde3ed44e48b22f74ebb6b5e2c059894ddbffa2e224d0e44bfc5724a0a5df0c 3 | size 39404 4 | -------------------------------------------------------------------------------- /examples/beamer-no-headline-merged.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0b8a8ec387adad73e798c6801951c0a61ffc1622171ba339080007d93b850c4a 3 | size 20433 4 | -------------------------------------------------------------------------------- /examples/bnf-alignat-and-tabularx.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:749df73a14cb285c6fe11bd77005967b05ad7cf3a03cc6cf1f50517868dd44e2 3 | size 35726 4 | -------------------------------------------------------------------------------- /examples/els-cas-caption-in-subfig.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fcb24e371ac4d885753dd4e8fdd844625da9a47a4e32ff540bd051c4e84e809f 3 | size 58401 4 | -------------------------------------------------------------------------------- /examples/fancy-toc-chapter-on-left.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9173a0faae02f3b8d522ff7ff155e44920676dfdbb97fb5d13d9ffe219ab02da 3 | size 13347 4 | -------------------------------------------------------------------------------- /examples/graphicx-output-every-page.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cbdd79c38a8d264702d50eec2882b4a965496b81c1904e5d97c835673e3c7df2 3 | size 12785 4 | -------------------------------------------------------------------------------- /examples/nfss-declare-math-symbol.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c59b79432df8430dde9868e6f23a2ff95f08c666ef584311900a1e59ddec1148 3 | size 37133 4 | -------------------------------------------------------------------------------- /examples/output-of-textunderscore.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:dd83649b415d78e8aa506fa46468c230369ee8bce738276166d85c4ac3a99e01 3 | size 22249 4 | -------------------------------------------------------------------------------- /examples/tcolorbox-in-section-title.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d88d9f62221efcc341b0246edb368d60b7faf831e1b76a8469d8284418107760 3 | size 26293 4 | -------------------------------------------------------------------------------- /tests/pgfkeys-handler-store-in-test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e578dc0b3103fa4977ded8de5b8598e85cdb97d85ded0a67a0560582266f4be 3 | size 3270 4 | -------------------------------------------------------------------------------- /examples/footnote-chinese-style-examples.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:83d7d010b50c94d5ef423fbe03cf97211f9280ed443f2947d9cfcb431b8ad2dc 3 | size 28287 4 | -------------------------------------------------------------------------------- /examples/unicode-math-multiple-math-fonts.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c3788ca24e01d09a260d4f8473b54342fff23a94088d5913d1b3dac69a92949e 3 | size 25839 4 | -------------------------------------------------------------------------------- /tests/tcb-documentation-test-deprecated.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2d47f2e8b21173abd43d973d90ff97e6f2f35fc0fa4a03d677de8b1caae0a306 3 | size 48305 4 | -------------------------------------------------------------------------------- /utilities/pgfkeyslibraryconditionals.test.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:964d727c7491a16b4c4100c46417d08c92fe3c15df85497750593a09f7b5b8e8 3 | size 26586 4 | -------------------------------------------------------------------------------- /examples/matrix-from-plaintex-to-nicematrix.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:eccfc771b85d8214cb37f1d67b22e10f372a79194a598b57b57d5e55d076ff3b 3 | size 41920 4 | -------------------------------------------------------------------------------- /examples/tikz-example-flowchar2-fit-a4paper.pdf: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b895df34e16f6e894274d1221907b57bcb6e53b1a718fd8fc1f379d7cf6c8d7f 3 | size 73609 4 | -------------------------------------------------------------------------------- /examples/beamer-no-headline-merged.tex: -------------------------------------------------------------------------------- 1 | \documentclass[landscape]{article} 2 | \usepackage{pdfpages} 3 | \begin{document} 4 | \includepdf[pages=-,nup=2x2, frame, templatesize={400pt}{300pt}]{beamer-no-headline} 5 | \end{document} -------------------------------------------------------------------------------- /figures/demo-multipage-pdf.tex: -------------------------------------------------------------------------------- 1 | \documentclass{standalone} 2 | \standaloneenv{nothing} 3 | \usepackage{pgffor} 4 | \begin{document} 5 | \Huge 6 | \makeatletter 7 | \foreach \i in {1, ..., 7} { 8 | \begin{nothing}% 9 | \fbox{\@Alph{\i}}% 10 | \end{nothing} 11 | } 12 | \end{document} -------------------------------------------------------------------------------- /tests/pgfkeys-handler-store-in-test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \pagestyle{empty} 3 | 4 | \input{../utilities/pgfkeys-handler-store-in} 5 | 6 | \begin{document} 7 | \pgfkeys{options/.store in=\savedOptions} 8 | 9 | \pgfkeys{options=abc} 10 | \meaning\savedOptions % "macro:->abc" 11 | 12 | \pgfkeys{options/.add={before }{ after}} 13 | \meaning\savedOptions % "macro:->before abc after" 14 | 15 | \pgfkeys{options/.get=\xsaved} 16 | \meaning\xsaved % "macro:->before abc after" 17 | \end{document} 18 | -------------------------------------------------------------------------------- /examples/symbol-parallelogram-2.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{amsmath} 3 | \usepackage{tikz} 4 | \input code-with-output 5 | \begin{document} 6 | 7 | \begin{example*}{Type parallelogram 3 - draw the symbol} 8 | %\usepackage{amsmath} 9 | %\usepackage{tikz} 10 | %% ref: https://liam.page/2013/04/13/LaTeX-parallelogram/ 11 | \newcommand\parallelogram{% 12 | \mathord{\text{% 13 | \tikz[baseline] 14 | \draw ( 0em, .1ex) -- ++( .9em, 0ex) -- 15 | ++(.2em, 1.2ex) -- ++(-.9em, 0ex) -- cycle;}}} 16 | $\parallelogram ABCD$ 17 | \end{example*} 18 | 19 | \end{document} -------------------------------------------------------------------------------- /examples/latex-meta-avator.tex: -------------------------------------------------------------------------------- 1 | % avatar for QQ group 2 | \documentclass{article} 3 | \usepackage{fontspec} 4 | \usepackage[papersize={200pt, 200pt}, margin=0pt]{geometry} 5 | \usepackage{graphicx} 6 | \usepackage[dvipsnames]{xcolor} 7 | 8 | \pagestyle{empty} 9 | \parindent=0pt 10 | % extra bold for readability in small size of avatar 11 | \setsansfont[AutoFakeBold=3]{Latin Modern Sans} 12 | 13 | \begin{document} 14 | \centering 15 | \vspace*{5pt}% 16 | \fontsize{80}{80}\selectfont\TeX\\ 17 | \vspace{20pt}% 18 | \fontsize{20}{24}\selectfont\sffamily\bfseries\color{RawSienna}% 19 | \MakeUppercase{M e t a - C N} 20 | \end{document} -------------------------------------------------------------------------------- /examples/unicode-math-multiple-math-fonts.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{unicode-math} 3 | \setmathfont{Latin Modern Math} 4 | \setmathfont{SourceHanSerif-Heavy}[range="002C] 5 | 6 | \input code-with-output 7 | 8 | \begin{document} 9 | 10 | \setcounter{tcb@cnt@example}{1} 11 | \begin{example}{Use multiple fonts for math formulae} 12 | %\usepackage{unicode-math} 13 | %\setmathfont{Latin Modern Math} 14 | %\setmathfont{SourceHanSerif-Heavy}[range="002C] 15 | 16 | \LARGE 17 | text mode: abc, def, xyz, 123 \par 18 | math mode: $(1,1) + (x, y)$ and $i = 1, 2, \dots, n$ 19 | \end{example} 20 | 21 | \end{document} 22 | -------------------------------------------------------------------------------- /tests/code-with-output-test.tex: -------------------------------------------------------------------------------- 1 | % !TeX TXS-program:compile = txs:///pdflatex/{%.tex} -shell-escape "%.tex" 2 | \documentclass{article} 3 | \input{../utilities/code-with-output} 4 | 5 | \begin{document} 6 | 7 | \begin{example}{This is title} 8 | numbered 9 | \end{example} 10 | 11 | \begin{example}{} 12 | numbered, with empty title 13 | \end{example} 14 | 15 | \begin{example}[sidebyside]{This is title} 16 | numbered, with option sidebyside 17 | \end{example} 18 | 19 | 20 | \begin{example*}{This is title} 21 | un-numbered 22 | \end{example*} 23 | 24 | \begin{example*}{} 25 | un-numbered, with empty title 26 | \end{example*} 27 | 28 | \end{document} 29 | -------------------------------------------------------------------------------- /tests/test-print-definition.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{xparse} 3 | 4 | \input ../utilities/print-definition 5 | 6 | 7 | \begin{document} 8 | 9 | \printAndRunCode{\newcommand{\cmd}[1][x]{def}} 10 | \printDef{cmd} 11 | \printDef{\cmd} 12 | 13 | \printAndRunCode{\newenvironment{abc*}{begdef}{enddef}} 14 | \printDef{abc*} 15 | \printDef{endabc*} 16 | 17 | \printAndRunCode{\NewDocumentCommand{\xyz}{s}{def}} 18 | \printDef{xyz code} 19 | 20 | \printAndRunCode{\NewDocumentEnvironment{pqr}{s}{begindef}{enddef}} 21 | 22 | \printDef{pqr} 23 | \printDef{endpqr} 24 | \printDef{environment pqr code} 25 | \printDef{environment pqr end aux } 26 | 27 | \end{document} 28 | -------------------------------------------------------------------------------- /examples/nested-tables.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \input code-with-output 3 | \begin{document} 4 | 5 | \begin{example*}{Nested tables} 6 | \newcommand{\innerTable}{ 7 | % "@{}" inserts zero colume sep 8 | \multicolumn{1}{|@{}c@{}|}{ 9 | % to exactly touch the outer table, inner table, as a cell of 10 | % the outer, should be the widest/highest cell of column/row 11 | \begin{tabular}{c|c} 12 | a & content \\ \hline b & b 13 | \end{tabular} 14 | } 15 | } 16 | 17 | \begin{tabular}{|c|c|} 18 | \hline 19 | content & content \\ \hline 20 | content & \innerTable \\ \hline 21 | \end{tabular} 22 | \end{example*} 23 | 24 | \end{document} -------------------------------------------------------------------------------- /tests/hyperref-autonameref-test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{pgffor} 3 | 4 | \input{../utilities/hyperref-autonameref.tex} 5 | 6 | \hypersetup{colorlinks, linkcolor=blue} 7 | 8 | \makeatletter 9 | \def\HyRef@autonameref@style#1{``#1''} 10 | \makeatother 11 | 12 | \begin{document} 13 | 14 | \parindent=0pt 15 | 16 | Test \verb|\autonameref|\par 17 | \foreach \i in {sec, sec2, sec3} { 18 | see \autonameref{\i} on \autopageref{\i} \par 19 | } 20 | \bigskip 21 | 22 | Test starred form\par 23 | \foreach \i in {sec, sec2, sec3} { 24 | see \autonameref*{\i} on \autopageref*{\i} \par 25 | } 26 | 27 | \section{title}\label{sec} 28 | \subsection{subtitle}\label{sec2} 29 | \subsubsection{subsubtitle}\label{sec3} 30 | 31 | \end{document} 32 | -------------------------------------------------------------------------------- /examples/symbol-parallelogram.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{unicode-math} 3 | \input code-with-output 4 | \begin{document} 5 | 6 | \begin{example*}{Type parallelogram 1 - use appropriate Unicode math fonts} 7 | %\usepackage{unicode-math} 8 | \setmathfont{STIX Math} 9 | STIX Math: $ ▱ABCD, \parallelogram ABCD$ \par 10 | \setmathfont{XITS Math} 11 | XITS Math: $ ▱ABCD, \parallelogram ABCD$ 12 | \end{example*} 13 | 14 | \begin{example*}{Type parallelogram 2 - use multiple Unicode math fonts} 15 | %\usepackage{unicode-math} 16 | \setmathfont{Latin Modern Math} 17 | \setmathfont[range="25B1]{STIX Math} 18 | STIX Math: $ ▱ABCD, \parallelogram ABCD$ \par 19 | \setmathfont[range="25B1]{XITS Math} 20 | XITS Math: $ ▱ABCD, \parallelogram ABCD$ 21 | \end{example*} 22 | 23 | \end{document} -------------------------------------------------------------------------------- /examples/add-math-active-character.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{amsmath} 3 | \usepackage{xcolor} 4 | 5 | \input code-with-output 6 | \begin{document} 7 | 8 | \begin{example}{Default output} 9 | %\documentclass{ctexart} 10 | %\usepackage{amsmath} 11 | 12 | text mode: english, comma 中文,逗号\par 13 | math mode: $(x, y)$ and $\text{中文,逗号}$ 14 | \end{example} 15 | 16 | 17 | \setcounter{tcb@cnt@example}{3} 18 | \begin{example}[minted options app={breakafter=/}]{Make \texttt{","} active in math mode} 19 | %\usepackage{amsmath} 20 | 21 | \begingroup 22 | \catcode `\,=\active 23 | \gdef,{\mathpunct{\text{逗号}}} 24 | \endgroup 25 | \mathcode`\,="8000 26 | % ref: https://github.com/yuw/texmf-mathpunctspace/blob/master/tex/latex/mathpunctspace/mathpunctspace.sty#L83-L98 27 | 28 | \LARGE 29 | text mode: english, comma 中文,逗号\par 30 | math mode: $abc, abc$ 31 | \end{example} 32 | 33 | \end{document} -------------------------------------------------------------------------------- /examples/beamer-no-headline.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{beamer} 2 | \usetheme{Warsaw} 3 | \usepackage{lipsum} 4 | \begin{document} 5 | \section{Section I} 6 | 7 | {% 8 | \setbeamertemplate{headline}{} 9 | \vspace*{-1.04cm} 10 | \begin{frame} 11 | \frametitle{title} 12 | {\Large Use magic number \texttt{1.04cm}}\par\lipsum[2] 13 | \end{frame} 14 | } 15 | 16 | {% 17 | \setbeamertemplate{headline}{} 18 | \makeatletter 19 | \vspace*{-\dimexpr\headheight+\f@size pt\relax} 20 | \makeatother 21 | \begin{frame} 22 | \frametitle{title} 23 | {\Large Use calculations}\par\lipsum[2] 24 | \end{frame} 25 | } 26 | 27 | \section{Section II} 28 | \begin{frame} 29 | \frametitle{title}\par\lipsum[2] 30 | \end{frame} 31 | 32 | \section{Section III} 33 | \section{Section IV} 34 | \begin{frame} 35 | \frametitle{title} 36 | \end{frame} 37 | \end{document} -------------------------------------------------------------------------------- /examples/output-of-textunderscore.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \loggingoutput\scrollmode 3 | %\usepackage[T1]{fontenc} 4 | %\usepackage{unravel} 5 | %\unravelsetup{max-input=1000, max-output=1000, max-action=1000} 6 | \input code-with-output 7 | 8 | \begin{document} 9 | \begin{example}{Compare output of \texttt{\textbackslash\_} in different font encodings} 10 | \def\test#1{\makebox[1.5em][r]{#1}: MM\_MM} 11 | 12 | \usefont{OT1}{cmr}{m}{n} \test{OT1} \par 13 | \usefont{T1} {cmr}{m}{n} \test{T1} \par 14 | \usefont{TU} {lmr}{m}{n} \test{TU} \par 15 | \end{example} 16 | 17 | \begin{example}{Redefine \texttt{\textbackslash\_} in \texttt{TU} font encoding} 18 | \makeatletter 19 | \long\def\@tempa{TU} 20 | \ifx\UnicodeEncodingName\@tempa 21 | \let\textunderscore\relax 22 | \DeclareRobustCommand{\textunderscore}{% 23 | \leavevmode \kern.06em\vbox{\hrule\@width.3em}\kern.06em} 24 | \fi 25 | \makeatother 26 | 27 | MM\_MM 28 | \end{example} 29 | 30 | \end{document} -------------------------------------------------------------------------------- /tests/pgfkeys-handler-patch-test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{tcolorbox} 3 | 4 | \usepackage{array,tabularx} 5 | \usepackage{colortbl} 6 | 7 | \input{../utilities/pgfkeys-handler-patch} 8 | 9 | 10 | \begin{document} 11 | 12 | \tcbset{ 13 | colframe=black!25, 14 | colbacktitle=black!75 15 | } 16 | 17 | \begin{tcolorbox}[boxrule=5pt, tabularx*={\arrayrulewidth0.5mm}{X|X|X}, title=Before patching] 18 | One & Two & Three \\ \hline\hline 19 | 1000.00 & 2000.00 & 3000.00 \\ \hline 20 | 2000.00 & 3000.00 & 4000.00 21 | \end{tcolorbox} 22 | 23 | % patch option "tabularx*", remove "boxrule=0.5mm" 24 | % from question https://tex.stackexchange.com/q/559367 25 | \tcbset{ 26 | tabularx*/.patch={boxrule=0.5mm}{} 27 | } 28 | 29 | \begin{tcolorbox}[boxrule=5pt, tabularx*={\arrayrulewidth0.5mm}{X|X|X}, title=After patching] 30 | One & Two & Three \\ \hline\hline 31 | 1000.00 & 2000.00 & 3000.00 \\ \hline 32 | 2000.00 & 3000.00 & 4000.00 33 | \end{tcolorbox} 34 | 35 | \end{document} 36 | -------------------------------------------------------------------------------- /examples/tikz-mark-right-angle.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{tikz} 3 | 4 | \usetikzlibrary{angles} 5 | \input code-with-output 6 | \begin{document} 7 | 8 | \begin{example*}{Markup a right angle} 9 | \begin{tikzpicture} 10 | \draw (20:1cm) coordinate (A) -- (0, 0) coordinate (O) -- (110:1cm) coordinate (B) 11 | pic [draw, pic text=$\beta$, angle radius=5pt, angle eccentricity=.8] {right angle = A--O--B}; 12 | \end{tikzpicture} 13 | \end{example*} 14 | 15 | \verb|angle radius = \i, angle eccentricity = \j|\par 16 | 17 | \foreach \i in {5pt, 10pt, 15pt} { 18 | \texttt{\textbackslash i = \i}: 19 | \foreach \j in {0.5, 1, 1.5} { 20 | \rlap{\begin{tikzpicture}[baseline=(text.base)] 21 | \draw (20:1cm) coordinate (A) -- (0, 0) coordinate (O) -- (110:1cm) coordinate (B); 22 | \pic [draw, pic text=$\beta$, angle radius=\i, angle eccentricity=\j] {right angle = A--O--B}; 23 | \node (text) at (.3, -.3) {\texttt{\textbackslash j = \j}}; 24 | \end{tikzpicture}}\hspace*{50pt} 25 | }\par 26 | } 27 | 28 | \end{document} -------------------------------------------------------------------------------- /examples/nfss-declare-math-symbol.tex: -------------------------------------------------------------------------------- 1 | % !TeX document-id = {c72bc354-4143-4099-bb9d-620c6e3f7b35} 2 | % !TeX TXS-program:compile = txs:///xelatex/{%.tex} -shell-escape "%.tex" 3 | \documentclass{ctexart} 4 | 5 | \DeclareSymbolFont{cnmath}{TU}{SongtiSCLight(0)}{m}{n} 6 | \AtBeginDocument{ 7 | \DeclareMathSymbol{,}{\mathpunct}{cnmath}{"2C} 8 | } 9 | 10 | 11 | \input code-with-output 12 | 13 | \begin{document} 14 | 15 | \setcounter{tcb@cnt@example}{2} 16 | \begin{example}{(Re)declare math symbol} 17 | % \DeclareSymbolFont{cnmath}{TU}{SongtiSCLight(0)}{m}{n} 18 | % \AtBeginDocument{ 19 | % \DeclareMathSymbol{,}{\mathpunct}{cnmath}{"2C} 20 | % } 21 | 22 | \LARGE 23 | text mode: english, comma 中文,逗号\par 24 | math mode: $abc, abc$ 25 | \end{example} 26 | 27 | \begin{example*}{Print current font info} 28 | % ref: https://tex.stackexchange.com/a/303536 29 | \newcommand{\printInternalCurrentFont}{% 30 | \ExpandArgs{e}\texttt{\expandafter\string\the\font}% 31 | } 32 | 33 | 中文\printInternalCurrentFont 34 | \end{example*} 35 | 36 | \end{document} -------------------------------------------------------------------------------- /utilities/print-definition.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage{fvextra} 2 | \RequirePackage{xcolor} 3 | 4 | \newcommand{\printDef}[1]{% 5 | \begingroup 6 | \ttfamily 7 | % output command 8 | \noindent\hspace*{-\parindent}\color{blue}% 9 | \textbackslash\Verb*|#1|% 10 | \normalcolor\par 11 | % output definition of \cs{#1} 12 | \toString{#1}% 13 | \list{}{\leftmargin=2em\topsep=0pt\parsep=0pt\partopsep=0pt}% 14 | \item[]\expandafter\meaning\csname \csname l_tmpa_tl\endcsname\endcsname 15 | \endlist 16 | \endgroup 17 | \vskip\topsep 18 | } 19 | 20 | \newcommand{\printAndRunCode}[1]{% 21 | \addvspace{2\topsep}% 22 | \begingroup 23 | \ttfamily 24 | \noindent\hspace*{-\parindent}\color{orange}% 25 | \Verb*|#1|% 26 | \normalcolor\par 27 | \endgroup 28 | #1% 29 | } 30 | 31 | % add \string in front of each token in #1 32 | % based on https://tex.stackexchange.com/a/44444 33 | \ExplSyntaxOn 34 | \cs_new:Npn \toString #1 35 | { 36 | \tl_set:Nn \l_tmpa_tl {#1} 37 | \regex_replace_all:nnN { . } { \c{string} \0 } \l_tmpa_tl 38 | \tl_set:Nx \l_tmpa_tl { \l_tmpa_tl } 39 | } 40 | \ExplSyntaxOff 41 | -------------------------------------------------------------------------------- /examples/booktabs-specialrule.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{booktabs} 3 | \input code-with-output 4 | \begin{document} 5 | 6 | \begin{example}{\texttt{booktabs} - regular usage} 7 | \begin{tabular}{@{}lr@{}} 8 | \toprule 9 | a & b \\ 10 | \midrule 11 | cc & dd \\ 12 | ccc& ddd \\ 13 | \bottomrule 14 | \end{tabular} 15 | \end{example} 16 | 17 | \begin{example}{\texttt{booktabs} - spitted vertical rules} 18 | \begin{tabular}{|@{}l|r@{}|} 19 | \toprule 20 | a & b \\ 21 | \midrule 22 | cc & dd \\ 23 | ccc& ddd \\ 24 | \bottomrule 25 | \end{tabular} 26 | \end{example} 27 | 28 | \begin{example}{\texttt{booktabs} - irregular usage, with v-rules} 29 | \begin{tabular}{@{\hspace{3pt}}|l|r|@{\hspace{3pt}}} 30 | \specialrule{.08em}{0pt}{0pt} 31 | a & b \\ 32 | \specialrule{.05em}{0pt}{0pt} 33 | cc & dd \\ 34 | ccc& ddd \\ 35 | \specialrule{.08em}{0pt}{0pt} 36 | \end{tabular} 37 | \end{example} 38 | 39 | \end{document} 40 | 41 | \specialrule{}{}{} 42 | 43 | % equivalent usages 44 | \toprule == \specialrule{.08em}{0pt} {.65ex} 45 | \midrule == \specialrule{.05em}{.4ex}{.65ex} 46 | \bottomrule == \specialrule{.08em}{.4ex}{0pt} 47 | -------------------------------------------------------------------------------- /tests/hyperref-sublinkcolor-test.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \usepackage{xcolor} 3 | 4 | \input{../utilities/hyperref-sublinkcolor} 5 | 6 | \hypersetup{ 7 | colorlinks, 8 | subcolorByLabelPrefix, 9 | % syntax: sublinkcolor={