├── .gitattributes ├── .gitignore ├── README.md ├── examples ├── add-math-active-character.pdf ├── add-math-active-character.tex ├── beamer-no-headline-merged.pdf ├── beamer-no-headline-merged.tex ├── beamer-no-headline.pdf ├── beamer-no-headline.tex ├── beamer-set-list.pdf ├── beamer-set-list.tex ├── bilingual-toc.pdf ├── bilingual-toc.tex ├── bnf-alignat-and-tabularx.pdf ├── bnf-alignat-and-tabularx.tex ├── bnf-syntax-pkg.pdf ├── bnf-syntax-pkg.tex ├── booktabs-specialrule.pdf ├── booktabs-specialrule.tex ├── cc-icons-mapping.tex ├── dvipdfmx-pdf-literal.pdf ├── dvipdfmx-pdf-literal.tex ├── els-cas-caption-in-subfig.pdf ├── els-cas-caption-in-subfig.tex ├── fancy-toc-chapter-on-left.pdf ├── fancy-toc-chapter-on-left.tex ├── fancyvrb-improvements.pdf ├── fancyvrb-improvements.tex ├── float-caption-anatomy.pdf ├── float-caption-anatomy.tex ├── footnote-chinese-style-examples.pdf ├── footnote-chinese-style-examples.tex ├── footnote-chinese-style.pdf ├── footnote-chinese-style.tex ├── graphicx-output-every-page.pdf ├── graphicx-output-every-page.tex ├── ieeeaccess-new-float-syntax.md ├── latex-meta-avator.pdf ├── latex-meta-avator.tex ├── lineno-displaymath.pdf ├── lineno-displaymath.tex ├── list-keep-selected-items.pdf ├── list-keep-selected-items.tex ├── listings-output-of-002D.pdf ├── listings-output-of-002D.tex ├── matrix-from-plaintex-to-nicematrix.pdf ├── matrix-from-plaintex-to-nicematrix.tex ├── menukeys-stacked-keys.pdf ├── menukeys-stacked-keys.tex ├── nested-tables.pdf ├── nested-tables.tex ├── nfss-declare-math-symbol.pdf ├── nfss-declare-math-symbol.tex ├── output-of-textunderscore.pdf ├── output-of-textunderscore.tex ├── symbol-parallelogram-2.pdf ├── symbol-parallelogram-2.tex ├── symbol-parallelogram.pdf ├── symbol-parallelogram.tex ├── tabular-cell-generator.pdf ├── tabular-cell-generator.tex ├── tcolorbox-in-section-title.pdf ├── tcolorbox-in-section-title.tex ├── tikz-example-flowchar2-fit-a4paper.pdf ├── tikz-example-flowchar2-fit-a4paper.tex ├── tikz-example-flowchart1.pdf ├── tikz-example-flowchart1.tex ├── tikz-example-flowchart2.pdf ├── tikz-example-flowchart2.tex ├── tikz-example-planimetry.pdf ├── tikz-example-planimetry.tex ├── tikz-mark-right-angle.pdf ├── tikz-mark-right-angle.tex ├── unicode-math-multiple-math-fonts.pdf ├── unicode-math-multiple-math-fonts.tex ├── use-cc-icons-font.pdf ├── use-cc-icons-font.tex ├── xhat-in-tensor.pdf └── xhat-in-tensor.tex ├── figures ├── demo-multipage-pdf.pdf └── demo-multipage-pdf.tex ├── tests ├── code-with-output-test.pdf ├── code-with-output-test.tex ├── hyperref-autonameref-test.pdf ├── hyperref-autonameref-test.tex ├── hyperref-sublinkcolor-test.pdf ├── hyperref-sublinkcolor-test.tex ├── pgfkeys-handler-patch-test.pdf ├── pgfkeys-handler-patch-test.tex ├── pgfkeys-handler-store-in-test.pdf ├── pgfkeys-handler-store-in-test.tex ├── tcb-documentation-test-deprecated.pdf ├── tcb-documentation-test-deprecated.tex ├── test-print-definition.pdf ├── test-print-definition.tex ├── test-tikz-auto-mark-nodes.pdf ├── test-tikz-auto-mark-nodes.tex ├── unique-csname-test.pdf ├── unique-csname-test.tex ├── xcolor-quick-variants-test.pdf └── xcolor-quick-variants-test.tex └── utilities ├── code-with-output.tex ├── hyperref-autonameref.tex ├── hyperref-sublinkcolor.tex ├── pgfkeys-handler-patch.tex ├── pgfkeys-handler-store-in.tex ├── pgfkeyslibraryconditionals.code.tex ├── pgfkeyslibraryconditionals.test.pdf ├── pgfkeyslibraryconditionals.test.tex ├── print-definition.tex ├── tcb-documentation-deprecated.tex ├── tikz-auto-mark-nodes.tex ├── unique-csname.tex └── xcolor-quick-variants.tex /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pdf filter=lfs diff=lfs merge=lfs -text 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## ref: https://github.com/muzimuzhi/gitignore/blob/master/TeX.gitignore 2 | 3 | ## Core latex/pdflatex auxiliary files: 4 | *.aux 5 | *.lof 6 | *.log 7 | *.lot 8 | *.fls 9 | *.out 10 | *.toc 11 | *.fmt 12 | *.fot 13 | *.cb 14 | *.cb2 15 | .*.lb 16 | 17 | ## Intermediate documents: 18 | *.dvi 19 | *.xdv 20 | *-converted-to.* 21 | # these rules might exclude image files for figures etc. 22 | # *.ps 23 | # *.eps 24 | # *.pdf 25 | 26 | ## Generated if empty string is given at "Please type another file name for output:" 27 | .pdf 28 | 29 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 30 | *.bbl 31 | *.bcf 32 | *.blg 33 | *-blx.aux 34 | *-blx.bib 35 | *.run.xml 36 | 37 | ## Build tool auxiliary files: 38 | *.fdb_latexmk 39 | *.synctex 40 | *.synctex(busy) 41 | *.synctex.gz 42 | *.synctex.gz(busy) 43 | *.pdfsync 44 | 45 | ## Build tool directories for auxiliary files 46 | # latexrun 47 | latex.out/ 48 | 49 | ## Auxiliary and intermediate files from other packages: 50 | # algorithms 51 | *.alg 52 | *.loa 53 | 54 | # achemso 55 | acs-*.bib 56 | 57 | # amsthm 58 | *.thm 59 | 60 | # beamer 61 | *.nav 62 | *.pre 63 | *.snm 64 | *.vrb 65 | 66 | # changes 67 | *.soc 68 | 69 | # cprotect 70 | *.cpt 71 | 72 | # elsarticle (documentclass of Elsevier journals) 73 | *.spl 74 | 75 | # endnotes 76 | *.ent 77 | 78 | # fixme 79 | *.lox 80 | 81 | # feynmf/feynmp 82 | *.mf 83 | *.mp 84 | *.t[1-9] 85 | *.t[1-9][0-9] 86 | *.tfm 87 | 88 | #(r)(e)ledmac/(r)(e)ledpar 89 | *.end 90 | *.?end 91 | *.[1-9] 92 | *.[1-9][0-9] 93 | *.[1-9][0-9][0-9] 94 | *.[1-9]R 95 | *.[1-9][0-9]R 96 | *.[1-9][0-9][0-9]R 97 | *.eledsec[1-9] 98 | *.eledsec[1-9]R 99 | *.eledsec[1-9][0-9] 100 | *.eledsec[1-9][0-9]R 101 | *.eledsec[1-9][0-9][0-9] 102 | *.eledsec[1-9][0-9][0-9]R 103 | 104 | # glossaries 105 | *.acn 106 | *.acr 107 | *.glg 108 | *.glo 109 | *.gls 110 | *.glsdefs 111 | 112 | # gnuplottex 113 | *-gnuplottex-* 114 | 115 | # gregoriotex 116 | *.gaux 117 | *.gtex 118 | 119 | # htlatex 120 | *.4ct 121 | *.4tc 122 | *.idv 123 | *.lg 124 | *.trc 125 | *.xref 126 | 127 | # hyperref 128 | *.brf 129 | 130 | # knitr 131 | *-concordance.tex 132 | # TODO Comment the next line if you want to keep your tikz graphics files 133 | *.tikz 134 | *-tikzDictionary 135 | 136 | # listings 137 | *.lol 138 | 139 | # makeidx 140 | *.idx 141 | *.ilg 142 | *.ind 143 | *.ist 144 | 145 | # minitoc 146 | *.maf 147 | *.mlf 148 | *.mlt 149 | *.mtc[0-9]* 150 | *.slf[0-9]* 151 | *.slt[0-9]* 152 | *.stc[0-9]* 153 | 154 | # minted 155 | _minted* 156 | *.pyg 157 | 158 | # morewrites 159 | *.mw 160 | 161 | # nomencl 162 | *.nlg 163 | *.nlo 164 | *.nls 165 | 166 | # pax 167 | *.pax 168 | 169 | # pdfpcnotes 170 | *.pdfpc 171 | 172 | # sagetex 173 | *.sagetex.sage 174 | *.sagetex.py 175 | *.sagetex.scmd 176 | 177 | # scrwfile 178 | *.wrt 179 | 180 | # sympy 181 | *.sout 182 | *.sympy 183 | sympy-plots-for-*.tex/ 184 | 185 | # pdfcomment 186 | *.upa 187 | *.upb 188 | 189 | # pythontex 190 | *.pytxcode 191 | pythontex-files-*/ 192 | 193 | # tcolorbox 194 | *.listing 195 | 196 | # thmtools 197 | *.loe 198 | 199 | # TikZ & PGF 200 | *.dpth 201 | *.md5 202 | *.auxlock 203 | 204 | # todonotes 205 | *.tdo 206 | 207 | # easy-todo 208 | *.lod 209 | 210 | # xmpincl 211 | *.xmpi 212 | 213 | # xindy 214 | *.xdy 215 | 216 | # xypic precompiled matrices 217 | *.xyc 218 | 219 | # endfloat 220 | *.ttt 221 | *.fff 222 | 223 | # Latexian 224 | TSWLatexianTemp* 225 | 226 | ## Editors: 227 | # WinEdt 228 | *.bak 229 | *.sav 230 | 231 | # Texpad 232 | .texpadtmp 233 | 234 | # LyX 235 | *.lyx~ 236 | 237 | # Kile 238 | *.backup 239 | 240 | # KBibTeX 241 | *~[0-9]* 242 | 243 | # auto folder when using emacs and auctex 244 | ./auto/* 245 | *.el 246 | 247 | # expex forward references with \gathertags 248 | *-tags.tex 249 | 250 | # standalone packages 251 | *.sta 252 | 253 | ## and more 254 | # created by bi-language-toc.tex 255 | *.tec 256 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LaTeX examples 2 | 3 | - Dec 13, 2022 4 | Rewrote whole Git history to track all PDF files with Git LFS.\ 5 | (by executing `git lfs migrate import --include="*.pdf" --everything`). 6 | 7 | ## Utilities 8 | 9 | ### [`code-with-output.tex`](utilities/code-with-output.tex) 10 | 11 | User Interface 12 | - `\begin{example}[tcb options]{title}`, code followed by output, numbered 13 | - `\begin{example*}[tcb options]{title}`, unnumbered variant 14 | 15 | Typical configured usage 16 | - side by side, `\begin{example}[sidebyside]{title}` 17 | - change code language, `\begin{example}[minted options app={language=python}]{title}` 18 | 19 | Internals 20 | - direct dependencies: 21 | - `tcolorbox`, with libraries `hooks`, `minted`, `skins` and `xparse` loaded 22 | - `accsupp` 23 | - environments are based on `tcolorbox`'s `minted` library, `-shell-escape` required 24 | - added 25 | - `\emptyaccsupp` 26 | - `tcolorbox` options `example options` and `example title` 27 | - modified 28 | - `\theFancyVerbLine` 29 | 30 | ### [`pgfkeys` library `conditionals`](utilities/pgfkeyslibraryconditionals.code.tex) 31 | 32 | User Interface 33 | - loading: `\usepgfkeyslibrary{conditionals}` 34 | - conditional keys 35 | - `/utils/ifname nTF={}{}{}` 36 | executes `\if ... \else ... \fi` 37 | - `/utils/ifxxx nTF={}{}{}` 38 | executes ` ... \else ... \fi` 39 | - `/utils/ifnum nNnTF={}{}{}{}` 40 | (trick: hide `` `=` in braces, like `/utils/ifnum 1{=}1tf`) 41 | - `/utils/ifdim nNnTF={}{}{}{}` 42 | - `/utils/if NNTF={}{}` 43 | (`\noexpand` auto applied to `` and ``) 44 | - `/utils/ifcat NNTF={}{}` (ditto) 45 | - `/utils/ifx NNTF={}{}` 46 | - `/utils/if strcmp nTnTF={}{}{}{}` 47 | (`` are auto wrapped by `\unexpanded`; relies on primitive `\(pdf)strcmp` or its mock in Lua) 48 | 49 | Internals 50 | - prefix `\pgfkeys@lib@cond@xxx` 51 | 52 | TODO 53 | - export to other default paths\ 54 | to support uses like `\tcbset{ifnum TF=...}` with no need to set `\pgfkeys{/tcb/.see also={/utils}}`. Also more space consumption for shorter time. 55 | - utility to copy a key (need to learn if `filtered` library adds any internal sub-keys) 56 | 57 | ### [`hyperref-autonameref.tex`](utilities/hyperref-autonameref.tex) 58 | 59 | User Interface 60 | - `\autonameref{