├── support ├── examples │ ├── data.csv │ ├── bibtex.pdf │ ├── table.pdf │ ├── biblatex.pdf │ ├── cnminimal.pdf │ ├── enminimal.pdf │ ├── fontsize.pdf │ ├── fontstyle.pdf │ ├── ordered.pdf │ ├── section.pdf │ ├── testmyart.pdf │ ├── testmyart.tex │ ├── unordered.pdf │ ├── description.pdf │ ├── insertimage.pdf │ ├── pics │ │ ├── sjtug.pdf │ │ └── sjtugt.pdf │ ├── subfigures.pdf │ ├── doubleimages.pdf │ ├── enminimal.tex │ ├── pgfplotstable.pdf │ ├── cnminimal.tex │ ├── fontsize.tex │ ├── section.tex │ ├── ordered.tex │ ├── unordered.tex │ ├── description.tex │ ├── fontstyle.tex │ ├── bibtex.tex │ ├── myother.sty │ ├── ref.bib │ ├── biblatex.tex │ ├── insertimage.tex │ ├── myart.cls │ ├── pgfplotstable.tex │ ├── table.tex │ ├── doubleimages.tex │ └── subfigures.tex ├── beamer │ ├── toc.pdf │ ├── button.pdf │ ├── frame.pdf │ ├── hello.pdf │ ├── label.pdf │ ├── only.pdf │ ├── pause.pdf │ ├── poster.pdf │ ├── sjtug.pdf │ ├── columns.pdf │ ├── onslide.pdf │ ├── welcome.pdf │ ├── multicols.pdf │ ├── allowframebreaks.pdf │ ├── itemizeoverlay.pdf │ ├── allowdisplaybreaks.pdf │ ├── allowframebreaks.tex │ ├── only.tex │ ├── sjtug.tex │ ├── pause.tex │ ├── onslide.tex │ ├── welcome.tex │ ├── frame.tex │ ├── label.tex │ ├── button.tex │ ├── itemizeoverlay.tex │ ├── hello.tex │ ├── multicols.tex │ ├── allowdisplaybreaks.tex │ ├── toc.tex │ ├── columns.tex │ └── poster.tex ├── images │ ├── qq.jpg │ ├── Knuth.jpg │ ├── screen.jpg │ ├── slides.jpg │ ├── Lamport.jpg │ ├── project.jpg │ ├── pympress.jpg │ ├── tikzedt.png │ ├── tooltip.png │ ├── mirrorclone.jpg │ ├── pgfplotsedt.pdf │ ├── tikzedtui.jpg │ ├── latexsparkle.jpg │ ├── pgfplotsedtui.jpg │ ├── sjtuthesisv1.pdf │ ├── sjtuthesisv2.pdf │ ├── sjtubeamercover.jpg │ ├── sjtubeamerfirst.jpg │ ├── sjtubeamerouter.jpg │ ├── sjtubeamerdevguidefirst.pdf │ └── sjtubeamerquickstartfirst.jpg ├── pgfplots │ ├── a.pdf │ ├── b.pdf │ ├── c.pdf │ ├── d.pdf │ ├── e.pdf │ ├── f.pdf │ ├── g.pdf │ ├── a.csv │ ├── f.csv │ ├── g.csv │ ├── b.tex │ ├── e1.csv │ ├── e2.csv │ ├── e.tex │ ├── c.tex │ ├── g.tex │ ├── a.tex │ ├── b.dat │ ├── f.tex │ └── c.csv ├── figures │ ├── mindmap.pdf │ ├── neural.pdf │ ├── qrcode.pdf │ ├── sjtutex.pdf │ ├── automata.pdf │ ├── beamerdir.pdf │ ├── circuitikz.pdf │ ├── pgfplots.pdf │ ├── thesisdir.pdf │ ├── tikzlings.pdf │ ├── tkzeuclide.pdf │ ├── qrcode.tex │ ├── pgfplots.tex │ ├── tikzlings.tex │ ├── neural.tex │ ├── sjtutex.tex │ ├── beamerdir.tex │ ├── forest-sjtu.ltx │ ├── tkzeuclide.tex │ ├── mindmap.tex │ ├── thesisdir.tex │ ├── automata.tex │ └── circuitikz.tex ├── thesis │ ├── cjkfont-mac.pdf │ ├── cjkfont-adobe.pdf │ ├── latinfont-lm.pdf │ ├── mathstyle-ISO.pdf │ ├── mathstyle-TeX.pdf │ ├── cjkfont-fandol.pdf │ ├── cjkfont-founder.pdf │ ├── cjkfont-ubuntu.pdf │ ├── cjkfont-windows.pdf │ ├── latinfont-newcm.pdf │ ├── latinfont-newpx.pdf │ ├── latinfont-newtx.pdf │ ├── latinfont-times.pdf │ ├── latinfont-xits.pdf │ ├── sample-report-zh.pdf │ ├── sample-thesis-de.pdf │ ├── sample-thesis-en.pdf │ ├── sample-thesis-ja.pdf │ ├── sample-thesis-zh.pdf │ ├── latinfont-cambria.pdf │ ├── latinfont-stixtwo.pdf │ ├── sample-article-zh.pdf │ ├── cjkfont.ltx │ ├── latinfont.ltx │ ├── mathstyle.sh │ ├── latinfont.sh │ ├── mathstyle.ltx │ └── cjkfont.sh ├── lec-2023-04-01.tex ├── lec-2022-12-28.tex ├── contents │ ├── learnlatex.tex │ ├── intermission.tex │ ├── learnlatex │ │ ├── table.tex │ │ ├── minimal.tex │ │ ├── math.tex │ │ ├── text-style.tex │ │ ├── reference.tex │ │ ├── figure.tex │ │ ├── structure.tex │ │ ├── install.tex │ │ └── intro.tex │ ├── newversion.tex │ ├── boost.tex │ ├── template.tex │ └── visualization.tex ├── lec-2022-04-03.tex └── lec-2022-05-18.tex ├── README.md ├── beamerthemenosjtubeamer.sty ├── latex-talk.tex ├── .gitignore └── LICENSE /support/examples/data.csv: -------------------------------------------------------------------------------- 1 | A,B 2 | 1,2 3 | 3,4 -------------------------------------------------------------------------------- /support/beamer/toc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/toc.pdf -------------------------------------------------------------------------------- /support/images/qq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/qq.jpg -------------------------------------------------------------------------------- /support/pgfplots/a.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/a.pdf -------------------------------------------------------------------------------- /support/pgfplots/b.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/b.pdf -------------------------------------------------------------------------------- /support/pgfplots/c.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/c.pdf -------------------------------------------------------------------------------- /support/pgfplots/d.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/d.pdf -------------------------------------------------------------------------------- /support/pgfplots/e.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/e.pdf -------------------------------------------------------------------------------- /support/pgfplots/f.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/f.pdf -------------------------------------------------------------------------------- /support/pgfplots/g.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/pgfplots/g.pdf -------------------------------------------------------------------------------- /support/beamer/button.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/button.pdf -------------------------------------------------------------------------------- /support/beamer/frame.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/frame.pdf -------------------------------------------------------------------------------- /support/beamer/hello.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/hello.pdf -------------------------------------------------------------------------------- /support/beamer/label.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/label.pdf -------------------------------------------------------------------------------- /support/beamer/only.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/only.pdf -------------------------------------------------------------------------------- /support/beamer/pause.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/pause.pdf -------------------------------------------------------------------------------- /support/beamer/poster.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/poster.pdf -------------------------------------------------------------------------------- /support/beamer/sjtug.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/sjtug.pdf -------------------------------------------------------------------------------- /support/images/Knuth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/Knuth.jpg -------------------------------------------------------------------------------- /support/images/screen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/screen.jpg -------------------------------------------------------------------------------- /support/images/slides.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/slides.jpg -------------------------------------------------------------------------------- /support/beamer/columns.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/columns.pdf -------------------------------------------------------------------------------- /support/beamer/onslide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/onslide.pdf -------------------------------------------------------------------------------- /support/beamer/welcome.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/welcome.pdf -------------------------------------------------------------------------------- /support/examples/bibtex.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/bibtex.pdf -------------------------------------------------------------------------------- /support/examples/table.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/table.pdf -------------------------------------------------------------------------------- /support/figures/mindmap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/mindmap.pdf -------------------------------------------------------------------------------- /support/figures/neural.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/neural.pdf -------------------------------------------------------------------------------- /support/figures/qrcode.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/qrcode.pdf -------------------------------------------------------------------------------- /support/figures/sjtutex.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/sjtutex.pdf -------------------------------------------------------------------------------- /support/images/Lamport.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/Lamport.jpg -------------------------------------------------------------------------------- /support/images/project.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/project.jpg -------------------------------------------------------------------------------- /support/images/pympress.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/pympress.jpg -------------------------------------------------------------------------------- /support/images/tikzedt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/tikzedt.png -------------------------------------------------------------------------------- /support/images/tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/tooltip.png -------------------------------------------------------------------------------- /support/beamer/multicols.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/multicols.pdf -------------------------------------------------------------------------------- /support/examples/biblatex.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/biblatex.pdf -------------------------------------------------------------------------------- /support/examples/cnminimal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/cnminimal.pdf -------------------------------------------------------------------------------- /support/examples/enminimal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/enminimal.pdf -------------------------------------------------------------------------------- /support/examples/fontsize.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/fontsize.pdf -------------------------------------------------------------------------------- /support/examples/fontstyle.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/fontstyle.pdf -------------------------------------------------------------------------------- /support/examples/ordered.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/ordered.pdf -------------------------------------------------------------------------------- /support/examples/section.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/section.pdf -------------------------------------------------------------------------------- /support/examples/testmyart.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/testmyart.pdf -------------------------------------------------------------------------------- /support/examples/testmyart.tex: -------------------------------------------------------------------------------- 1 | \documentclass[sjtu]{myart} 2 | \begin{document} 3 | \mycmd{SJTUG} 4 | \end{document} -------------------------------------------------------------------------------- /support/examples/unordered.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/unordered.pdf -------------------------------------------------------------------------------- /support/figures/automata.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/automata.pdf -------------------------------------------------------------------------------- /support/figures/beamerdir.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/beamerdir.pdf -------------------------------------------------------------------------------- /support/figures/circuitikz.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/circuitikz.pdf -------------------------------------------------------------------------------- /support/figures/pgfplots.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/pgfplots.pdf -------------------------------------------------------------------------------- /support/figures/thesisdir.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/thesisdir.pdf -------------------------------------------------------------------------------- /support/figures/tikzlings.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/tikzlings.pdf -------------------------------------------------------------------------------- /support/figures/tkzeuclide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/figures/tkzeuclide.pdf -------------------------------------------------------------------------------- /support/images/mirrorclone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/mirrorclone.jpg -------------------------------------------------------------------------------- /support/images/pgfplotsedt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/pgfplotsedt.pdf -------------------------------------------------------------------------------- /support/images/tikzedtui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/tikzedtui.jpg -------------------------------------------------------------------------------- /support/thesis/cjkfont-mac.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-mac.pdf -------------------------------------------------------------------------------- /support/examples/description.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/description.pdf -------------------------------------------------------------------------------- /support/examples/insertimage.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/insertimage.pdf -------------------------------------------------------------------------------- /support/examples/pics/sjtug.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/pics/sjtug.pdf -------------------------------------------------------------------------------- /support/examples/pics/sjtugt.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/pics/sjtugt.pdf -------------------------------------------------------------------------------- /support/examples/subfigures.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/subfigures.pdf -------------------------------------------------------------------------------- /support/images/latexsparkle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/latexsparkle.jpg -------------------------------------------------------------------------------- /support/images/pgfplotsedtui.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/pgfplotsedtui.jpg -------------------------------------------------------------------------------- /support/images/sjtuthesisv1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtuthesisv1.pdf -------------------------------------------------------------------------------- /support/images/sjtuthesisv2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtuthesisv2.pdf -------------------------------------------------------------------------------- /support/thesis/cjkfont-adobe.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-adobe.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-lm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-lm.pdf -------------------------------------------------------------------------------- /support/thesis/mathstyle-ISO.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/mathstyle-ISO.pdf -------------------------------------------------------------------------------- /support/thesis/mathstyle-TeX.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/mathstyle-TeX.pdf -------------------------------------------------------------------------------- /support/beamer/allowframebreaks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/allowframebreaks.pdf -------------------------------------------------------------------------------- /support/beamer/itemizeoverlay.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/itemizeoverlay.pdf -------------------------------------------------------------------------------- /support/examples/doubleimages.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/doubleimages.pdf -------------------------------------------------------------------------------- /support/examples/enminimal.tex: -------------------------------------------------------------------------------- 1 | \documentclass{article} 2 | \begin{document} 3 | Together for a Shared Future 4 | \end{document} -------------------------------------------------------------------------------- /support/examples/pgfplotstable.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/examples/pgfplotstable.pdf -------------------------------------------------------------------------------- /support/images/sjtubeamercover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtubeamercover.jpg -------------------------------------------------------------------------------- /support/images/sjtubeamerfirst.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtubeamerfirst.jpg -------------------------------------------------------------------------------- /support/images/sjtubeamerouter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtubeamerouter.jpg -------------------------------------------------------------------------------- /support/thesis/cjkfont-fandol.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-fandol.pdf -------------------------------------------------------------------------------- /support/thesis/cjkfont-founder.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-founder.pdf -------------------------------------------------------------------------------- /support/thesis/cjkfont-ubuntu.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-ubuntu.pdf -------------------------------------------------------------------------------- /support/thesis/cjkfont-windows.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/cjkfont-windows.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-newcm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-newcm.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-newpx.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-newpx.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-newtx.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-newtx.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-times.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-times.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-xits.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-xits.pdf -------------------------------------------------------------------------------- /support/thesis/sample-report-zh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-report-zh.pdf -------------------------------------------------------------------------------- /support/thesis/sample-thesis-de.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-thesis-de.pdf -------------------------------------------------------------------------------- /support/thesis/sample-thesis-en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-thesis-en.pdf -------------------------------------------------------------------------------- /support/thesis/sample-thesis-ja.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-thesis-ja.pdf -------------------------------------------------------------------------------- /support/thesis/sample-thesis-zh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-thesis-zh.pdf -------------------------------------------------------------------------------- /support/beamer/allowdisplaybreaks.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/beamer/allowdisplaybreaks.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-cambria.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-cambria.pdf -------------------------------------------------------------------------------- /support/thesis/latinfont-stixtwo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/latinfont-stixtwo.pdf -------------------------------------------------------------------------------- /support/thesis/sample-article-zh.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/thesis/sample-article-zh.pdf -------------------------------------------------------------------------------- /support/images/sjtubeamerdevguidefirst.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtubeamerdevguidefirst.pdf -------------------------------------------------------------------------------- /support/examples/cnminimal.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | 一起向未来 4 | 5 | Together for a Shared Future 6 | \end{document} -------------------------------------------------------------------------------- /support/images/sjtubeamerquickstartfirst.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sjtug/sjtulib-latex-talk/rc-2023/support/images/sjtubeamerquickstartfirst.jpg -------------------------------------------------------------------------------- /support/examples/fontsize.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | {\huge 一起向未来\par} 4 | Together for a Shared Future 5 | \end{document} -------------------------------------------------------------------------------- /support/examples/section.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | \section{概念} 4 | \subsection{\LaTeX{}} 5 | \LaTeX{} 是一个…… 6 | \end{document} -------------------------------------------------------------------------------- /support/figures/qrcode.tex: -------------------------------------------------------------------------------- 1 | \documentclass{standalone} 2 | \usepackage{qrcode} 3 | \begin{document} 4 | \qrcode[height=4cm]{https://www.overleaf.com/read/fvwxzvcxhcwd} 5 | \end{document} -------------------------------------------------------------------------------- /support/thesis/cjkfont.ltx: -------------------------------------------------------------------------------- 1 | \documentclass[cjk-font=]{sjtuthesis} 2 | \begin{document} 3 | \textbf{饮水思源,爱国荣校。} 4 | 5 | 上海交通大学 \textit{上海} \texttt{中国} 6 | \end{document} -------------------------------------------------------------------------------- /support/examples/ordered.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | \begin{enumerate} 4 | \item 第一项 5 | \item 第二项 6 | \item 第三项 7 | \end{enumerate} 8 | \end{document} -------------------------------------------------------------------------------- /support/examples/unordered.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | \begin{itemize} 4 | \item 第一项 5 | \item 第二项 6 | \item 第三项 7 | \end{itemize} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/allowframebreaks.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usepackage{zhlipsum} 3 | \begin{document} 4 | \begin{frame}[allowframebreaks] 5 | \zhlipsum[1-2] 6 | \end{frame} 7 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/a.csv: -------------------------------------------------------------------------------- 1 | 6,1.5 2 | 5,1.269 3 | 4,1.026 4 | 3,0.773 5 | 2,0.518 6 | 1,0.258 7 | 0,0 8 | -1,-0.266 9 | -2,-0.526 10 | -3,-0.782 11 | -4,-1.029 12 | -5,-1.267 13 | -6,-1.495 14 | -------------------------------------------------------------------------------- /support/beamer/only.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | \only<2->{第二} 5 | \only<1>{第一} 6 | \only<1,3>{第三} 7 | \end{frame} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/sjtug.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usetheme{sjtubeamer} 3 | \usesjtutheme{sjtug} 4 | \begin{document} 5 | \begin{frame} 6 | 使用 SJTUG 子主题。 7 | \end{frame} 8 | \end{document} -------------------------------------------------------------------------------- /support/examples/description.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | \begin{description} 4 | \item[第一] 文本 5 | \item[第二] 文本 6 | \item[第三] 文本 7 | \end{description} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/pause.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | 第一段 5 | \pause 6 | 7 | 第二段 8 | \pause 9 | 10 | 第三段 11 | \end{frame} 12 | \end{document} -------------------------------------------------------------------------------- /support/beamer/onslide.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | \onslide<2->{第二} 5 | \onslide<1>{第一} 6 | \onslide<1,3>{第三} 7 | \end{frame} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/welcome.tex: -------------------------------------------------------------------------------- 1 | \documentclass[aspectratio=169]{ctexbeamer} 2 | \usetheme{sjtubeamer} 3 | \begin{document} 4 | \begin{frame} 5 | \frametitle{欢迎} 6 | 你好,SJTUBeamer! 7 | \end{frame} 8 | \end{document} -------------------------------------------------------------------------------- /support/examples/fontstyle.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \begin{document} 3 | \textbf{一起向未来} 4 | 5 | {\sffamily 6 | 一段无衬线文字 7 | } 8 | 9 | \emph{Together for a Shared Future} 10 | \end{document} -------------------------------------------------------------------------------- /support/thesis/latinfont.ltx: -------------------------------------------------------------------------------- 1 | \documentclass[text-font=]{sjtuthesis} 2 | \begin{document} 3 | \textbf{SJTUG} $\sum_{i=1}^ki^2=\frac{n(n+1)(2n+1)}{6}$ 4 | 5 | SJTU \textit{Shanghai} \texttt{China} 6 | \end{document} -------------------------------------------------------------------------------- /support/beamer/frame.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | \frametitle{beamer 介绍} 5 | \framesubtitle{发起人} 6 | beamer 由 Till Tantau 发起。 7 | \end{frame} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/label.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame}[label=target] 4 | 跳转到的帧。 5 | \end{frame} 6 | \begin{frame} 7 | 详见第 \ref{target} 页。 8 | \end{frame} 9 | \end{document} -------------------------------------------------------------------------------- /support/examples/bibtex.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{gbt7714} 3 | \bibliographystyle{gbt7714-numerical} 4 | % \citestyle{numbers} % 改为正文模式 5 | \begin{document} 6 | 他指出了...\cite{devoftech} 7 | \bibliography{ref} 8 | \end{document} -------------------------------------------------------------------------------- /support/beamer/button.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame}[label=target] 4 | 跳转到的帧。 5 | \end{frame} 6 | \begin{frame} 7 | \hyperlink{target}{\beamergotobutton{跳转}} 8 | \end{frame} 9 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/f.csv: -------------------------------------------------------------------------------- 1 | 239,0.1 2 | 839,0.3 3 | 1239,0.5 4 | 1435,0.6 5 | 1597,0.7 6 | 1767,0.8 7 | 1947,0.9 8 | 2037,0.94 9 | 2327,1 10 | 2660,0.94 11 | 2760,0.9 12 | 3060,0.8 13 | 3380,0.7 14 | 3790,0.6 15 | 4340,0.5 16 | 6640,0.3 17 | 21640,0.1 18 | -------------------------------------------------------------------------------- /support/pgfplots/g.csv: -------------------------------------------------------------------------------- 1 | 239,0.1 2 | 839,0.3 3 | 1239,0.5 4 | 1435,0.6 5 | 1597,0.7 6 | 1767,0.8 7 | 1947,0.9 8 | 2037,0.94 9 | 2327,1 10 | 2660,0.94 11 | 2760,0.9 12 | 3060,0.8 13 | 3380,0.7 14 | 3790,0.6 15 | 4340,0.5 16 | 6640,0.3 17 | 21640,0.1 18 | -------------------------------------------------------------------------------- /support/thesis/mathstyle.sh: -------------------------------------------------------------------------------- 1 | # !/bin/bash 2 | # Generate mathstyle example. 3 | 4 | for mathstyle in {ISO,TeX}; do 5 | sed -e "s||$mathstyle|g" mathstyle.ltx > mathstyle-$mathstyle.tex 6 | latexmk -xelatex -interaction=nonstopmode mathstyle-$mathstyle 7 | done -------------------------------------------------------------------------------- /support/examples/myother.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e} 2 | \ProvidesPackage{myother}[2022/12/28 v1.0 My other package] 3 | \DeclareOption{SJTU}{\def\otherschool{FDU}} 4 | \DeclareOption{FDU}{\def\otherschool{SJTU}} 5 | \ExecuteOptions{FDU} 6 | \ProcessOptions* 7 | \newcommand{\othercmd}{} -------------------------------------------------------------------------------- /support/examples/ref.bib: -------------------------------------------------------------------------------- 1 | @article{devoftech, 2 | title={新时期我国信息技术产业的发展}, 3 | author={江泽民}, 4 | publisher = {上海交通大学学报}, 5 | year={2008}, 6 | journal = {上海交通大学学报}, 7 | volume = {42}, 8 | number = {10}, 9 | numpages = {18}, 10 | pages = {1589}, 11 | } -------------------------------------------------------------------------------- /support/beamer/itemizeoverlay.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | \begin{itemize}[<+->] 5 | \item 第一点 6 | \item 第二点 7 | \item 第三点 8 | \end{itemize} 9 | \end{frame} 10 | \end{document} -------------------------------------------------------------------------------- /support/examples/biblatex.tex: -------------------------------------------------------------------------------- 1 | %!TEX program = xelatex 2 | \documentclass[UTF8]{ctexart} 3 | \usepackage[style=gb7714-2015]{biblatex} 4 | \addbibresource{ref.bib} 5 | \begin{document} 6 | 他在文献 \parencite{devoftech} 指出了...\cite{devoftech}, 7 | 8 | \printbibliography 9 | \end{document} -------------------------------------------------------------------------------- /support/figures/pgfplots.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \begin{document} 5 | \begin{tikzpicture} 6 | \begin{axis}[] 7 | \addplot {x^2}; 8 | \legend{data}; 9 | \end{axis} 10 | \end{tikzpicture} 11 | \end{document} -------------------------------------------------------------------------------- /support/examples/insertimage.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{graphicx} 3 | \graphicspath{{figs/}{pics/}} 4 | \begin{document} 5 | \begin{figure}[ht] 6 | \centering 7 | \includegraphics[width=0.4\textwidth]{sjtug} 8 | \caption{SJTUG 徽标} 9 | \end{figure} 10 | \end{document} -------------------------------------------------------------------------------- /support/thesis/latinfont.sh: -------------------------------------------------------------------------------- 1 | # !/bin/bash 2 | # Generate text and math font setup example. 3 | # cambria: [Windows] 4 | 5 | for textfont in {cambria,lm,newcm,newpx,newtx,stixtwo,times,xits}; do 6 | sed -e "s||$textfont|g" latinfont.ltx > latinfont-$textfont.tex 7 | latexmk -xelatex -interaction=nonstopmode latinfont-$textfont 8 | done -------------------------------------------------------------------------------- /support/beamer/hello.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usetheme[maxplus]{sjtubeamer} 3 | \begin{document} 4 | \title{使用 Beamer 制作学术报告幻灯片} 5 | \subtitle{上海交通大学图书馆专题培训讲座} 6 | \author{李子龙} 7 | \institute[SJTUG]{SJTU Linux User Group} 8 | \date{2022 年 5 月} 9 | \maketitle 10 | \part{介绍} 11 | \makebottom 12 | \end{document} -------------------------------------------------------------------------------- /support/figures/tikzlings.tex: -------------------------------------------------------------------------------- 1 | \documentclass{standalone} 2 | \usepackage{tikz} 3 | \usetikzlibrary{ducks} 4 | \usepackage{tikzlings} 5 | \begin{document} 6 | \tikz\bear; 7 | \tikz\owl; 8 | \tikz\elephant; 9 | \tikz\hippo; 10 | \tikz\duck; 11 | \tikz\chicken; 12 | \tikz\sloth; 13 | \tikz\marmot; 14 | \tikz\snowman; 15 | \end{document} -------------------------------------------------------------------------------- /support/thesis/mathstyle.ltx: -------------------------------------------------------------------------------- 1 | \documentclass[math-style=]{sjtuthesis} 2 | \begin{document} 3 | \begin{minipage}{0.5\textwidth} 4 | \begin{equation*} 5 | \int_{a}^b f(x)\,\mathrm{d}x=\lim_{|P|\rightarrow 0}\sum_{i=1}^n f(\xi_i)\Delta x_i 6 | \end{equation*} 7 | % \Delta should be \increment! 8 | \end{minipage} 9 | \end{document} -------------------------------------------------------------------------------- /support/examples/myart.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[2020/10/01] 2 | \ProvidesClass{myart}[2022/12/28 v1.0 My] 3 | \DeclareOption{sjtu}{\def\school{SJTU}} 4 | \DeclareOption{fdu}{\def\school{FDU}} 5 | \ExecuteOptions{fdu} 6 | \ProcessOptions* 7 | \LoadClass{article} 8 | \newcommand{\mycmd}[1]{#1 in \school} 9 | \PassOptionsToPackage{\school}{myother} 10 | \RequirePackage{myother} 11 | \othercmd % provided by myother -------------------------------------------------------------------------------- /support/examples/pgfplotstable.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{booktabs} 3 | \usepackage{pgfplotstable} 4 | \pgfplotsset{compat=newest} 5 | \pgfplotstableset{ 6 | col sep=comma, 7 | every head row/.style={before row=\toprule,after row=\midrule}, 8 | every last row/.style={after row=\bottomrule}, 9 | } 10 | \begin{document} 11 | \pgfplotstabletypeset[]{data.csv} 12 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/b.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{ctex} 5 | \begin{document} 6 | \begin{tikzpicture} 7 | \begin{axis}[title={输出电压与轴平面位置的关系}, 8 | xlabel={$x$/cm}, 9 | ylabel={$y$/cm}, 10 | zlabel={输出电压 $U$/V}, 11 | legend pos={north east}, 12 | ] 13 | \addplot3 [surf,] table[] {b.dat}; 14 | \legend{输出电压,} 15 | \end{axis} 16 | \end{tikzpicture} 17 | \end{document} -------------------------------------------------------------------------------- /support/beamer/multicols.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usepackage{multicol} 3 | \begin{document} 4 | \begin{frame} 5 | \begin{multicols}{2} 6 | \begin{itemize} 7 | \item 第一项 8 | \item 第二项 9 | \item 第三项 10 | \item 第四项 11 | \item 第五项 12 | \item 第六项 13 | \end{itemize} 14 | \end{multicols} 15 | \end{frame} 16 | \end{document} -------------------------------------------------------------------------------- /support/thesis/cjkfont.sh: -------------------------------------------------------------------------------- 1 | # !/bin/bash 2 | # Generate CJK font setup example. 3 | # adobe: install one of the Adobe's software 4 | # fandol: included in TeX Live 5 | # founder: download from www.foundertype.com 6 | # mac: [macOS] 7 | # ubuntu: [Ubuntu] 8 | # windows: [Windows] 9 | 10 | for cjkfont in {adobe,fandol,founder,mac,ubuntu,windows}; do 11 | sed -e "s||$cjkfont|g" cjkfont.ltx > cjkfont-$cjkfont.tex 12 | latexmk -xelatex -interaction=nonstopmode cjkfont-$cjkfont 13 | done -------------------------------------------------------------------------------- /support/beamer/allowdisplaybreaks.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usepackage{physics} 3 | \begin{document} 4 | \begin{frame}[allowframebreaks,allowdisplaybreaks] 5 | \begin{align*} 6 | \smqty(\xmat*{a}{9}{9}) 7 | = & \smqty(\xmat*{b}{9}{9}) \\ 8 | & + \smqty(\xmat*{c}{9}{9}) \\ 9 | & + \smqty(\xmat*{d}{9}{9}) \\ 10 | & + \smqty(\xmat*{e}{9}{9}) \\ 11 | & + \smqty(\xmat*{f}{9}{9}) \\ 12 | \end{align*} 13 | \end{frame} 14 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/e1.csv: -------------------------------------------------------------------------------- 1 | 8.753462604,0.25272958 2 | 5.761772853,0.245944894 3 | 2.326869806,0.203540602 4 | 0,0.169617168 5 | -4.432132964,0.076327726 6 | -6.980609418,0 7 | -7.313019391,-0.006784687 8 | -9.750692521,-0.096681786 9 | -12.07756233,-0.169617168 10 | -15.73407202,-0.254425752 11 | -12.07756233,-0.235767864 12 | -5.650969529,-0.178098026 13 | -1.218836565,-0.125516704 14 | 0,-0.111947331 15 | 4.764542936,0 16 | 6.75900277,0.086504756 17 | 7.867036011,0.149263108 18 | 8.753462604,0.25272958 19 | -------------------------------------------------------------------------------- /support/beamer/toc.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usetheme{sjtubeamer} 3 | \AtBeginSection[]{ 4 | \begin{frame} 5 | \tableofcontents[currentsection, hideallsubsections] 6 | \end{frame} 7 | } 8 | \begin{document} 9 | \begin{frame} 10 | \frametitle{目录} 11 | \tableofcontents[hideallsubsections] 12 | \end{frame} 13 | 14 | \section{第一节} 15 | \section{第二节} 16 | \section{第三节} 17 | \begin{frame}[plain] 18 | \sectionpage 19 | \end{frame} 20 | \end{document} -------------------------------------------------------------------------------- /support/figures/neural.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \begin{document} 3 | \begin{tikzpicture} 4 | \tikzstyle{neuron}=[circle, draw, minimum width=1cm]; 5 | \foreach \x in {1,...,5} { 6 | \node [neuron] (a\x) at (0, -2*\x) {$a_{1\x}$}; 7 | } 8 | \foreach \y in {1,...,4} { 9 | \node [neuron] (b\y) at (3, -1-2*\y) {$a_{2\y}$}; 10 | } 11 | \foreach \x in {1,...,5} { 12 | \foreach \y in {1,...,4} { 13 | \draw (a\x) edge (b\y); 14 | } 15 | } 16 | \end{tikzpicture} 17 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/e2.csv: -------------------------------------------------------------------------------- 1 | 9.861495845,0.25272958 2 | 6.869806094,0.245944894 3 | 3.434903047,0.203540602 4 | 1.108033241,0.169617168 5 | -3.324099723,0.076327726 6 | -5.872576177,0 7 | -6.20498615,-0.006784687 8 | -8.64265928,-0.096681786 9 | -10.96952909,-0.169617168 10 | -14.62603878,-0.254425752 11 | -10.96952909,-0.235767864 12 | -4.542936288,-0.178098026 13 | -0.110803324,-0.125516704 14 | 1.108033241,-0.111947331 15 | 5.872576177,0 16 | 7.867036011,0.086504756 17 | 8.975069252,0.149263108 18 | 9.861495845,0.25272958 19 | -------------------------------------------------------------------------------- /support/pgfplots/e.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{ctex} 5 | \begin{document} 6 | \begin{tikzpicture} 7 | \begin{axis}[axis x line={middle}, 8 | axis y line={middle}, 9 | legend pos={south east}, 10 | title={饱和磁回滞曲线}, 11 | xlabel={$H$/(A$\cdot$m$^{-1}$)}, 12 | ylabel={$B$/T}, 13 | ] 14 | \addplot+ [] table[col sep=comma,] {e1.csv}; 15 | \addplot+ [] table[col sep=comma,] {e2.csv}; 16 | \legend{修正前,修正后,} 17 | \end{axis} 18 | \end{tikzpicture} 19 | \end{document} -------------------------------------------------------------------------------- /support/examples/table.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{array} 3 | \usepackage{booktabs} 4 | \begin{document} 5 | \begin{table}[ht] 6 | \centering 7 | \caption{北京冬奥会吉祥物}\label{tab:mascot} 8 | \begin{tabular}{lp{3cm}} 9 | \toprule 10 | \multicolumn{1}{c}{吉祥物} & \multicolumn{1}{c}{描述} \\ 11 | \midrule 12 | 冰墩墩 & 2022 年北京冬季奥运会吉祥物 \\ 13 | 雪容融 & 2022 年北京冬季残奥会吉祥物 \\ 14 | \bottomrule 15 | \end{tabular} 16 | \end{table} 17 | \end{document} -------------------------------------------------------------------------------- /support/examples/doubleimages.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{graphicx} 3 | \graphicspath{{figs/}{pics/}} 4 | \begin{document} 5 | \begin{figure}[ht] 6 | \begin{minipage}{0.48\textwidth} 7 | \centering 8 | \includegraphics[height=2cm]{sjtug} 9 | \caption{SJTUG 徽标}\label{fig:sjtug} 10 | \end{minipage}\hfill 11 | \begin{minipage}{0.48\textwidth} 12 | \centering 13 | \includegraphics[height=2cm]{sjtugt} 14 | \caption{SJTUG 文字}\label{fig:sjtugt} 15 | \end{minipage} 16 | \end{figure} 17 | \end{document} -------------------------------------------------------------------------------- /support/examples/subfigures.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexart} 2 | \usepackage{graphicx} 3 | \usepackage{subcaption} 4 | \graphicspath{{figs/}{pics/}} 5 | \begin{document} 6 | \begin{figure}[ht] 7 | \begin{subfigure}{0.48\textwidth} 8 | \centering 9 | \includegraphics[height=2cm]{sjtug} 10 | \caption{徽标} 11 | \end{subfigure}\hfill 12 | \begin{subfigure}{0.48\textwidth} 13 | \centering 14 | \includegraphics[height=2cm]{sjtugt} 15 | \caption{文字} 16 | \end{subfigure} 17 | \caption{SJTUG}\label{fig:sjtug} 18 | \end{figure} 19 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/c.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{ctex} 5 | \begin{document} 6 | \begin{tikzpicture} 7 | \tikzset{ 8 | every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny}, 9 | small dot/.style={fill=black,circle,scale=0.3}, 10 | } 11 | \begin{axis}[xlabel={$\theta$/$^\circ$}, 12 | ylabel={射线强度$\frac{R}{1/s}$}, 13 | title={晶体衍射曲线($U$=30kV,$I$=10mA)}, 14 | width=12cm, 15 | height=6cm, 16 | ] 17 | \addplot [blue] table[col sep=comma,] {c.csv}; 18 | \end{axis} 19 | \end{tikzpicture} 20 | \end{document} -------------------------------------------------------------------------------- /support/figures/sjtutex.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \begin{document} 3 | \begin{tikzpicture} 4 | \node[draw] (v1) at (-0.5,1.5) {SJTU\TeX{}}; 5 | \node[draw,font=\scshape] (v2) at (-0.5,0.5) {SJTUThesis}; 6 | \node[draw,font=\scshape] (v4) at (2.95,0.5) {SJTUBeamer}; 7 | \draw[->] (v1) edge (v2); 8 | \node[draw,font=\ttfamily,anchor=north] (v3) at (-0.5,-0.25) {\parbox{8em}{sjtuthesis.cls\\sjtureport.cls\\sjtuarticle.cls}}; 9 | \draw[->] (v2) edge (v3); 10 | \node[draw,font=\ttfamily,anchor=north] (v5) at (2.95,-0.25) {\parbox{8em}{beamertheme\\sjtubeamer*.sty}}; 11 | \draw[->] (v4) edge (v5); 12 | \end{tikzpicture} 13 | \end{document} 14 | -------------------------------------------------------------------------------- /support/figures/beamerdir.tex: -------------------------------------------------------------------------------- 1 | \documentclass[beamer,tikz,preview]{standalone} 2 | \input{forest-sjtu.ltx} 3 | 4 | \begin{document} 5 | \begin{standaloneframe} 6 | \begin{forest} 7 | for tree = {grow'=0,folder,s sep=0mm,font=\sf} 8 | [SJTUBeamer/src 9 | [build, is folder 10 | [distrib, is folder] 11 | [doc, is folder] 12 | [local, is folder] 13 | [result, is folder] 14 | [test, is folder] 15 | [unpacked, is folder] 16 | ] 17 | [doc, is folder] 18 | [source, is folder] 19 | [support, is folder] 20 | [testfiles, is folder] 21 | [build.lua, is file] 22 | ] 23 | \end{forest} 24 | \end{standaloneframe} 25 | \end{document} -------------------------------------------------------------------------------- /support/beamer/columns.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \begin{document} 3 | \begin{frame} 4 | \begin{columns}[c] 5 | \begin{column}{.5\textwidth} 6 | \begin{itemize} 7 | \item 第一项 8 | \item 第二项 9 | \item 第三项 10 | \end{itemize} 11 | \end{column} 12 | \begin{column}{.5\textwidth} 13 | \begin{itemize} 14 | \item 第四项 15 | \item 第五项 16 | \item 第六项 17 | \end{itemize} 18 | \end{column} 19 | \end{columns} 20 | \end{frame} 21 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/g.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{ctex} 5 | \begin{document} 6 | \begin{tikzpicture} 7 | \begin{axis}[xmin={0}, 8 | xmax={7000}, 9 | xlabel={$f$/Hz}, 10 | ylabel={$\frac{I}{I_m}$}, 11 | title={RLC 谐振电路幅值-频率变化图}, 12 | xmajorgrids,grid style={white},extra x ticks={1597,3380},extra x tick style={grid style={red},xticklabel={\textcolor{red}{$\pgfmathprintnumber\tick$}},tick label style={yshift=5mm}}, 13 | ymajorgrids,extra y ticks={0.71},extra y tick style={grid style={red},yticklabel={\textcolor{red}{$\pgfmathprintnumber\tick$}}} 14 | ] 15 | \addplot+ [] table[col sep=comma,] {g.csv}; 16 | \end{axis} 17 | \end{tikzpicture} 18 | \end{document} -------------------------------------------------------------------------------- /support/figures/forest-sjtu.ltx: -------------------------------------------------------------------------------- 1 | \RequirePackage[edges]{forest} 2 | \RequirePackage{fontawesome5} 3 | \forestset{ 4 | is folder/.style={delay={content/.wrap value={\faFolder{} ##1}}}, 5 | is file/.style={delay={content/.wrap value={\faFile{} ##1}}}, 6 | is file fuzzy/.style={delay={content/.wrap value={{\faFile[regular]} ##1}}}, 7 | path highlight/.code args={<#1>}{ 8 | \only<#1>{ 9 | \pgfkeysalso{ 10 | orange, 11 | edge={orange}, 12 | for ancestors={edge={orange}, 13 | if level=0{}{orange}} 14 | } 15 | } 16 | }, 17 | only/.code args={<#1>}{ 18 | \alt<#1>{}{\pgfkeysalso{before typesetting nodes={remove}}} 19 | }, 20 | expanded/.code args={<#1>}{ 21 | \pgfkeysalso{for descendants={only=<#1>}} 22 | }, 23 | } -------------------------------------------------------------------------------- /support/pgfplots/a.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{ctex} 5 | \begin{document} 6 | \begin{tikzpicture} 7 | \tikzset{ 8 | every pin/.style={fill=yellow!50!white,rectangle,rounded corners=3pt,font=\tiny}, 9 | small dot/.style={fill=black,circle,scale=0.3}, 10 | } 11 | \begin{axis}[ylabel={输出电压 U/V}, 12 | xlabel={磁感应强度 B/Gs}, 13 | title={磁阻转换器输出电压与磁感应强度的关系}, 14 | legend pos={south east}, 15 | ] 16 | \addplot+ [] table[col sep=comma] {a.csv}; 17 | \addplot+ [no markers,domain=-6:6] {0.2536*x - 0.0016}; 18 | \node [font=\tiny] at (axis description cs:0.5,0.7) {$y=0.2536x-0.0016$}; 19 | \node [font=\tiny] at (axis description cs:0.5,0.65) {$R=0.9998$}; 20 | \legend{输出电压,线性拟合,} 21 | \end{axis} 22 | \end{tikzpicture} 23 | \end{document} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 如何使用 LaTeX 排版论文/幻灯片 2 | 3 | 上海交通大学图书馆专题培训讲座 2022 年《从零开始使用 LaTeX 排版论文》与《如何使用 beamer 制作学术报告幻灯片》。 4 | 5 | ### 第一次编译 6 | 7 | 第一次编译以及依赖文件更改后请使用 8 | ``` 9 | l3build doc 10 | ``` 11 | 编译文件。 12 | 13 | ### 编辑时编译 14 | 15 | 之后可以使用默认编译方法如 `latexmk` 编译主文件 `latex-talk.tex`。 16 | 17 | ### 上传至 Overleaf 18 | 19 | 需要上传到 Overleaf 编译请使用 20 | ``` 21 | l3build ctan 22 | ``` 23 | 将生成的 `sjtulib-talk-ctan.zip` 上传,并使用 XeLaTeX 编译。受 Overleaf 编译时长限制,目前可以在[这个链接](https://www.overleaf.com/read/fvwxzvcxhcwd)上看到最近一次讲座的内容。可以下载预编译的 Overleaf 版本,在 `latex-talk.tex` 主文件中选择需要编译哪些部分后,手动本地编译全部内容。 24 | 25 | ### 预编译版本 26 | 27 | 也可以在[此处](https://github.com/sjtug/sharing/tree/master/2022-05-18)得到预编译的 PDF 文件。 28 | 29 | ### 贡献/许可 30 | 31 | 可以通过 [GitHub Issues](https://github.com/sjtug/sjtulib-latex-talk/issues) 报告文档中的 BUG 等。 32 | 33 | 以 CC BY-SA 4.0 协议许可。 34 | -------------------------------------------------------------------------------- /beamerthemenosjtubeamer.sty: -------------------------------------------------------------------------------- 1 | %% If you don't use SJTUBeamer theme, 2 | %% Use this theme and redirect the macros to dummy ones. 3 | %% What's more, you need to use XeLaTeX to compile. 4 | 5 | \usepackage{listingsutf8} 6 | \lstset{columns=flexible} 7 | \lstnewenvironment{codeblock}[2][]{\lstset{title=#2,#1}}{} 8 | \newcommand<>{\highlightline}{} 9 | \newcommand{\highlight}[2][]{\alert{#2}} 10 | \newcommand{\paragraph}[1]{\bfseries #1\hspace{.5em}} 11 | \usepackage{tikz} 12 | \newcommand{\stamptext}[1][red]{#1} 13 | \newenvironment{stampbox}[1][]{}{} 14 | \newcommand{\makebottom}{ 15 | \begin{frame} 16 | \begin{center} 17 | \Huge 18 | Thank You! 19 | \end{center} 20 | \end{frame} 21 | } 22 | \newcommand{\stamparray}[3]{} 23 | \newenvironment{bibliolist}[1]{\begin{thebibliography}{#1}}{\end{thebibliography}} 24 | \newcommand{\articleitem}{\item} 25 | \newcommand{\bookitem}{\item} 26 | \newcommand{\onlineitem}{\item} 27 | \newenvironment{shadedsection}{}{} 28 | \newcommand{\stamphrule}[1][]{} -------------------------------------------------------------------------------- /support/pgfplots/b.dat: -------------------------------------------------------------------------------- 1 | -0.3 -0.3 1.035 2 | -0.2 -0.3 1.029 3 | -0.1 -0.3 1.027 4 | 0 -0.3 1.023 5 | 0.1 -0.3 1.024 6 | 0.2 -0.3 1.024 7 | 0.3 -0.3 1.032 8 | 9 | -0.3 -0.2 1.031 10 | -0.2 -0.2 1.029 11 | -0.1 -0.2 1.029 12 | 0 -0.2 1.026 13 | 0.1 -0.2 1.026 14 | 0.2 -0.2 1.024 15 | 0.3 -0.2 1.031 16 | 17 | -0.3 -0.1 1.028 18 | -0.2 -0.1 1.028 19 | -0.1 -0.1 1.029 20 | 0 -0.1 1.026 21 | 0.1 -0.1 1.026 22 | 0.2 -0.1 1.024 23 | 0.3 -0.1 1.029 24 | 25 | -0.3 0 1.025 26 | -0.2 0 1.026 27 | -0.1 0 1.029 28 | 0 0 1.026 29 | 0.1 0 1.026 30 | 0.2 0 1.024 31 | 0.3 0 1.029 32 | 33 | -0.3 0.1 1.027 34 | -0.2 0.1 1.027 35 | -0.1 0.1 1.029 36 | 0 0.1 1.026 37 | 0.1 0.1 1.027 38 | 0.2 0.1 1.024 39 | 0.3 0.1 1.026 40 | 41 | -0.3 0.2 1.029 42 | -0.2 0.2 1.027 43 | -0.1 0.2 1.029 44 | 0 0.2 1.026 45 | 0.1 0.2 1.027 46 | 0.2 0.2 1.024 47 | 0.3 0.2 1.028 48 | 49 | -0.3 0.3 1.033 50 | -0.2 0.3 1.026 51 | -0.1 0.3 1.026 52 | 0 0.3 1.023 53 | 0.1 0.3 1.025 54 | 0.2 0.3 1.024 55 | 0.3 0.3 1.035 56 | -------------------------------------------------------------------------------- /support/beamer/poster.tex: -------------------------------------------------------------------------------- 1 | \documentclass{ctexbeamer} 2 | \usetheme[red]{sjtubeamer} 3 | \usesjtutheme{poster} 4 | \usepackage{zhlipsum} 5 | \begin{document} 6 | \title{SJTUBeamer Poster} 7 | \author{SJTUG} 8 | \logo{\zhlogo} 9 | \institute[Linux User Group]{Linux 用户组} 10 | \footline[Typesetting Graduation Thesis by \LaTeX{}]{使用 \LaTeX{} 排版毕业论文} 11 | \begin{frame}[fragile] 12 | \begin{columns}[T] 13 | \begin{column}{.45\textwidth} 14 | \begin{stampblock}{简介} 15 | \zhlipsum[1] 16 | \end{stampblock} 17 | 18 | \begin{stampblock}{动机} 19 | \zhlipsum[2] 20 | \end{stampblock} 21 | 22 | \begin{stampblock}{步骤} 23 | \zhlipsum[3] 24 | \end{stampblock} 25 | \end{column} 26 | \begin{column}{.45\textwidth} 27 | \begin{stampblock}{细节} 28 | \zhlipsum[4] 29 | \end{stampblock} 30 | 31 | \begin{stampblock}{结论} 32 | \zhlipsum[5] 33 | \end{stampblock} 34 | 35 | \begin{stampblock}{参考文献} 36 | \zhlipsum[6] 37 | \end{stampblock} 38 | \end{column} 39 | \end{columns} 40 | \end{frame} 41 | \end{document} -------------------------------------------------------------------------------- /support/figures/tkzeuclide.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{tkz-euclide} 3 | \begin{document} 4 | \begin{tikzpicture} 5 | \tkzDefPoints{0/0/A,3/0/B,2/2/C} 6 | \tkzDefCircle[euler](A,B,C) \tkzGetPoints{E}{e} 7 | \tkzDrawCircle[blue](E,e) 8 | \tkzDefMidPoint(A,B) \tkzGetPoint{M_c} 9 | \tkzDefMidPoint(A,C) \tkzGetPoint{M_b} 10 | \tkzDefMidPoint(B,C) \tkzGetPoint{M_a} 11 | \tkzDrawPoints(A,B,C) \tkzDrawPoints[blue!60](E) 12 | \tkzDrawPoints[red](M_a,M_b,M_c) 13 | \tkzDrawSegments(A,B B,C A,C) 14 | \tkzLabelPoints(E) 15 | \tkzAutoLabelPoints[center=E](A,B,C) 16 | \tkzDefPointBy[projection=onto A--B](C) \tkzGetPoint{H_c} 17 | \tkzDefPointBy[projection=onto B--C](A) \tkzGetPoint{H_a} 18 | \tkzDefPointBy[projection=onto A--C](B) \tkzGetPoint{H_b} 19 | \tkzDrawPoints[blue](H_a,H_b,H_c) 20 | \tkzDrawSegments[blue,dashed](A,H_a B,H_b C,H_c) 21 | \tkzDefTriangleCenter[ortho](A,B,C) \tkzGetPoint{H} 22 | \tkzDefMidPoint(A,H) \tkzGetPoint{E_a} 23 | \tkzDefMidPoint(B,H) \tkzGetPoint{E_b} 24 | \tkzDefMidPoint(C,H) \tkzGetPoint{E_c} 25 | \tkzDrawPoints[yellow](E_a,E_b,E_c) 26 | \end{tikzpicture} 27 | \end{document} -------------------------------------------------------------------------------- /support/lec-2023-04-01.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../latex-talk.tex 2 | 3 | \title{从零开始使用 \LaTeX 排版论文} 4 | \author{钱宇超} 5 | \institute[SJTU Linux User Group]{上海交通大学 Linux 用户组} 6 | \date{2023 年 4 月 1 日} 7 | \subject{LaTeX, 论文排版, SJTUThesis} 8 | \maketitle 9 | 10 | \begin{frame}{关于} 11 | \begin{columns}[c] 12 | \begin{column}{.7\textwidth} 13 | \begin{block}{从零开始使用 \LaTeX 排版论文} 14 | \alert{\url{https://github.com/sjtug/sjtulib-latex-talk}} 15 | 16 | \begin{flushleft} 17 | \begin{itemize} 18 | \item 从零开始跑起来 \LaTeX{},并了解其基础操作; 19 | \item 学会使用 \SJTUThesis 交大毕业论文模板。 20 | \end{itemize} 21 | \end{flushleft} 22 | 23 | \begin{tabular*}{0.8\linewidth}{@{\extracolsep{\fill}}lll@{}} 24 | \scriptsize 最后更新 & \scriptsize 幻灯片下载 & \scriptsize 许可证 \\ 25 | \today & Overleaf \link{https://www.overleaf.com/read/fvwxzvcxhcwd} & \href{https://creativecommons.org/licenses/by-sa/4.0/}{\faCreativeCommons\,\faCreativeCommonsBy\,\faCreativeCommonsSa} \\ 26 | \end{tabular*} 27 | \end{block} 28 | \vspace{0.2cm} 29 | \end{column} 30 | \begin{column}{.3\textwidth} 31 | \href{https://www.overleaf.com/read/fvwxzvcxhcwd}{\includegraphics{support/figures/qrcode.pdf}} 32 | \end{column} 33 | \end{columns} 34 | \end{frame} 35 | 36 | \include{support/contents/learnlatex} 37 | \include{support/contents/sjtuthesis} 38 | \include{support/contents/newversion} 39 | 40 | \def\bottomthanks{Happy \TeX{}ing!} 41 | \makebottom 42 | -------------------------------------------------------------------------------- /support/figures/mindmap.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usetikzlibrary{mindmap} 3 | % !TIKZEDT BOUNDINGBOX = -3 -3 8 5 4 | \begin{document} 5 | \begin{tikzpicture}[mindmap,concept color=cprimary,scale=0.6,every node/.style={scale=0.6},text=white] 6 | \definecolor{cprimary}{RGB}{0,64,152} %problue 7 | \definecolor{csecondary}{RGB}{51,141,39} %lightgreen 8 | \definecolor{ctertiary}{RGB}{0,81,78} %lightgray 9 | \node [concept] {Stage-Based Strategy for Scheduling Jobs Problem with Max-Min Fairness} 10 | child[concept color=ctertiary,grow=150] { 11 | node[concept] {Algorithm Design} 12 | child[concept,grow=140,concept color=csecondary] {node[concept] {Simple Example}} 13 | child[concept,grow=180,concept color=csecondary] {node[concept] {Stage Based}} 14 | child[concept,grow=220,concept color=csecondary] {node[concept] {Max-Min Fairness}} 15 | } 16 | child[concept color=ctertiary,grow=210] { 17 | node[concept] {NP-Completeness} 18 | child[concept,grow=160,concept color=csecondary] {node[concept] {3-SAT}} 19 | child[concept,grow=200,concept color=csecondary] {node[concept] {Reduction}} 20 | } 21 | child[concept color=ctertiary,grow=0] { 22 | node[concept] {Algorithm \& Test} 23 | child[concept,grow=40,concept color=csecondary] {node[concept] {Floyd-Warshall}} 24 | child[concept,grow=0,concept color=csecondary] {node[concept] {Without Max-min}} 25 | child[concept,grow=-40,concept color=csecondary] {node[concept] {Max-min Iteration}} 26 | }; 27 | \end{tikzpicture} 28 | \end{document} -------------------------------------------------------------------------------- /support/pgfplots/f.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{pgfplots} 3 | \pgfplotsset{compat=newest} 4 | \usepackage{pgfplotstable} 5 | \usepackage{ctex} 6 | \begin{document} 7 | \begin{tikzpicture} 8 | \begin{axis}[ymin={0}, 9 | xlabel={$\theta$/$^\circ$}, 10 | ylabel={射线强度 $\frac{R}{1/s}$}, 11 | title={不同电压下的局部衍射拟合线}, 12 | ] 13 | \pgfplotstableread [row sep=crcr] {x y\\4 22.2\\4.1 70.4\\4.2 127\\\\}{\volta}; 14 | \pgfplotstableread [row sep=crcr] {x y\\4.3 12.2\\4.4 42.2\\4.5 79.6\\4.6 130\\4.7 162.4\\4.8 199.4\\\\}{\voltb}; 15 | \pgfplotstableread [row sep=crcr] {x y\\4.7 19.4\\4.8 48\\4.9 86.4\\5 114.2\\5.1 145.6\\5.2 169.4\\\\}{\voltc}; 16 | \pgfplotstableread [row sep=crcr] {x y\\5.1 19.6\\5.2 36\\5.3 64\\5.4 91.4\\5.5 114.6\\\\}{\voltd}; 17 | \pgfplotstableread [row sep=crcr] {x y\\5.5 7\\5.6 20.4\\5.7 35.6\\5.8 55.6\\5.9 66.8\\6 81.2\\6.1 92.6\\\\}{\volte}; 18 | \addplot+ [only marks,] table[x=x,y=y] {\volta}; 19 | \addplot+ [only marks,] table[x=x,y=y] {\voltb}; 20 | \addplot+ [only marks,] table[x=x,y=y] {\voltc}; 21 | \addplot+ [only marks,] table[x=x,y=y] {\voltd}; 22 | \addplot+ [only marks,] table[x=x,y=y] {\volte}; 23 | \pgfplotsset{cycle list shift=-5}; 24 | \addplot+ [no markers,] table[x=x,y={create col/linear regression={y=y}}] {\volta}; 25 | \addplot+ [no markers,] table[x=x,y={create col/linear regression={y=y}}] {\voltb}; 26 | \addplot+ [no markers,] table[x=x,y={create col/linear regression={y=y}}] {\voltc}; 27 | \addplot+ [no markers,] table[x=x,y={create col/linear regression={y=y}}] {\voltd}; 28 | \addplot+ [no markers,] table[x=x,y={create col/linear regression={y=y}}] {\volte}; 29 | \legend{30kV,28kV,26kV,24kV,22kV,} 30 | \end{axis} 31 | \end{tikzpicture} 32 | \end{document} -------------------------------------------------------------------------------- /support/lec-2022-12-28.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../latex-talk.tex 2 | 3 | \title{使用 \LaTeX{} 排版毕业论文} 4 | \subtitle{上海交通大学图书馆 WELab 培训讲座} 5 | \author{李子龙} 6 | \institute[SJTU Linux User Group]{上海交通大学 Linux 用户组} 7 | \date{2022 年 12 月 28 日} 8 | \subject{LaTeX, 论文排版, SJTUThesis, 模版编写} 9 | \maketitle 10 | 11 | \begin{frame}{关于} 12 | \begin{columns}[c] 13 | \begin{column}{.7\textwidth} 14 | \begin{block}{使用 \LaTeX{} 排版毕业论文} 15 | \alert{\url{https://github.com/sjtug/sjtulib-latex-talk}} 16 | 17 | \begin{flushleft} 18 | \begin{itemize} 19 | \item 从零开始跑起来 \LaTeX{},只用十步了解其基础操作; 20 | \item 学会使用 \SJTUThesis{} 交大毕业论文模板,新版说明; 21 | \item 简要了解 \LaTeX{} 模板的编写,触类旁通。 22 | \end{itemize} 23 | \end{flushleft} 24 | 25 | \begin{tabular*}{0.8\linewidth}{@{\extracolsep{\fill}}lll@{}} 26 | \scriptsize 最后更新 & \scriptsize 幻灯片下载 & \scriptsize 许可证 \\ 27 | \today & Overleaf \link{https://www.overleaf.com/read/fvwxzvcxhcwd} & \href{https://creativecommons.org/licenses/by-sa/4.0/}{\faCreativeCommons\,\faCreativeCommonsBy\,\faCreativeCommonsSa} \\ 28 | \end{tabular*} 29 | \end{block} 30 | \vspace{0.2cm} 31 | \end{column} 32 | \begin{column}{.3\textwidth} 33 | \href{https://www.overleaf.com/read/fvwxzvcxhcwd}{\includegraphics{support/figures/qrcode.pdf}} 34 | \end{column} 35 | \end{columns} 36 | 37 | \note{本次讲座只会讲这个讲稿的前半部分,想了解更多关于 SJTUBeamer 的相关信息,可以去看 38 | 今年 5 月的讲座。这个稿子相较于今年 4 月进行了增删,并且会跳过/调换顺序的讲(因为看到上一次 39 | 直接讲一些很抽象的概念容易劝退,这一次打算直接 make your hands dirty 码一些代码), 40 | 内容难度递增,有些内容不理解也没关系,不影响你的使用。可以期待一下中后段对 \SJTUThesis{} 41 | v2 相关情况的说明。} 42 | \end{frame} 43 | 44 | \include{support/contents/learnlatex} 45 | \include{support/contents/sjtuthesis} 46 | \include{support/contents/newversion} 47 | \include{support/contents/template} 48 | 49 | \def\bottomthanks{Happy \TeX{}ing!} 50 | \makebottom -------------------------------------------------------------------------------- /support/figures/thesisdir.tex: -------------------------------------------------------------------------------- 1 | \documentclass[beamer,tikz,preview]{standalone} 2 | \input{forest-sjtu.ltx} 3 | 4 | \begin{document} 5 | \begin{standaloneframe} 6 | \begin{forest} 7 | for tree = {grow'=0,folder,s sep=0mm,font=\sf} 8 | [SJTUThesis 9 | [bibdata, is folder 10 | [thesis.bib, is file, only=<7>, path highlight=<7>] 11 | ] 12 | [contents, is folder 13 | [abstract.tex, is file, only=<8>, path highlight=<8>] 14 | [achievements.tex, is file, only=<10>, path highlight=<10>] 15 | [acknowledgements.tex, is file, only=<10>, path highlight=<10>] 16 | [app\_flow\_chart.tex, is file, only=<9>, path highlight=<9>] 17 | [app\_maxwell\_equations.tex, is file, only=<9>, path highlight=<9>] 18 | [digest.tex, is file, only=<10>, path highlight=<10>] 19 | [floats.tex, is file, only=<9>, path highlight=<9>] 20 | [intro.tex, is file, only=<9>, path highlight=<9>] 21 | [math\_and\_citations.tex, is file, only=<6>, path highlight=<6>] 22 | [math\_and\_citations.tex, is file, only=<9>, path highlight=<9>] 23 | [nomenclature.tex, is file, only=<8>, path highlight=<8>] 24 | [publications.tex, is file, only=<10>, path highlight=<10>] 25 | [resume.tex, is file, only=<10>, path highlight=<10>] 26 | [summary.tex, is file, only=<9>, path highlight=<9>] 27 | ] 28 | [figures, is folder] 29 | [scans, is folder 30 | [sample-copyright-old.pdf, is file, only=<5>, path highlight=<5>]] 31 | [texmf\only<2-3>{/tex/latex/sjtuthesis}, is folder, expanded=<2-3> 32 | [sjtu-*.def, is file fuzzy, path highlight=<3>] 33 | [sjtu-vi-*.pdf, is file fuzzy] 34 | [sjtuthesis.cls, is file, path highlight=<2>]] 35 | [main.tex, is file, path highlight=<1>] 36 | [setup.tex, is file, path highlight=<4>] 37 | ] 38 | \end{forest} 39 | \end{standaloneframe} 40 | \end{document} -------------------------------------------------------------------------------- /support/contents/learnlatex.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{学习 \LaTeX{}} 4 | % FIXME: footnote fault numbering 5 | % FIXME: section pop up in navigation in advance 6 | 7 | \begin{frame} 8 | \frametitle{本部分主要参考} 9 | \begin{bibliolist}{00} 10 | \onlineitem 陈晟祺~等. 11 | \newblock 如何使用 \LaTeX\ 排版论文[EB/OL]. 12 | \newblock 2021. \url{https://github.com/tuna/thulib-latex-talk}. 13 | 14 | \onlineitem 曾祥东. 15 | \newblock 现代 \LaTeX\ 入门讲座[EB/OL]. 16 | \newblock 2022. \url{https://github.com/stone-zeng/latex-talk}. 17 | 18 | \onlineitem \LaTeX\ Project. 19 | \CTeX\ 开发小组~译. 20 | \newblock learnlatex.org[EB/OL]. 21 | \newblock 2022. \url{https://github.com/CTeX-org/learnlatex.github.io}. 22 | 23 | \onlineitem \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, \textsc{Schlegl E}. 24 | \CTeX\ 开发小组~译. 25 | \newblock 一份(不太)简短的 \LaTeXe{} 介绍:或 111 分钟了解 \LaTeXe{}[EB/OL]. \newblock\newblock 2021. 26 | \url{https://ctan.org/pkg/lshort-zh-cn}. 27 | \end{bibliolist} 28 | 29 | \note{推荐大家去阅读这些入门材料。} 30 | \end{frame} 31 | 32 | \begin{frame}[plain] 33 | \vfil 34 | \begin{center} 35 | \href{https://learnlatex.org}{ 36 | \rmfamily 37 | Learn\,\lower1ex\hbox{\Huge\LaTeX{}}.org 38 | } 39 | \end{center} 40 | \vfil 41 | \begin{center} 42 | \parbox{0.75\linewidth}{ 43 | Learn\LaTeX{}.org 提供了解 \LaTeX{} 的 16 篇简短的教程,并包含了一些可以在线运行的示例,可以通过亲自动手查看实验效果。本部分主要参考由 \CTeX{}-org 提供的中文翻译版本 \link{https://github.com/CTeX-org/learnlatex.github.io/tree/zh-Hans/zh-Hans/}。 44 | } 45 | \end{center} 46 | \vfil 47 | \note{这一部分主要参考了 Learn\LaTeX{}.org 的系列教程,内容简洁,适合入门,符合 48 | 教育学观念 \link{https://www.tug.org/TUGboat/tb41-2/tb128reviews-learnlatex.pdf}, 49 | 并参考由 \CTeX{}-org 提供的中文翻译版本 50 | \link{https://github.com/CTeX-org/learnlatex.github.io/tree/zh-Hans/zh-Hans/}。 51 | 如果你认为下面一个小时的入门教程没有讲得非常细致的话, 52 | 欢迎直接阅读这个网站的全文。} 53 | \end{frame} 54 | 55 | \begin{shadedsection} 56 | 57 | \input{support/contents/learnlatex/intro} 58 | \input{support/contents/learnlatex/install} 59 | \input{support/contents/learnlatex/minimal} 60 | \input{support/contents/learnlatex/text-style} 61 | \input{support/contents/learnlatex/structure} 62 | \input{support/contents/learnlatex/figure} 63 | \input{support/contents/learnlatex/table} 64 | \input{support/contents/learnlatex/math} 65 | \input{support/contents/learnlatex/reference} 66 | 67 | \end{shadedsection} 68 | -------------------------------------------------------------------------------- /support/figures/automata.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usetikzlibrary{automata,positioning} 3 | \usepackage{amssymb} 4 | \begin{document} 5 | \begin{tikzpicture}[every edge node/.style={font=\scriptsize}] 6 | \node[initial,state] (v1) at (-1.5,-0.5) {$q_S$}; 7 | \node[state] (v2) at (1,-0.5) {$q_1$}; 8 | \draw[->] (v2) edge[loop above] node {$1\slash 1,R$} (v2); 9 | \draw[->] (v1) edge node[above] {$\triangleright\slash \triangleright,R$} (v2); 10 | \node[state] (v3) at (3.5,-0.5) {$q_2$}; 11 | \draw[->] (v2) edge node[above] {$\square\slash \square,R$} (v3); 12 | \node [state] (v4) at (1,-2.5) {$q_3$}; 13 | \node [state] (v5) at (3.5,-2.5) {$q_4$}; 14 | \draw[->] (v3) edge node[sloped,above] {$1\slash 0,L$} (v4); 15 | \draw[->] (v4) edge node[above] {$\square\slash \square,L$} (v5); 16 | \draw[loop below] (v5) edge node {$0\slash 0,L$} (v5); 17 | \node [state] (v6) at (6,-2.5) {$q_5$}; 18 | \draw [->] (v5) edge node[above] {$1\slash 0,R$} (v6); 19 | \node [state] (v7) at (6,-5) {$q_t$}; 20 | \draw [->] (v5) edge node[above,sloped] {$\triangleright\slash \square,R$} (v7); 21 | \draw [loop below] (v6) edge node {$0\slash 0,R$} (v6); 22 | \draw [loop above] (v6) edge node {$\square\slash \square,R$} (v6); 23 | \draw [out=145,in=35,->] (v6) edge node[above] {$1\slash 0,L$} (v4); 24 | \node [state] (v8) at (8.5,-2.5) {$q_6$}; 25 | \draw [->] (v6) edge node[above] {$\triangleleft\slash \triangleleft,R$} (v8); 26 | \draw [->] (v8) edge[loop below] node {$1\slash 1,R$} (v8); 27 | \node [state] (v9) at (11,-2.5) {$q_7$}; 28 | \draw (v8) edge node[above] {$\square\slash 1,L$} (v9); 29 | \draw [->] (v9) edge[loop below] node {$1\slash 1,L$} (v9); 30 | \node [state] (v10) at (13.5,-2.5) {$q_8$}; 31 | \draw [->] (v9) edge node[above] {$\triangleleft\slash \triangleleft,L$} (v10); 32 | \draw (v10) edge[loop below] node {$0\slash 1,L$} (v10); 33 | \draw[->,out=150,in=0] (v10) edge node[sloped,above] {$\square\slash \square,R$} (v3); 34 | \draw (v7) edge[loop below] node {$(0,1,\square)\slash \square,R$} (v7); 35 | \node [state] (v11) at (8.5,-5) {$q_f$}; 36 | \draw[->] (v7) edge node[above] {$\triangleleft\slash \triangleright,R$} (v11); 37 | \draw (v11) edge[loop below] node {$1\slash 1,R$} (v11); 38 | \node [accepting,state] (v12) at (11,-5) {$q_H$}; 39 | \draw[->] (v11) edge node[above] {$\square\slash \triangleleft,S$} (v12); 40 | \end{tikzpicture} 41 | \end{document} -------------------------------------------------------------------------------- /support/lec-2022-04-03.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../latex-talk.tex 2 | 3 | \title{从零开始使用 \LaTeX{} 排版论文} 4 | \subtitle{上海交通大学图书馆专题培训讲座} 5 | \author{李子龙} 6 | \institute[SJTU Linux User Group]{上海交通大学 Linux 用户组} 7 | \date{2022 年 4 月 3 日} 8 | \subject{LaTeX, 论文排版, SJTUThesis} 9 | \maketitle 10 | 11 | \begin{frame}{关于} 12 | \begin{columns}[c] 13 | \begin{column}{.7\textwidth} 14 | \begin{block}{从零开始使用 \LaTeX{} 排版论文} 15 | \alert{\url{https://github.com/sjtug/sjtulib-latex-talk}} 16 | 17 | \begin{flushleft} 18 | \small 本次讲座帮助学生从零开始跑起来 \LaTeX{},只用十步了解其基本概念和基础操作。学会使用 \textsc{SJTUThesis} 交大学位论文模板,并了解提升排版效率的相关技巧。 19 | \end{flushleft} 20 | 21 | \begin{tabular*}{0.8\linewidth}{@{\extracolsep{\fill}}lll@{}} 22 | \scriptsize 最后更新 & \scriptsize 幻灯片下载 & \scriptsize 许可证 \\ 23 | \today & Overleaf \link{https://www.overleaf.com/read/fvwxzvcxhcwd} & \href{https://creativecommons.org/licenses/by-sa/4.0/}{\faCreativeCommons\,\faCreativeCommonsBy\,\faCreativeCommonsSa} \\ 24 | \end{tabular*} 25 | \end{block} 26 | \vspace{0.2cm} 27 | \end{column} 28 | \begin{column}{.3\textwidth} 29 | \href{https://www.overleaf.com/read/fvwxzvcxhcwd}{\includegraphics{support/figures/qrcode.pdf}} 30 | \end{column} 31 | \end{columns} 32 | \end{frame} 33 | 34 | \begin{frame} 35 | \frametitle{讲稿主要参考} 36 | \begin{bibliolist}{00} 37 | \onlineitem 陈晟祺~等. 38 | \newblock 如何使用 \LaTeX\ 排版论文[EB/OL]. 39 | \newblock 2021. \url{https://github.com/tuna/thulib-latex-talk}. 40 | 41 | \onlineitem 曾祥东. 42 | \newblock 现代 \LaTeX\ 入门讲座[EB/OL]. 43 | \newblock 2022. \url{https://github.com/stone-zeng/latex-talk}. 44 | 45 | \onlineitem \textsc{SJTUG}. 46 | \newblock \textsc{SJTUThesis} 用户文档[EB/OL]. 47 | \newblock 2022. \url{https://github.com/sjtug/SJTUThesis}. 48 | 49 | \onlineitem \LaTeX\ Project. 50 | C\TeX\ 开发小组~译. 51 | \newblock learnlatex.org[EB/OL]. 52 | \newblock 2022. \url{https://github.com/CTeX-org/learnlatex.github.io}. 53 | 54 | % \onlineitem \textsc{Oetiker T}, \textsc{Partl H}, \textsc{Hyna I}, \textsc{Schlegl E}. 55 | % C\TeX\ 开发小组~译. 56 | % \newblock 一份(不太)简短的 \LaTeXe{} 介绍:或 111 分钟了解 \LaTeXe{}[EB/OL]. \newblock\newblock 2021. 57 | % \url{https://ctan.org/pkg/lshort-zh-cn}. 58 | \end{bibliolist} 59 | \end{frame} 60 | 61 | \include{support/contents/learnlatex} 62 | \include{support/contents/sjtuthesis} 63 | \include{support/contents/intermission} 64 | 65 | \def\bottomthanks{Happy \TeX{}ing!} 66 | \makebottom -------------------------------------------------------------------------------- /support/lec-2022-05-18.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../latex-talk.tex 2 | 3 | \title{如何使用 beamer 制作学术报告幻灯片} 4 | \subtitle{上海交通大学图书馆专题培训讲座} 5 | \author{李子龙} 6 | \institute[SJTU Linux User Group]{上海交通大学 Linux 用户组} 7 | \date{2022 年 5 月 18 日} 8 | \subject{LaTeX, 幻灯片制作, SJTUBeamer} 9 | \maketitle 10 | 11 | \providecommand{\TikZ}{Ti\textit{k}Z} 12 | \providecommand{\pgf}{\textsc{pgf}} 13 | \providecommand{\pgfplots}{\textsc{pgfplots}} 14 | \providecommand{\pgfplotstable}{\textsc{PgfplotsTable}} 15 | 16 | \begin{frame}{关于} 17 | \begin{columns}[c] 18 | \begin{column}{.7\textwidth} 19 | \begin{block}{如何使用 beamer 制作学术报告幻灯片} 20 | \alert{\url{https://github.com/sjtug/sjtulib-latex-talk}} 21 | 22 | \begin{flushleft} 23 | \small 介绍 \LaTeX{} 幻灯片模板 \textsc{SJTUBeamer} 的使用方法,以及 \LaTeX{} 图形绘制的简明方法,帮助学生制作出像模像样的学术幻灯片。 24 | \end{flushleft} 25 | 26 | \begin{tabular*}{0.8\linewidth}{@{\extracolsep{\fill}}lll@{}} 27 | \scriptsize 最后更新 & \scriptsize 幻灯片下载 & \scriptsize 许可证 \\ 28 | \today & Overleaf \link{https://www.overleaf.com/read/fvwxzvcxhcwd} & \href{https://creativecommons.org/licenses/by-sa/4.0/}{\faCreativeCommons\,\faCreativeCommonsBy\,\faCreativeCommonsSa} \\ 29 | \end{tabular*} 30 | \end{block} 31 | \vspace{0.2cm} 32 | \end{column} 33 | \begin{column}{.3\textwidth} 34 | \href{https://www.overleaf.com/read/fvwxzvcxhcwd}{\includegraphics{support/figures/qrcode.pdf}} 35 | \end{column} 36 | \end{columns} 37 | \note{5 月 18 日下午 3:00。扫描二维码进入 Overleaf 页面,由于 Overleaf 编译时间的限制,到讲座结束后的一周内都只开放本次讲座的下载,之后该链接将恢复上一讲的内容,之后需要下载讲义请前往 \href{https://github.com/sjtug/sharing}{sjtug/sharing} 下载,或者手动从 \href{https://github.com/sjtug/sjtulib-latex-talk}{sjtug/sjtulib-latex-talk} 源代码编译。} 38 | \end{frame} 39 | 40 | \begin{frame} 41 | \frametitle{讲稿主要参考} 42 | \begin{bibliolist}{00} 43 | \onlineitem 吕荐瑞. 44 | \newblock \LaTeX{} 文档排版教程[EB/OL]. 45 | \newblock 2018. \url{https://lvjr.bitbucket.io/tutorial/learn-latex.pdf} 46 | 47 | \note[item]{这个教程讲的 beamer 就相对较多,\TikZ{} 也不少。} 48 | 49 | \onlineitem 朱俸民. 50 | \newblock \TikZ{} 画“图”指南[EB/OL]. 51 | \newblock 2020. \url{https://tuna.moe/event/2020/tikz/} 52 | 53 | \note[item]{专门讲 \TikZ{} 的讲座。} 54 | 55 | \onlineitem \textsc{Hansimov}. 56 | \newblock 如何加速 \LaTeX{} 编译[EB/OL]. 57 | \newblock 2019. \url{https://zhuanlan.zhihu.com/p/55043560} 58 | 59 | \note[item]{知乎也是 \LaTeX{} 大佬云集的地方。这位也是我们交大已经毕业的学长。} 60 | \end{bibliolist} 61 | \end{frame} 62 | 63 | \include{support/contents/sjtubeamer} 64 | \include{support/contents/visualization} 65 | \include{support/contents/boost} 66 | 67 | \def\bottomthanks{Happy \LaTeX{}ing!} 68 | \makebottom -------------------------------------------------------------------------------- /support/contents/intermission.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{更进一步} 4 | 5 | \begin{frame} 6 | \frametitle{其他 \LaTeX\ 中文入门资料} 7 | \begin{bibliolist}{00} 8 | \onlineitem \textsc{Reckdahl~K.} 9 | 王磊~译. 10 | \newblock \LaTeX{} 插图指南[EB/OL]. 11 | \newblock 第三版. 2017. \url{https://github.com/WenboSheng/epslatex-cn}. 12 | 13 | \onlineitem 包太雷. 14 | \newblock \LaTeX\ Notes[EB/OL]. 15 | \newblock 第二版. 2021. \url{https://github.com/huangxg/lnotes}. 16 | 17 | \bookitem 刘海洋. 18 | \newblock \LaTeX\ 入门[M]. 19 | \newblock 北京:电子工业出版社, 2013. 20 | \end{bibliolist} 21 | \end{frame} 22 | 23 | \begin{frame} 24 | \frametitle{其他 \LaTeX\ 经典资料} 25 | \begin{bibliolist}{00} 26 | \onlineitem \textsc{Overleaf}. 27 | \newblock Learn \LaTeX\ in 30 minutes[EB/OL]. 28 | \newblock \url{https://www.overleaf.com/learn/latex/Learn_LaTeX_in_30_minutes}. 29 | 30 | \bookitem \textsc{M.R.C. van Dongen}. 31 | \newblock \LaTeX{} and Friends[M/OL]. 32 | \newblock New York: Springer, 2012. 33 | \url{https://link.springer.com/book/10.1007/978-3-642-23816-1} 34 | 35 | \bookitem \textsc{Mittelbach F.}, \textsc{Goossens M.}, \textsc{Braams J.}, et al. 36 | \newblock The \LaTeX\ Companion[M]. 37 | \newblock 2nd ed. Boston: Addison-Wesley Professional. 2004. 38 | \end{bibliolist} 39 | \end{frame} 40 | 41 | \begin{frame} 42 | \frametitle{仍有 \LaTeX\ 的问题?} 43 | \begin{itemize} 44 | \item 首先可以查阅宏包的附带文档。在命令行输入 45 | 46 | \hfill 47 | \begin{minipage}{0.3\textwidth} 48 | \begin{exampleblock}{\faTerminal} 49 | \ttfamily 50 | texdoc \textit{} 51 | \end{exampleblock} 52 | \end{minipage} 53 | \item 其次可以考虑向 \TeX{} StackExchange \link{https://tex.stackexchange.com/} 寻找解答或提出问题。 54 | \item 中文相关的问题可以在 \CTeX{} 临时论坛 \link{https://github.com/CTeX-org/forum} 搜寻。 55 | \item 提问时请附上最小工作案例(MWE)与日志文件。 56 | \end{itemize} 57 | \end{frame} 58 | 59 | \begin{frame} 60 | \frametitle{敬请期待} 61 | 62 | 5 月 18 日还会有一讲来讨论 \LaTeX\ 更加注重视觉效果的相关知识。 63 | 64 | \begin{columns} 65 | \begin{column}{0.5\textwidth} 66 | \begin{figure} 67 | \begin{stampbox}[sjtuRedPrimary] 68 | \includegraphics[height=0.4\textheight]{support/beamer/hello.pdf} 69 | \end{stampbox} 70 | \caption{\textsc{SJTUBeamer} \link{https://github.com/sjtug/SJTUBeamer}} 71 | \end{figure} 72 | \end{column} 73 | \begin{column}{0.5\textwidth} 74 | \begin{figure} 75 | \begin{stampbox}[sjtuRedPrimary] 76 | \includegraphics[height=0.4\textheight]{support/images/latexsparkle.jpg} 77 | \end{stampbox} 78 | \caption{像模像样 \LaTeX\ \link{https://logcreative.tech/LaTeXSparkle}} 79 | \end{figure} 80 | \end{column} 81 | \end{columns} 82 | \end{frame} -------------------------------------------------------------------------------- /support/contents/learnlatex/table.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{表} 4 | 5 | \begin{frame}[fragile] 6 | \frametitle{三线表} 7 | \begin{columns} 8 | \begin{column}{0.6\textwidth} 9 | \begin{codeblock}[]{} 10 | \documentclass{ctexart} 11 | |\only<1-3>{\highlightline}|\usepackage{|\temporal<2>{array}{\highlight{array}}{array},\temporal<3>{booktabs}{\highlight{booktabs}}{booktabs}|} 12 | \begin{document} 13 | |\highlightline<1>|\begin{table}[ht] 14 | \centering 15 | \caption{|\phantom{}|北京冬奥会吉祥物} 16 | |\highlightline<1,2>| \begin{tabular}{lp{3cm}} 17 | |\highlightline<1,3>| \toprule 18 | |\highlightline<1,4>|吉祥物 & 描述 \\ 19 | |\highlightline<1,3>| \midrule 20 | |\highlightline<1,4>|冰墩墩 & 2022 年北京冬季奥运会吉祥物 \\ 21 | |\highlightline<1,4>|雪容融 & 2022 年北京冬季残奥会吉祥物 \\ 22 | |\highlightline<1,3>| \bottomrule 23 | |\highlightline<1,2>| \end{tabular} 24 | |\highlightline<1>|\end{table} 25 | \end{document} 26 | \end{codeblock} 27 | \end{column} 28 | \begin{column}{0.4\textwidth} 29 | 30 | \only<1>{ 31 | \includepdflarge{support/examples/table.pdf} 32 | } 33 | 34 | \only<2>{ 35 | 使用 \env{tabular} 环境绘制表格。需要添加参数(称为\textbf{表格导言})以确定每一列的对齐方式。引入 \pkg{array} 宏包来使用更多的\textbf{引导符}。 36 | \begin{center} 37 | \footnotesize 38 | \begin{tabular}{>{\ttfamily}ll} 39 | \alert{l} & 向左对齐 \\ 40 | \alert{c} & 居中对齐 \\ 41 | \alert{r} & 向右对齐 \\ 42 | \alert{p\{3cm\}} & 固定列宽,两端对齐 \\ 43 | \alert{m\{3cm\}} & \texttt{p} + 垂直居中对齐 \\ 44 | \alert{>\{\textbackslash{}bfseries\}} & 后一列单元格前加命令 \\ 45 | \alert{*\{3\}\{l\}} & 三个左对齐列 \\ 46 | \end{tabular} 47 | \end{center} 48 | } 49 | 50 | \only<3>{ 51 | \pkg{booktabs} 宏包提供了标准三线表格所需要的行分割线:\cmd{toprule},\cmd{midrule},\cmd{bottomrule}。也可以使用 \cmd{cmidrule\{1-2\}} 来部分地绘制行分割线。一般不推荐在专业表格中使用纵向分割线。 52 | } 53 | 54 | \only<4>{ 55 | 每行内容使用 \textbackslash\textbackslash{} 分隔开,每行中的单元格使用 \& 分隔开。 56 | } 57 | 58 | \end{column} 59 | \end{columns} 60 | \end{frame} 61 | 62 | \begin{frame}[fragile]% 63 | \begin{columns} 64 | \begin{column}{0.6\textwidth} 65 | \begin{codeblock}[]{表头居中} 66 | \documentclass{ctexart} 67 | \usepackage{array,booktabs} 68 | \begin{document} 69 | \begin{table}[ht] 70 | \centering 71 | \caption{|\phantom{}|北京冬奥会吉祥物} 72 | \begin{tabular}{lp{3cm}} 73 | \toprule 74 | |\highlightline|\multicolumn{1}{c}{|\phantom{}|吉祥物} & 75 | |\highlightline|\multicolumn{1}{c}{|\phantom{}|描述} \\ 76 | \midrule 77 | |\phantom{}|冰墩墩 & 2022 年北京冬季奥运会吉祥物 \\ 78 | |\phantom{}|雪容融 & 2022 年北京冬季残奥会吉祥物 \\ 79 | \bottomrule 80 | \end{tabular} 81 | \end{table} 82 | \end{document} 83 | \end{codeblock} 84 | \end{column} 85 | \begin{column}{0.4\textwidth} 86 | \cmd{multicolumn} 命令不仅可以用于合并同行的单元格,还可以用于临时地屏蔽表格导言对该列的对齐方式定义。这里用于居中表头。 87 | \begin{center} 88 | \parbox{0.85\linewidth}{ 89 | \cmd{multicolumn\{格数\}\{对齐方式\}\{内容\}} 90 | } 91 | \end{center} 92 | 跨页表格考虑使用 \pkg{longtable} 宏包。带标注的表格可以考虑使用 \pkg{threeparttable} 宏包。考虑使用在线工具生成表格代码 \link{https://www.tablesgenerator.com/latex_tables}。 93 | \note{复杂的使用方法在 \SJTUThesis{} 示例文档中都有提及。} 94 | \end{column} 95 | \end{columns} 96 | \end{frame} 97 | -------------------------------------------------------------------------------- /support/contents/learnlatex/minimal.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{基本要素} 4 | 5 | \begin{frame}[fragile]% 6 | \frametitle{最小示例} 7 | \begin{columns}[c] 8 | \begin{column}{0.4\textwidth} 9 | \only<1>{ 10 | \includepdflarge{support/examples/enminimal.pdf} 11 | } 12 | 13 | \only<2>{ 14 | \begin{center}\highlight[structure]{文档类}\end{center} 15 | \cmd{documentclass} 命令加载了\textbf{文档类}。\cls{article} 是由 \LaTeX{} 提供的用于排版短文档的基本文档类。 16 | \begin{description} 17 | \footnotesize 18 | \item[\cls{article}] 不包含章的短文档 19 | \item[\cls{report}] 含有章的单面印刷文档 20 | \item[\cls{book}] 含有章的双面印刷文档 21 | \item[\cls{beamer}] 幻灯片 22 | \end{description} 23 | } 24 | 25 | \only<3>{ 26 | \begin{center}\highlight[structure]{\texttt{document} 环境}\end{center} 27 | \cmd{begin} 和 \cmd{end} 用于创建\textbf{环境},可以多次、嵌套使用。环境用来指定一组文档元素的局部格式\footnotemark。\env{document} 环境是文档中必须有的环境,用于指示文档主体的范围。 28 | } 29 | \end{column} 30 | \begin{column}{0.6\textwidth} 31 | \begin{codeblock}[]{排版英文最小示例} 32 | |\highlightline<2>|\documentclass{article} 33 | |\highlightline<3>|\begin{document} 34 | Together for a Shared Future 35 | |\highlightline<3>|\end{document} 36 | \end{codeblock} 37 | \end{column} 38 | \end{columns} 39 | 40 | \only<3>{\footnotetext{环境实际上是一个组,只不过通过语义化的形式预装了对应的格式命令。普通的组可以直接使用一对大括号之间的内容 \{$\cdots$\} 表示。}} 41 | \end{frame} 42 | 43 | \begin{frame}[fragile]% 44 | \frametitle{中文最小示例} 45 | \begin{columns}[c] 46 | \begin{column}{0.4\textwidth} 47 | 48 | \only<1>{ 49 | \begin{center}\highlight[structure]{导言区}\end{center} 50 | \cmd{usepackage} 用于引入宏包,从而使用扩展功能,需要在\textbf{导言区}调用。这里使用 \pkg{ctex} 宏集以获得中文支持。 51 | } 52 | 53 | \end{column} 54 | \begin{column}{0.6\textwidth} 55 | \begin{codeblock}[]{排版中文最小示例} 56 | \documentclass{article} 57 | |\highlightline<1>\textbackslash{}usepackage\{ctex\}\hfill\color{structure}\% 导言区| 58 | \begin{document} 59 | 一起向未来 60 | 61 | Together for a Shared Future 62 | \end{document} 63 | \end{codeblock} 64 | \end{column} 65 | \end{columns} 66 | \end{frame} 67 | 68 | \begin{frame}[fragile]% 69 | \frametitle{中文最小示例(更好版本)} 70 | \begin{columns}[c] 71 | \begin{column}{0.4\textwidth} 72 | 73 | \only<1>{ 74 | \CTeX{} 建议对于之前提到的常规文档类,使用该宏集提供的四种中文文档类,以对特定类型提供额外的中文排版适配。 75 | \begin{center} 76 | \footnotesize 77 | \begin{tabular}{cc} 78 | \cls{ctexart} & \cls{ctexrep} \\ 79 | \cls{ctexbook} & \cls{ctexbeamer} \\ 80 | \end{tabular} 81 | \end{center} 82 | } 83 | 84 | \only<2>{ 85 | \includepdflarge{support/examples/cnminimal.pdf} 86 | } 87 | 88 | \only<3>{ 89 | \LaTeX{} 中通过空行来开启新的段落。一般情况下,\alert{不建议}在一段中强制断行(使用 \textbackslash{}\textbackslash{})。 90 | } 91 | 92 | \end{column} 93 | \begin{column}{0.6\textwidth} 94 | \begin{codeblock}[]{排版中文最小示例(更好版本)} 95 | |\highlightline<1>|\documentclass{ctexart} 96 | \begin{document} 97 | |\highlightline<3>| 一起向未来 98 | |\highlightline<3>| 99 | |\highlightline<3>| Together for a Shared Future 100 | \end{document} 101 | \end{codeblock} 102 | \end{column} 103 | \end{columns} 104 | \end{frame} 105 | -------------------------------------------------------------------------------- /support/contents/learnlatex/math.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{数学公式} 4 | 5 | \begin{frame} 6 | \frametitle{数学模式} 7 | \begin{alertblock}{} 8 | 输入数学公式是 \LaTeX{} 的绝对强项,很多常见的公式服务依赖于一些轻量级渲染引擎比如 MathJax、K\kern-.3ex\raise.4ex\hbox{\footnotesize A}\kern-.3ex\TeX{}。但是它们实际上使用的是 \LaTeX{} 语法变种,也就是说并没有使用 \LaTeX{} 后端。所以不要期望有完全一致的输出。 9 | \end{alertblock} 10 | 11 | 为了更好的获得数学公式输入支持,请使用 \hologo{AmS}math 宏包。数学模式分为两种: 12 | \begin{description} 13 | \item[行内模式] 一般通过一对美元符号(\$$\cdots$\$)标记,可以使用编辑器内建的符号表输入数学符号,也可以使用在线工具手写识别 \link{https://detexify.kirelabs.org/classify.html} \link{https://mathpix.com/equation-to-latex}。 14 | \item[行间模式] 一般通过 \env{equation} 环境\footnote{这是有编号环境,其加星号的变种 \env{equation*} 用于生成无编号环境。}输入。如果需要使用多行公式,请使用 \env{align} 环境,并按照类似表格输入的方式,使用 \& 对齐符号,\textbackslash\textbackslash{} 换行。如果不想手动居中,可以考虑多行自动居中的 \env{gather} 和单个大型公式首尾两端对齐 \env{multline}。 15 | \end{description} 16 | \note{关于表格和数学公式,如果不太熟悉如何输入,或者符号表记不住,推荐从比较容易上手的编辑器起步,比如 \TeX{}studio 提供了用户友好的界面(\faWindows{} 上的向导 $\rightarrow$ 数学助手)。我相信输入半年后,就可以对这些符号的输入很熟练了。 17 | 18 | 你会发现我的这套教程没有讲很多的数学公式输入技巧,因为这些东西只有你自己熟练了才能体会。而且 \LaTeX{} 本来就不是完全关于数学公式的。} 19 | \end{frame} 20 | 21 | \begin{frame} 22 | \frametitle{一些例子} 23 | \begin{columns} 24 | \begin{column}{0.33\textwidth} 25 | \begin{exampleblock}{} 26 | $PV=nRT$ 27 | \end{exampleblock} 28 | \begin{exampleblock}{} 29 | $\sum_{i=1}^ki^2=\frac{n(n+1)(2n+1)}{6}$ 30 | \end{exampleblock} 31 | \begin{exampleblock}{} 32 | $T(n) = aT\left(\left\lceil\frac{n}{b}\right\rceil\right) + \mathcal{O}(n^d)$ 33 | \end{exampleblock} 34 | \begin{exampleblock}{} 35 | $\frac{x_{1}+x_{2}+x_{3}}{3}\geq \sqrt[3]{x_{1}x_{2}x_{3}}$ 36 | \end{exampleblock} 37 | \begin{exampleblock}{} 38 | $n=(\underbrace{1\cdots 1}_{k\text{ of 1's}})_2=2^{k+1}-1$ 39 | \end{exampleblock} 40 | \begin{exampleblock}{} 41 | $\nabla f (P)= \left.\left(\frac{\partial f}{\partial x},\frac{\partial f}{\partial y},\frac{\partial f}{\partial z}\right)\right|_{P}$ 42 | \end{exampleblock} 43 | \end{column} 44 | \begin{column}{0.67\textwidth} 45 | \begin{exampleblock}{} 46 | \begin{equation*} 47 | \int_{a}^b f(x)\,\mathrm{d}x=\lim_{|P|\rightarrow 0}\sum_{i=1}^n f(\xi_i)\Delta x_i 48 | \end{equation*} 49 | \note{在 SJTUThesis 中,你或许更希望使用 \cmd{increment} 而不是 \cmd{Delta} 来表示增量。} 50 | \end{exampleblock} 51 | \begin{exampleblock}{} 52 | \begin{equation} 53 | T(n) = \begin{cases} 54 | \mathcal{O}(n^d),&\textrm{if } d>\log_b a, \\ 55 | \mathcal{O}(n^d\log n), &\textrm{if } d=\log_b a,\\ 56 | \mathcal{O}(n^{\log_b a}), &\textrm{if } d<\log_b a. 57 | \end{cases} 58 | \end{equation} 59 | \end{exampleblock} 60 | \begin{exampleblock}{} 61 | \begin{align} 62 | Q^{T}A&=R \\ 63 | \begin{pmatrix} 64 | q_1^T \\ q_2^T \\ q_3^T 65 | \end{pmatrix} 66 | \begin{pmatrix} 67 | a_1 & a_2 & a_3 68 | \end{pmatrix} 69 | &=R 70 | \end{align} 71 | \end{exampleblock} 72 | \end{column} 73 | \end{columns} 74 | \note{关于如果 \LaTeX{} 报出了错误,比如说数学模式下不能有空行,想要学习如何修复这些错误, 75 | 可以详见 Learn\LaTeX{}.org 的相关章节 76 | \link{https://github.com/CTeX-org/learnlatex.github.io/blob/zh-Hans/zh-Hans/lesson-15.md}。} 77 | \end{frame} 78 | 79 | %更深入地讲解 mathtools, unicode-math, siunix 80 | -------------------------------------------------------------------------------- /support/contents/learnlatex/text-style.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{文字格式} 4 | 5 | \begin{frame}[fragile]% 6 | \frametitle{字体样式} 7 | \begin{columns} 8 | \begin{column}{0.4\textwidth} 9 | \only<1>{ 10 | \includepdflarge{support/examples/fontstyle.pdf} 11 | } 12 | 13 | \only<2>{ 14 | 可以使用显式样式设定命令对小段做加粗、斜体、等宽等等的处理。 15 | 16 | \begin{center} 17 | \footnotesize 18 | \begin{tabular}{rl} 19 | \cmd{textrm} & \textrm{衬线} \\ 20 | \cmd{textsf} & \textsf{无衬线} \\ 21 | \cmd{texttt} & \texttt{等宽} \\ 22 | \cmd{textbf} & \textbf{加粗} \\ 23 | \cmd{textit} & \kaishu 斜体 \\ 24 | \cmd{textsc} & \textsc{Small Caps} \\ 25 | \cmd{textsl} & \textsl{Slanted} \\ 26 | \end{tabular} 27 | \end{center} 28 | } 29 | 30 | \only<3>{ 31 | 也可以使用对应的更改当前组字体设置的命令,对于大段文字较为方便。 32 | 33 | \begin{center} 34 | \footnotesize 35 | \begin{tabular}{ll} 36 | \cmd{rmfamily} & \textrm{衬线} \\ 37 | \cmd{sffamily} & \textsf{无衬线} \\ 38 | \cmd{ttfamily} & \texttt{等宽} \\ 39 | \cmd{bfseries} & \textbf{加粗} \\ 40 | \cmd{itshape} & \kaishu 斜体 \\ 41 | \cmd{scshape} & \textsc{Small Caps} \\ 42 | \cmd{slshape} & \textsl{Slanted} \\ 43 | \end{tabular} 44 | \end{center} 45 | } 46 | 47 | \only<4>{ 48 | \LaTeX{} 建议采用语义化的逻辑标记来设置样式,以便对全文同类文字进行统一修改。比如使用 \cmd{emph} 强调文字,以及使用下面将要提到的目次命令(第 \ref{sectioning} 页)设置标题等。 49 | } 50 | 51 | \end{column} 52 | \begin{column}{0.6\textwidth} 53 | \begin{codeblock}[]{样式} 54 | \documentclass{ctexart} 55 | \begin{document} 56 | |\highlightline<2>| \textbf{一起向未来} 57 | 58 | |\highlightline<3>| {\sffamily 59 | |\highlightline<3>| 一段无衬线文字 60 | |\highlightline<3>| } 61 | 62 | |\highlightline<4>| \emph{Together for a Shared Future} 63 | \end{document} 64 | \end{codeblock} 65 | \end{column} 66 | \end{columns} 67 | \end{frame} 68 | 69 | \begin{frame}[fragile]% 70 | \frametitle{字体大小} 71 | \begin{columns} 72 | \begin{column}{0.4\textwidth} 73 | 74 | \only<1>{ 75 | \includepdflarge{support/examples/fontsize.pdf} 76 | } 77 | 78 | \only<2>{ 79 | 同样地,你也可以显式地设定字体大小,和 \cmd{rmfamily} 类似,这会修改当前组的字体设置\footnotemark。 80 | 81 | \begin{center} 82 | \footnotesize 83 | \begin{tabular}{rl} 84 | \cmd{tiny} & \tiny 极小 \\ 85 | \cmd{scriptsize} & \scriptsize 角标大小 \\ 86 | \cmd{footnotesize} & \footnotesize 脚注大小 \\ 87 | \cmd{small} & \small 小 \\ 88 | \cmd{normalsize} & \normalsize 正常大小 \\ 89 | \cmd{large} & \large 大 \\ 90 | \cmd{Large} & \Large 比大更大 \\ 91 | \cmd{LARGE} & ... \\ 92 | \cmd{huge} & \huge 巨大 \\ 93 | \cmd{Huge} & ... \\ 94 | \end{tabular} 95 | \end{center} 96 | } 97 | 98 | \end{column} 99 | \begin{column}{0.6\textwidth} 100 | \begin{codeblock}[]{大小} 101 | \documentclass{ctexart} 102 | \begin{document} 103 | |\highlightline<2>| {\huge 一起向未来\par} 104 | Together for a Shared Future 105 | \end{document} 106 | \end{codeblock} 107 | \end{column} 108 | \end{columns} 109 | 110 | \only<2>{\footnotetext{注意最后显式地使用 \cmd{par} 在改回大小前结束该段,否则会导致下一行的行间距异常!}} 111 | \end{frame} 112 | -------------------------------------------------------------------------------- /support/figures/circuitikz.tex: -------------------------------------------------------------------------------- 1 | \documentclass[tikz]{standalone} 2 | \usepackage{circuitikz} 3 | \usetikzlibrary{shapes,arrows} 4 | \begin{document} 5 | \begin{tikzpicture} 6 | \ctikzset{multipoles/dipchip/width=2, multipoles/flipflop/width=2} 7 | \tikzstyle{element} = [flipflop,text width=4.5em,text centered,font=\small\sffamily]; 8 | \tikzstyle{mux} = [rounded rectangle,draw,rotate=90,line width=0.75pt]; 9 | \tikzstyle{sigext} = [line width=0.75pt,draw,fill=white,text width=3em,text centered,circle]; 10 | \node [ALU] (exALU) at (3,-1.5) {{\rotatebox{90}{\small \ttfamily ALU}}}; 11 | %\node [element,] (PC) at (-9.5,-1.5) {PC}; 12 | \node [draw,minimum height=2.5cm,line width=0.75pt] (PC) at (-8,-1.5) {PC}; 13 | \node [element,flipflop def={t1=readAddress,t5=Instruction[31:0]},text height=4.5em] (Inst) at (-4.5,-1.5) {Instruction Memory}; 14 | \draw (PC.east) to[short,-*] (-7,-1.5) -| (Inst.pin 1); 15 | \draw (Inst.pin 5) to[short,-*] (-2.5,-1.5) node (v8) {} to[short,-*] (-2.5,3.5) node (v9) {}; 16 | 17 | %\node [dipchip, hide numbers, no topmark, external pins width=0,font=\small\sffamily] (Reg) at (2,-5.5) {Registers}; 18 | %\node [right] at (Reg.bpin 1) {readReg1}; 19 | %\node [right] at (Reg.bpin 2) {readReg2}; 20 | %\node [right] at (Reg.bpin 3) {writeReg}; 21 | %\node [right] at (Reg.bpin 4) {writeData}; 22 | 23 | \node [one bit adder,external pins width=0] (oALU) at (-5,5) {+}; 24 | \draw (-7,-1.5) node (v13) {} |- (oALU.lpin 1); 25 | \node [left, xshift=-1cm] (v4) at (oALU.lpin 2){4}; 26 | \draw (v4) -- (oALU.lpin 2); 27 | 28 | % \draw[fill=blue!20,draw=blue] (-7.5,7) -- (-5,7) node (v1) {} -- (-5,7.5) -- (-1,7.5) -- (-1,7) node (v2) {} -- (1.5,7) -- cycle; 29 | % \draw[draw=white,line width=1pt] (-5,7) edge (-1,7); 30 | \node[mux] (v5) at (5,5) {1 MUX 0}; 31 | \node[font=\ttfamily] (v3) at (5,3) {JR}; 32 | \draw (v3) edge (v5); 33 | \draw (exALU.rpin 1) |- (v5.north west); 34 | \node [mux] (v7) at (3,5) {1 MUX 0}; 35 | \draw (v5.south) -- ++(right:3mm) -- ++(0,1.5) --++ (-14.5,0) |- (PC.west); 36 | 37 | \node[font=\ttfamily] (v6) at (3,3) {JUMP}; 38 | \draw (v6) edge (v7); 39 | \draw (v7.south) -- ++(right:10mm) |- (v5.north east); 40 | \draw (oALU.rpin 1) --++(2.1,0) --++ (0,-1.5) --++(5,0) |- (v7.north west); 41 | 42 | \node at (-3,0.5) {26}; 43 | \node[rotate=90] at (-2.5,0.5) {$\slash$}; 44 | \node at (-3,4) {[31:28]}; 45 | \node[sigext] at (-2.5,1.5) {Shift left 2}; 46 | \node[rotate=90] at (-2.5,2.5) {$\slash$}; 47 | \node at (-3,2.5) {28}; 48 | 49 | \node[and port,rotate=90] (and) at (1,2) {}; 50 | \draw (exALU.tpin 1) -| (and.in 2); 51 | \node[font=\ttfamily] (v10) at (0.73,-1) {branch}; 52 | \draw (v10) edge (and.in 1); 53 | \node [mux] (v11) at (1,5) {1 MUX 0}; 54 | \draw (and.out) |- (v11.west); 55 | \draw (v11) --++(0.7,0) |- (v7.north east); 56 | \draw (oALU.rpin 1) --++ (right:10mm) --++(0,1.3) --++(4,0) |- (v11.north east); 57 | \node [sigext] (v12) at (-4.5,-4) {Sign Ext}; 58 | 59 | 60 | \node[one bit adder,external pins width=0] (oALUo) at (-0.5,5) {+}; 61 | \draw (oALUo.rpin 1) --++(right:5mm) |- (v11.north west); 62 | 63 | \draw (v12) --++(3,0) |- (oALUo.lpin 2); 64 | \node [sigext] at (-1.5,-2.5) {Shift left 2}; 65 | \draw (oALU.rpin 1) --++(right:10mm) |- (oALUo.lpin 1); 66 | \node[fill,circle,scale=0.4] at (-3.6,5) {}; 67 | \node[fill,circle,scale=0.4] at (-3.6,5.8) {}; 68 | \draw (-7,-1.5) |- (v12); 69 | \node at (-3,-4) {$\backslash$}; 70 | \node at (-6,-4) {$\backslash$}; 71 | \node at (-6,-4.5) {16}; 72 | \node at (-3,-4.5) {32}; 73 | \node[font=\ttfamily] at (3,0.5) {Zero}; 74 | 75 | \end{tikzpicture} 76 | \end{document} -------------------------------------------------------------------------------- /latex-talk.tex: -------------------------------------------------------------------------------- 1 | % !TeX encoding = UTF-8 2 | 3 | \documentclass[UTF8,space=auto,xcolor=table,dvipsnames,svgnames,aspectratio=169]{ctexbeamer} 4 | % Authors: 2023 Richard Chien 5 | % 2022 Log Creative 6 | % 2021 Alexara Wu 7 | 8 | %% Use SJTUBeamer theme. 9 | \usetheme[my,default,topright]{sjtubeamer} 10 | \usesjtutheme{sjtug} 11 | \setbeamertemplate{background}{} 12 | 13 | %% If you don't use sjtubeamer theme. 14 | %% Uncomment the following lines. 15 | %% And use XeLaTeX to compile as well. 16 | % \usetheme{nosjtubeamer} 17 | 18 | %% Currently, this option may break on XeLaTeX. 19 | %% Try using pdfLaTeX or LuaLaTeX to generate the main screen properly. 20 | %% Use pympress to show the notes on the second screen. 21 | % \setbeameroption{show notes on second screen} 22 | 23 | \usepackage{fontawesome5} 24 | \usepackage{hologo} 25 | \usepackage{hyperxmp} 26 | \usepackage{ulem} 27 | \usepackage{subcaption} 28 | \usepackage{booktabs} 29 | 30 | %% Overleaf and some distributions omit the Adobe icon ... 31 | %% If you need to display the Adobe logo, comment the following line. 32 | \def\faAdobe{} 33 | 34 | \newcommand{\SJTUTeX}{SJTU\TeX{}} 35 | \newcommand{\SJTUThesis}{\textsc{SJTUThesis}} 36 | \newcommand{\SJTUThesisVersion}{2.0.1} 37 | \newcommand{\SJTUThesisDate}{2023/03/31} 38 | \newcommand{\SJTUBeamer}{\textsc{SJTUBeamer}} 39 | \newcommand{\SJTUBeamerVersion}{3.0.0} 40 | \newcommand{\SJTUBeamerDate}{2022/11/25} 41 | 42 | \newcommand{\thesisissue}[1]{\href{https://github.com/sjtug/SJTUThesis/issues/#1}{\textsuperscript{\textcolor{.!90!DarkBlue}{\underline{\faCheckCircle{}#1}}}}} 43 | \newcommand{\thesisdiscuss}[1]{\href{https://github.com/sjtug/SJTUThesis/discussions/#1}{\textsuperscript{\textcolor{.!90!DarkBlue}{\underline{\faComments{}#1}}}}} 44 | \newcommand\link[1]{\href{#1}{\faLink}} 45 | \newcommand\pkg[1]{\texttt{#1}} 46 | 47 | \def\cmd#1{\texttt{\color{red}$\backslash$#1}} 48 | \def\env#1{\texttt{\color{red}#1}} 49 | \def\opt#1{\texttt{#1}} 50 | \def\cls#1{\texttt{#1}} 51 | \def\btn#1{{\setlength{\fboxsep}{2pt}\fbox{\vphantom{测g}#1}}} 52 | 53 | \lstset{ 54 | escapechar=| 55 | } 56 | 57 | \newcommand{\fzerobox}[1]{{\setlength{\fboxsep}{0pt}\framebox{#1}}} 58 | \newcommand{\includepdflarge}[1]{\fzerobox{\includegraphics[width=\linewidth,trim=4cm 17cm 3cm 2cm,clip]{#1}}\vspace{-10pt}} 59 | \newcommand{\includebeamerlarge}[2][1]{\fzerobox{\includegraphics[width=0.75\linewidth,page=#1]{#2}}} 60 | \newcommand{\includeinlinelogo}[1]{\raisebox{-0.5\dp\strutbox}{\includegraphics[height=\baselineskip]{#1}}} 61 | \newcommand{\includefontpreview}[1]{\fzerobox{\includegraphics[width=2cm,trim=3.75cm 24.75cm 12cm 3.4cm,clip]{#1}}} 62 | \newcommand{\includemathstylepreview}[1]{\fzerobox{\includegraphics[height=1cm,trim=4cm 24.5cm 10cm 3.4cm,clip]{#1}}} 63 | 64 | 65 | \title{\LaTeX{} 新语} 66 | \subtitle{上海交通大学图书馆专题培训讲座} 67 | \author{SJTUG} 68 | \institute[SJTU Linux User Group]{上海交通大学 Linux 用户组} 69 | \date{\the\year\,年\,\the\month\,月} 70 | \subject{LaTeX, SJTUThesis, SJTUBeamer} 71 | 72 | \hypersetup{ 73 | pdfsubject = {上海交通大学图书馆专题培训讲座}, 74 | pdfauthor = {SJTUG}, 75 | pdfcopyright = {Licensed under CC-BY-SA 4.0. Some rights reserved.}, 76 | pdflicenseurl = {http://creativecommons.org/licenses/by-sa/4.0/}, 77 | unicode = true, 78 | psdextra = true, 79 | pdfdisplaydoctitle = true 80 | } 81 | 82 | \includeonly{ 83 | support/contents/learnlatex, 84 | support/contents/sjtuthesis, 85 | support/contents/newversion, 86 | support/contents/template, 87 | support/contents/intermission, 88 | support/contents/sjtubeamer, 89 | support/contents/visualization, 90 | support/contents/boost 91 | } 92 | 93 | \begin{document} 94 | 95 | % \input{support/lec-2022-04-03} 96 | % \input{support/lec-2022-05-18} 97 | % \input{support/lec-2022-12-28} 98 | \input{support/lec-2023-04-01} 99 | 100 | \end{document} 101 | -------------------------------------------------------------------------------- /support/contents/learnlatex/reference.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{引用} 4 | 5 | \begin{frame}[fragile] 6 | \frametitle{交叉引用} 7 | \only<1>{ 8 | 正如之前所提到的,\LaTeX{} 中使用 \cmd{label} 标记,然后可以使用 \cmd{ref} 来引用这个标记。 \cmd{label} 可以放在使用计数器的对象之后。 9 | } 10 | 11 | \only<2>{ 12 | 为了使得对公式编号的引用带有括号,推荐使用 \hologo{AmS}math 宏包中的 \cmd{eqref} 命令。对于多行公式环境,每一个换行符前都可以添加一个 \cmd{label} 用于引用该行公式。 13 | } 14 | 15 | \begin{columns} 16 | \begin{column}{0.5\textwidth} 17 | \begin{codeblock}[]{图} 18 | \begin{figure} 19 | |\highlightline<1>| \caption{|\phantom{}|示例}\label{fig:example} 20 | \end{figure} 21 | |\highlightline<1>|如图 \ref{fig:example} 所示…… 22 | \end{codeblock} 23 | \begin{codeblock}[]{表} 24 | \begin{table} 25 | |\highlightline<1>| \caption{|\phantom{}|示例}\label{tab:example} 26 | \end{table} 27 | \end{codeblock} 28 | \end{column} 29 | \begin{column}{0.5\textwidth} 30 | \begin{codeblock}[]{目次} 31 | |\highlightline<1>|\section{|\phantom{}|示例}\label{sec:example} 32 | \end{codeblock} 33 | 34 | \begin{codeblock}[]{公式} 35 | \begin{equation} 36 | a = b + c 37 | |\highlightline<1>|\label{eq:example} 38 | \end{equation} 39 | |\highlightline<2>|如公式 \eqref{eq:example} 所示…… 40 | \end{codeblock} 41 | \end{column} 42 | \end{columns} 43 | \end{frame} 44 | 45 | \begin{frame}[fragile] 46 | \frametitle{文献引用} 47 | 可以通过文献数据库文件 \texttt{.bib} 自动生成参考文献,很多文献管理软件如 EndNote \link{https://lic.sjtu.edu.cn/Default/softshow/tag/MDAwMDAwMDAwMLGImKE}, Zotero \link{https://www.zotero.org/}, JabRef \link{https://www.jabref.org/} 以及谷歌学术等网站都可以直接导出这种格式用于在 \LaTeX{} 论文中引用。一般不需要手写数据库文件,只需注意每一个文献会在数据库中有一个主键,类似于 \cmd{label} 标记。引用文献使用 \cmd{cite} 命令。 48 | 49 | \begin{codeblock}[]{ref.bib} 50 | |\highlightline|@article{devoftech,|\hfill\alert{\% 类型为期刊论文,主键为\texttt{devoftech}}| 51 | title={|\phantom{}|新时期我国信息技术产业的发展}, 52 | author={|\phantom{}|江泽民}, 53 | year={2008} 54 | } 55 | \end{codeblock} 56 | \end{frame} 57 | 58 | \begin{frame} 59 | \frametitle{文献引用} 60 | 而让 \LaTeX{} 处理 \texttt{.bib} 数据库文件与引用有两种工作流。你可能需要查清楚如何在编辑器中设置对应的工作流,或者采用后面所提到的高级编译方式 \texttt{latexmk}。 61 | \begin{columns} 62 | \begin{column}{0.5\textwidth} 63 | \begin{block}{\hologo{BibTeX} + \pkg{natbib}} 64 | 一般期刊提交使用这种方法,\pkg{natbib} 宏包将提供命令 \cmd{citet}(文本引用) 和 \cmd{citep}(括号引用)。 65 | \end{block} 66 | \begin{alertblock}{\hologo{BibTeX} + \pkg{gbt7714}} 67 | 中文引用可以直接使用 \pkg{gbt7714} 宏包,但是角模式和正文模式不能混用。 68 | \end{alertblock} 69 | \end{column} 70 | \begin{column}{0.5\textwidth} 71 | \begin{block}{\hologo{biber} + \pkg{biblatex}} 72 | 这是更容易自定义的方法,与 \hologo{BibTeX} 的运作方式稍有不同。\pkg{biblatex} 提供了更加智能的引用命令。 73 | \end{block} 74 | \begin{alertblock}{\hologo{biber} + \pkg{biblatex-gb7714-2015}} 75 | 而中文引用可以使用 \pkg{biblatex} 宏包的样式 \pkg{gb7714-2015}。 76 | \end{alertblock} 77 | \end{column} 78 | \end{columns} 79 | \end{frame} 80 | 81 | \begin{frame}[fragile] 82 | \frametitle{文献引用} 83 | \begin{columns} 84 | \begin{column}{0.5\textwidth} 85 | \begin{codeblock}[]{\hologo{BibTeX} + \pkg{gbt7714}} 86 | \documentclass{ctexart} 87 | \usepackage{gbt7714} 88 | \bibliographystyle{gbt7714-numerial} 89 | % \citestyle{numbers} % 正文模式 90 | \begin{document} 91 | |\phantom{}|他指出了...\cite{devoftech} 92 | \bibliography{ref} 93 | \end{document} 94 | \end{codeblock} 95 | \end{column} 96 | \begin{column}{0.5\textwidth} 97 | \begin{codeblock}[]{\hologo{biber} + \pkg{biblatex-gb7714-2015}} 98 | \documentclass{ctexart} 99 | \usepackage[backend=biber,style=gb7714-2015]{biblatex} 100 | \addbibresource{ref.bib} 101 | \begin{document} 102 | |\phantom{}|他在文献 \parencite{devoftech} 103 | |\phantom{}|指出了...\cite{devoftech} 104 | \printbibliography 105 | \end{document} 106 | \end{codeblock} 107 | \end{column} 108 | \end{columns} 109 | \end{frame} 110 | 111 | \begin{frame} 112 | \frametitle{文献引用} 113 | \begin{columns} 114 | \begin{column}{0.5\textwidth} 115 | \includepdflarge{support/examples/bibtex.pdf} 116 | \end{column} 117 | \begin{column}{0.5\textwidth} 118 | \includepdflarge{support/examples/biblatex.pdf} 119 | \end{column} 120 | \end{columns} 121 | \note{这页有一篇上过《新闻联播》的论文。} 122 | \end{frame} 123 | -------------------------------------------------------------------------------- /support/pgfplots/c.csv: -------------------------------------------------------------------------------- 1 | 2.5,1.8 2 | 2.6,1.6 3 | 2.7,2.8 4 | 2.8,2.8 5 | 2.9,1.8 6 | 3,3.4 7 | 3.1,4 8 | 3.2,1.6 9 | 3.3,3.4 10 | 3.4,2.8 11 | 3.5,3.2 12 | 3.6,3.4 13 | 3.7,3.6 14 | 3.8,4.2 15 | 3.9,6.8 16 | 4,22.2 17 | 4.1,70.4 18 | 4.2,127 19 | 4.3,183.6 20 | 4.4,221.2 21 | 4.5,260 22 | 4.6,286.2 23 | 4.7,302.6 24 | 4.8,312.6 25 | 4.9,319.6 26 | 5,339.4 27 | 5.1,347.4 28 | 5.2,353.2 29 | 5.3,344.8 30 | 5.4,365.4 31 | 5.5,359.6 32 | 5.6,344.6 33 | 5.7,366.8 34 | 5.8,341.6 35 | 5.9,353.6 36 | 6,342.8 37 | 6.1,335.6 38 | 6.2,404.8 39 | 6.3,627.2 40 | 6.4,714.4 41 | 6.5,586.8 42 | 6.6,390 43 | 6.7,324 44 | 6.8,312.8 45 | 6.9,312.4 46 | 7,428 47 | 7.1,1138.4 48 | 7.2,1512.4 49 | 7.3,1205.4 50 | 7.4,492 51 | 7.5,245.4 52 | 7.6,236.6 53 | 7.7,222 54 | 7.8,216 55 | 7.9,204.2 56 | 8,190.8 57 | 8.1,185.6 58 | 8.2,176.4 59 | 8.3,171.8 60 | 8.4,173.6 61 | 8.5,156.6 62 | 8.6,155.4 63 | 8.7,143.2 64 | 8.8,145.8 65 | 8.9,131.6 66 | 9,139.4 67 | 9.1,133.8 68 | 9.2,125.4 69 | 9.3,109.2 70 | 9.4,108.4 71 | 9.5,105.6 72 | 9.6,96.8 73 | 9.7,81.6 74 | 9.8,94 75 | 9.9,80.2 76 | 10,81.6 77 | 10.1,85.4 78 | 10.2,80.2 79 | 10.3,78.8 80 | 10.4,75.6 81 | 10.5,80 82 | 10.6,77.6 83 | 10.7,74 84 | 10.8,65.2 85 | 10.9,61.8 86 | 11,64.8 87 | 11.1,65.6 88 | 11.2,69.4 89 | 11.3,62.8 90 | 11.4,57.6 91 | 11.5,56.8 92 | 11.6,50.8 93 | 11.7,51.6 94 | 11.8,51.4 95 | 11.9,48 96 | 12,53 97 | 12.1,55.6 98 | 12.2,50.8 99 | 12.3,50.6 100 | 12.4,50 101 | 12.5,64 102 | 12.6,62.2 103 | 12.7,85.2 104 | 12.8,131.2 105 | 12.9,148.6 106 | 13,103.8 107 | 13.1,60.4 108 | 13.2,56.4 109 | 13.3,51.8 110 | 13.4,53.8 111 | 13.5,44.6 112 | 13.6,54.6 113 | 13.7,50.4 114 | 13.8,51.6 115 | 13.9,52.8 116 | 14,43.4 117 | 14.1,50.4 118 | 14.2,51.2 119 | 14.3,80.4 120 | 14.4,251.8 121 | 14.5,405.2 122 | 14.6,346 123 | 14.7,140 124 | 14.8,59.2 125 | 14.9,44.4 126 | 15,44.8 127 | 15.1,37 128 | 15.2,44.2 129 | 15.3,41.4 130 | 15.4,36.6 131 | 15.5,42.4 132 | 15.6,43.2 133 | 15.7,38.2 134 | 15.8,39.6 135 | 15.9,34 136 | 16,35.8 137 | 16.1,38 138 | 16.2,32.6 139 | 16.3,32 140 | 16.4,31.2 141 | 16.5,32.8 142 | 16.6,35.2 143 | 16.7,30.6 144 | 16.8,29.4 145 | 16.9,32.8 146 | 17,30.4 147 | 17.1,29.8 148 | 17.2,32.6 149 | 17.3,31.2 150 | 17.4,30.4 151 | 17.5,27.8 152 | 17.6,24.8 153 | 17.7,30.8 154 | 17.8,26.2 155 | 17.9,22 156 | 18,19.6 157 | 18.1,23.2 158 | 18.2,28.2 159 | 18.3,23.8 160 | 18.4,24.6 161 | 18.5,25.2 162 | 18.6,21.8 163 | 18.7,26 164 | 18.8,26 165 | 18.9,18.4 166 | 19,20.8 167 | 19.1,21.4 168 | 19.2,24.4 169 | 19.3,26.4 170 | 19.4,26.4 171 | 19.5,42.6 172 | 19.6,39.4 173 | 19.7,28.2 174 | 19.8,17.4 175 | 19.9,18.6 176 | 20,17.6 177 | 20.1,17.4 178 | 20.2,16 179 | 20.3,14.8 180 | 20.4,17.2 181 | 20.5,15 182 | 20.6,16.4 183 | 20.7,15.4 184 | 20.8,16.4 185 | 20.9,14 186 | 21,17.4 187 | 21.1,14.6 188 | 21.2,14.8 189 | 21.3,13.6 190 | 21.4,14.4 191 | 21.5,13 192 | 21.6,12.4 193 | 21.7,14.6 194 | 21.8,15 195 | 21.9,22.6 196 | 22,65 197 | 22.1,93.6 198 | 22.2,73.6 199 | 22.3,34.8 200 | 22.4,20.6 201 | 22.5,16.4 202 | 22.6,13.6 203 | 22.7,9 204 | 22.8,10.8 205 | 22.9,12.2 206 | 23,8.6 207 | 23.1,12.4 208 | 23.2,11.2 209 | 23.3,13 210 | 23.4,13 211 | 23.5,14.4 212 | 23.6,12.4 213 | 23.7,10.6 214 | 23.8,8.8 215 | 23.9,8.8 216 | 24,9 217 | 24.1,11.4 218 | 24.2,9.2 219 | 24.3,9.8 220 | 24.4,9.6 221 | 24.5,12.2 222 | 24.6,8.4 223 | 24.7,10 224 | 24.8,10.6 225 | 24.9,12.2 226 | 25,8.6 227 | 25.1,6.8 228 | 25.2,9.8 229 | 25.3,9 230 | 25.4,8.6 231 | 25.5,7 232 | 25.6,6.8 233 | 25.7,7.6 234 | 25.8,6.2 235 | 25.9,7.4 236 | 26,10.4 237 | 26.1,8.6 238 | 26.2,7 239 | 26.3,8 240 | 26.4,9.8 241 | 26.5,12.6 242 | 26.6,12 243 | 26.7,9 244 | 26.8,7.8 245 | 26.9,6.2 246 | 27,8.8 247 | 27.1,6.4 248 | 27.2,6.4 249 | 27.3,6.6 250 | 27.4,6.8 251 | 27.5,5.8 252 | 27.6,5.4 253 | 27.7,5.8 254 | 27.8,6 255 | 27.9,10 256 | 28,8.4 257 | 28.1,5.8 258 | 28.2,6 259 | 28.3,5 260 | 28.4,7.6 261 | 28.5,6.8 262 | 28.6,5.2 263 | 28.7,6 264 | 28.8,6.2 265 | 28.9,5.4 266 | 29,5 267 | 29.1,4.6 268 | 29.2,4.4 269 | 29.3,4.2 270 | 29.4,7.4 271 | 29.5,5.2 272 | 29.6,7.2 273 | 29.7,4.4 274 | 29.8,7.8 275 | 29.9,7.2 276 | 30,14.6 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pdf 2 | *.latexmain 3 | 4 | !support/**/*.pdf 5 | 6 | *~ 7 | *.swp 8 | *.swo 9 | 10 | .vscode/ 11 | 12 | 13 | ## Core latex/pdflatex auxiliary files: 14 | *.aux 15 | *.lof 16 | *.log 17 | *.lot 18 | *.fls 19 | *.out 20 | *.toc 21 | *.fmt 22 | *.fot 23 | *.cb 24 | *.cb2 25 | .*.lb 26 | 27 | ## Intermediate documents: 28 | *.dvi 29 | *.xdv 30 | *-converted-to.* 31 | # these rules might exclude image files for figures etc. 32 | # *.ps 33 | # *.eps 34 | # *.pdf 35 | 36 | ## Generated if empty string is given at "Please type another file name for output:" 37 | .pdf 38 | 39 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 40 | *.bbl 41 | *.bcf 42 | *.blg 43 | *-blx.aux 44 | *-blx.bib 45 | *.run.xml 46 | 47 | ## Build tool auxiliary files: 48 | *.fdb_latexmk 49 | *.synctex 50 | *.synctex(busy) 51 | *.synctex.gz 52 | *.synctex.gz(busy) 53 | *.pdfsync 54 | 55 | ## Build tool directories for auxiliary files 56 | # latexrun 57 | latex.out/ 58 | 59 | ## Auxiliary and intermediate files from other packages: 60 | # algorithms 61 | *.alg 62 | *.loa 63 | 64 | # achemso 65 | acs-*.bib 66 | 67 | # amsthm 68 | *.thm 69 | 70 | # beamer 71 | *.nav 72 | *.pre 73 | *.snm 74 | *.vrb 75 | 76 | # changes 77 | *.soc 78 | 79 | # comment 80 | *.cut 81 | 82 | # cprotect 83 | *.cpt 84 | 85 | # elsarticle (documentclass of Elsevier journals) 86 | *.spl 87 | 88 | # endnotes 89 | *.ent 90 | 91 | # fixme 92 | *.lox 93 | 94 | # feynmf/feynmp 95 | *.mf 96 | *.mp 97 | *.t[1-9] 98 | *.t[1-9][0-9] 99 | *.tfm 100 | 101 | #(r)(e)ledmac/(r)(e)ledpar 102 | *.end 103 | *.?end 104 | *.[1-9] 105 | *.[1-9][0-9] 106 | *.[1-9][0-9][0-9] 107 | *.[1-9]R 108 | *.[1-9][0-9]R 109 | *.[1-9][0-9][0-9]R 110 | *.eledsec[1-9] 111 | *.eledsec[1-9]R 112 | *.eledsec[1-9][0-9] 113 | *.eledsec[1-9][0-9]R 114 | *.eledsec[1-9][0-9][0-9] 115 | *.eledsec[1-9][0-9][0-9]R 116 | 117 | # glossaries 118 | *.acn 119 | *.acr 120 | *.glg 121 | *.glo 122 | *.gls 123 | *.glsdefs 124 | *.lzo 125 | *.lzs 126 | 127 | # uncomment this for glossaries-extra (will ignore makeindex's style files!) 128 | # *.ist 129 | 130 | # gnuplottex 131 | *-gnuplottex-* 132 | 133 | # gregoriotex 134 | *.gaux 135 | *.gtex 136 | 137 | # htlatex 138 | *.4ct 139 | *.4tc 140 | *.idv 141 | *.lg 142 | *.trc 143 | *.xref 144 | 145 | # hyperref 146 | *.brf 147 | 148 | # knitr 149 | *-concordance.tex 150 | # TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files 151 | # *.tikz 152 | *-tikzDictionary 153 | 154 | # listings 155 | *.lol 156 | 157 | # luatexja-ruby 158 | *.ltjruby 159 | 160 | # makeidx 161 | *.idx 162 | *.ilg 163 | *.ind 164 | 165 | # minitoc 166 | *.maf 167 | *.mlf 168 | *.mlt 169 | *.mtc[0-9]* 170 | *.slf[0-9]* 171 | *.slt[0-9]* 172 | *.stc[0-9]* 173 | 174 | # minted 175 | _minted* 176 | *.pyg 177 | 178 | # morewrites 179 | *.mw 180 | 181 | # nomencl 182 | *.nlg 183 | *.nlo 184 | *.nls 185 | 186 | # pax 187 | *.pax 188 | 189 | # pdfpcnotes 190 | *.pdfpc 191 | 192 | # sagetex 193 | *.sagetex.sage 194 | *.sagetex.py 195 | *.sagetex.scmd 196 | 197 | # scrwfile 198 | *.wrt 199 | 200 | # sympy 201 | *.sout 202 | *.sympy 203 | sympy-plots-for-*.tex/ 204 | 205 | # pdfcomment 206 | *.upa 207 | *.upb 208 | 209 | # pythontex 210 | *.pytxcode 211 | pythontex-files-*/ 212 | 213 | # tcolorbox 214 | *.listing 215 | 216 | # thmtools 217 | *.loe 218 | 219 | # TikZ & PGF 220 | *.dpth 221 | *.md5 222 | *.auxlock 223 | 224 | # todonotes 225 | *.tdo 226 | 227 | # vhistory 228 | *.hst 229 | *.ver 230 | 231 | # easy-todo 232 | *.lod 233 | 234 | # xcolor 235 | *.xcp 236 | 237 | # xmpincl 238 | *.xmpi 239 | 240 | # xindy 241 | *.xdy 242 | 243 | # xypic precompiled matrices and outlines 244 | *.xyc 245 | *.xyd 246 | 247 | # endfloat 248 | *.ttt 249 | *.fff 250 | 251 | # Latexian 252 | TSWLatexianTemp* 253 | 254 | ## Editors: 255 | # WinEdt 256 | *.bak 257 | *.sav 258 | 259 | # Texpad 260 | .texpadtmp 261 | 262 | # LyX 263 | *.lyx~ 264 | 265 | # Kile 266 | *.backup 267 | 268 | # gummi 269 | .*.swp 270 | 271 | # KBibTeX 272 | *~[0-9]* 273 | 274 | # TeXnicCenter 275 | *.tps 276 | 277 | # auto folder when using emacs and auctex 278 | ./auto/* 279 | *.el 280 | 281 | # expex forward references with \gathertags 282 | *-tags.tex 283 | 284 | # standalone packages 285 | *.sta 286 | 287 | # Makeindex log files 288 | *.lpz 289 | 290 | # REVTeX puts footnotes in the bibliography by default, unless the nofootinbib 291 | # option is specified. Footnotes are the stored in a file with suffix Notes.bib. 292 | # Uncomment the next line to have this generated file ignored. 293 | #*Notes.bib 294 | 295 | 296 | # build directory 297 | build/ 298 | 299 | # SJTUBeamer distribution 300 | SJTUBeamer/ 301 | 302 | # SJTUBeamer files 303 | *.sty 304 | contrib/ 305 | vi/ 306 | 307 | # SJTUThesis distribution 308 | SJTUThesis/ 309 | 310 | # SJTUTeX distribution 311 | SJTUTeX/ 312 | 313 | # Release package 314 | *.zip 315 | 316 | .DS_Store -------------------------------------------------------------------------------- /support/contents/learnlatex/figure.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{图} 4 | 5 | \begin{frame}[fragile]% 6 | \frametitle{插图} 7 | \begin{columns} 8 | \begin{column}{0.6\textwidth} 9 | \begin{codeblock}[]{插入单图\only<4->{最佳实践}} 10 | \documentclass{ctexart} 11 | |\highlightline<1,2>|\usepackage{graphicx} 12 | |\highlightline<1,2>|\graphicspath{{figs/}{pics/}} 13 | \begin{document} 14 | |\highlightline<1,5>|\begin{figure}[ht] 15 | |\highlightline<1,6>| \centering 16 | |\highlightline<1,3,4>| \includegraphics[width=|\only<1-3>{4cm}\only<4->{0.4\textbackslash{}textwidth}|]{sjtug} 17 | |\highlightline<1,7>| \caption{SJTUG 徽标}\label{fig:sjtug} 18 | |\highlightline<1,5>|\end{figure} 19 | \end{document} 20 | \end{codeblock} 21 | \end{column} 22 | \begin{column}{0.4\textwidth} 23 | 24 | \only<1>{ 25 | \includepdflarge{support/examples/insertimage.pdf} 26 | } 27 | 28 | \only<2>{ 29 | 要插入图片,需使用 \pkg{graphicx} 宏包。之后在文档主体便可以使用 \cmd{includegraphics} 插入图片。在导言区可通过 \cmd{graphicspath} 指定图片文件夹\footnotemark。 30 | } 31 | 32 | \only<3>{ 33 | \cmd{includegraphics} 命令以相对路径插入图片,后缀名可以省略。可以使用可选参数指定插入的图片尺寸。 34 | \note{比如我未来想变更为幻灯片的时候。} 35 | } 36 | 37 | \only<4>{ 38 | 最佳实践是使用 \cmd{textwidth} 或 \cmd{linewidth} 的相对值指定尺寸大小,以在未来可能的布局更改中保留一定的灵活性。除了 \opt{width} 还有其他属性: 39 | \note{事实上,\LaTeX{} 很多命令都是使用方括号添加可选参数的。} 40 | \begin{center} 41 | \footnotesize 42 | \begin{tabular}{rl} 43 | \opt{width} & 宽度 \\ 44 | \opt{height} & 高度 \\ 45 | \opt{scale} & 缩放 \\ 46 | \opt{angle} & 角度 \\ 47 | \end{tabular} 48 | \end{center} 49 | } 50 | 51 | \only<5>{ 52 | \env{figure} 为一个\textbf{浮动体}环境(\env{table} 也是),可以将其移动到其他位置上以使排版更紧凑。可以添加可选参数以指定如何放置浮动体,最多可以使用四种位置描述符: 53 | \begin{center} 54 | \footnotesize 55 | \begin{tabular}{cll} 56 | \opt{h} & Here & 尽可能在这里 \\ 57 | \opt{t} & Top & 页面顶部 \\ 58 | \opt{b} & Bottom & 页面底部 \\ 59 | \opt{p} & Page & 浮动体专页 \\ 60 | \end{tabular} 61 | \end{center} 62 | 还可以只使用 \pkg{float} 宏包提供的 \opt{H} 描述符以强制置于此处。 63 | } 64 | 65 | \only<6>{ 66 | 使用 \cmd{centering} 命令可将图片水平居中。 67 | } 68 | 69 | \only<7>{ 70 | 使用 \cmd{caption} 命令输入题注,如果这个命令写在插入图片前面,题注将会在上方(中文中一般对 \env{table} 环境这么做)。\cmd{label} 为图片添加标记名称,可在随后进行交叉引用。 71 | } 72 | 73 | \end{column} 74 | \end{columns} 75 | \only<2>{\footnotetext{其命令参数每个为一个以 \texttt{/} 结尾的文件夹,每个文件夹需要使用大括号包裹起来。}} 76 | \end{frame} 77 | 78 | \begin{frame}[fragile] 79 | \begin{columns} 80 | \begin{column}{0.6\textwidth} 81 | \begin{codeblock}[]{插入双图} 82 | \documentclass{ctexart} 83 | \usepackage{graphicx} 84 | \graphicspath{{figs/}{pics/}} 85 | \begin{document} 86 | |\highlightline<1>|\begin{figure}[ht] 87 | |\highlightline<1,2>| \begin{minipage}{0.48\textwidth} 88 | |\highlightline<1>| \centering 89 | |\highlightline<1>| \includegraphics[height=2cm]{sjtug} 90 | |\highlightline<1,3>| \caption{SJTUG 徽标}\label{fig:sjtug} 91 | |\highlightline<1,2>| \end{minipage}\hfill 92 | |\highlightline<1,2>| \begin{minipage}{0.48\textwidth} 93 | |\highlightline<1>| \centering 94 | |\highlightline<1>| \includegraphics[height=2cm]{sjtugt} 95 | |\highlightline<1,3>| \caption{SJTUG 文字}\label{fig:sjtugt} 96 | |\highlightline<1,2>| \end{minipage} 97 | |\highlightline<1>|\end{figure} 98 | \end{document} 99 | \end{codeblock} 100 | \end{column} 101 | \begin{column}{0.4\textwidth} 102 | 103 | \only<1>{ 104 | \includepdflarge{support/examples/doubleimages.pdf} 105 | } 106 | 107 | \only<2>{ 108 | 在 \env{figure} 环境里使用 \env{minipage} 小页制作列盒子,以并排两图并分别编号,需要设定强制参数以指定列宽。两个小页之间添加 \cmd{hfill} 使两个小页两端对齐。 109 | } 110 | 111 | \only<3>{ 112 | 在每个小页内部分别使用 \cmd{caption} 添加标签。 113 | } 114 | \end{column} 115 | \end{columns} 116 | \end{frame} 117 | 118 | \begin{frame}[fragile]% 119 | \begin{columns} 120 | \begin{column}{0.6\textwidth} 121 | \begin{codeblock}[]{} 122 | \documentclass{ctexart} 123 | \usepackage{graphicx} 124 | |\highlightline|\usepackage{subcaption} 125 | \graphicspath{{figs/}{pics/}} 126 | \begin{document} 127 | \begin{figure}[ht] 128 | |\highlightline| \begin{subfigure}{0.48\textwidth} 129 | \centering 130 | \includegraphics[height=2cm]{sjtug} 131 | \caption{徽标} 132 | |\highlightline| \end{subfigure}\hfill 133 | |\highlightline| \begin{subfigure}{0.48\textwidth} 134 | \centering 135 | \includegraphics[height=2cm]{sjtugt} 136 | \caption{文字} 137 | |\highlightline| \end{subfigure} 138 | \caption{SJTUG}\label{fig:sjtug} 139 | \end{figure} 140 | \end{document} 141 | \end{codeblock} 142 | \end{column} 143 | \begin{column}{0.4\textwidth} 144 | \includepdflarge{support/examples/subfigures.pdf}\vspace{15pt} 145 | \pkg{subcaption} 宏包提供了 \env{subfigure} 环境(以及 \env{subtable}),可以用于以子图的形式插入,编号会增加一级。也可以为子图添加子级引用编号。 146 | \end{column} 147 | \end{columns} 148 | \end{frame} 149 | -------------------------------------------------------------------------------- /support/contents/learnlatex/structure.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{逻辑结构} 4 | 5 | \begin{frame}[fragile] 6 | \frametitle{列表} 7 | \begin{columns} 8 | \begin{column}{0.35\textwidth} 9 | \begin{codeblock}[]{无序列表} 10 | \documentclass{ctexart} 11 | \begin{document} 12 | |\highlightline| \begin{itemize} 13 | \item 第一项 14 | \item 第二项 15 | \item 第三项 16 | |\highlightline| \end{itemize} 17 | \end{document} 18 | \end{codeblock} 19 | \end{column} 20 | \begin{column}{0.35\textwidth} 21 | \begin{codeblock}[]{有序列表} 22 | \documentclass{ctexart} 23 | \begin{document} 24 | |\highlightline| \begin{enumerate} 25 | \item 第一项 26 | \item 第二项 27 | \item 第三项 28 | |\highlightline| \end{enumerate} 29 | \end{document} 30 | \end{codeblock} 31 | \end{column} 32 | \begin{column}{0.35\textwidth} 33 | \begin{codeblock}[]{描述列表} 34 | \documentclass{ctexart} 35 | \begin{document} 36 | |\highlightline| \begin{description} 37 | \item[|\phantom{}|第一] 文本 38 | \item[|\phantom{}|第二] 文本 39 | \item[|\phantom{}|第三] 文本 40 | |\highlightline| \end{description} 41 | \end{document} 42 | \end{codeblock} 43 | \end{column} 44 | \end{columns} 45 | \note{接下来我们概览一下三种列表:无序列表、有序列表、描述列表。这些列表可以相互嵌套,但最多嵌套四层。} 46 | \end{frame} 47 | 48 | %更深的列表技巧,定理环境等 49 | 50 | \begin{frame} 51 | \frametitle{列表} 52 | \begin{columns} 53 | \begin{column}{0.35\textwidth} 54 | \includepdflarge{support/examples/unordered.pdf} 55 | \end{column} 56 | \begin{column}{0.35\textwidth} 57 | \includepdflarge{support/examples/ordered.pdf} 58 | \end{column} 59 | \begin{column}{0.35\textwidth} 60 | \includepdflarge{support/examples/description.pdf} 61 | \end{column} 62 | \end{columns} 63 | \end{frame} 64 | 65 | \begin{frame}[fragile,label=sectioning]% 66 | \frametitle{目次结构} 67 | \begin{columns} 68 | \begin{column}{0.4\textwidth} 69 | 70 | \only<1>{ 71 | \LaTeX{} 可以使用目次命令将文档划分层级\footnotemark,并自动设定对应字体样式和大小。 72 | \begin{center} 73 | \footnotesize 74 | \begin{tabular}{rll} 75 | 命令 & 含义 & 层次 \\ 76 | \cmd{chapter} & 章\footnotemark & \sout{0} \\ 77 | \cmd{section} & 节 & 1 \\ 78 | \cmd{subsection} & 小节 & 2 \\ 79 | \cmd{subsubsection} & 小小节 & 3 \\ 80 | \end{tabular} 81 | \end{center} 82 | } 83 | 84 | \only<2>{ 85 | \includepdflarge{support/examples/section.pdf} 86 | } 87 | 88 | \end{column} 89 | \begin{column}{0.6\textwidth} 90 | \begin{codeblock}[]{目次} 91 | \documentclass{ctexart} 92 | \begin{document} 93 | |\highlightline<1>| \section{概念} 94 | |\highlightline<1>| \subsection{\LaTeX{}} 95 | \LaTeX{} 是一个…… 96 | \end{document} 97 | \end{codeblock} 98 | \end{column} 99 | \end{columns} 100 | \only<1>{\footnotetext{章这一级只在 \cls{report} 和 \cls{book} 文档类(包括对应的中文文档类)有定义。还有不常用的 \cmd{part} (0@\cls{article}/-1@\cls{report}\&\cls{book}\&\cls{beamer}) 以及更低层次的 \cmd{paragraph} (4) 与 \cmd{subparagraph} (5)。 }} 101 | \note{而知道层次,对我们下面生成目录有帮助。} 102 | \end{frame} 103 | 104 | \begin{frame}[fragile]% 105 | \frametitle{组织文档} 106 | \begin{columns} 107 | \begin{column}{0.4\textwidth} 108 | 109 | \only<1>{ 110 | \cmd{tableofcontents} 用来生成对于目次命令的目录。如果你想设定显示到哪个层级,在这个命令前使用 \cmd{setcounter\{tocdepth\}\{层次\}} 111 | 112 | 如果你想在目录中使用更短的标题: 113 | 114 | \cmd{section[短标题]\{长标题\}} 115 | 116 | 如果你想让本目次的标题不显示在目录中: 117 | 118 | \cmd{section*\{目录没这个标题\}} 119 | } 120 | 121 | \only<2>{ 122 | 对于大型文档而言,使用多个文件管理源文件通常是更方便的。而 \cmd{include} 和 \cmd{input} 都以相对路径的方式插入其他 \TeX{} 文档。 123 | 区别在于,\cmd{include} 命令会从新页开始并做一些内部调整,这基本上只对 \pkg{chapter} 这一级有用。而 \cmd{input} 会原样插入源代码。 124 | } 125 | 126 | \end{column} 127 | \begin{column}{0.6\textwidth} 128 | \begin{codeblock}[]{主文档} 129 | \documentclass{ctexrep} 130 | \begin{document} 131 | |\highlightline<1>| \tableofcontents 132 | |\highlightline<2>| \include{learnlatex} 133 | |\highlightline<2>| \include{sjtuthesis} 134 | \end{document} 135 | \end{codeblock} 136 | \end{column} 137 | \end{columns} 138 | \note<2>{当然,如果需要不换页插入源代码就不用 \cmd{include} 了, 139 | 因为这最主要的好处在于能够在组建大型文档的时候,得到当前页码、编号的进度信息。 140 | 在插入小部件时,还是推荐使用 \cmd{input},这个命令不会额外地产生 \texttt{.aux} 文件, 141 | 对于 I/O 反应慢的(说的就是 \faWindows{})比较友好。} 142 | \end{frame} 143 | 144 | \begin{frame}[fragile] 145 | \frametitle{组织文档} 146 | \begin{columns} 147 | \begin{column}{0.4\textwidth} 148 | \begin{codeblock}[]{learnlatex.tex} 149 | % !TeX root = main.tex 150 | \chapter{|\phantom{}|学习 \LaTeX{}} 151 | \section{|\phantom{}|概念} 152 | \subsection{\LaTeX{}} 153 | …… 154 | \end{codeblock} 155 | 子文件中不需要添加 \env{document} 环境。 156 | \end{column} 157 | \begin{column}{0.6\textwidth} 158 | \begin{codeblock}[]{主文档 main.tex} 159 | \documentclass{ctexrep} 160 | \begin{document} 161 | \tableofcontents 162 | |\highlightline| \input{learnlatex} 163 | \end{document} 164 | \end{codeblock} 165 | \end{column} 166 | \end{columns} 167 | \footnotetext{第一行的魔术命令 \texttt{\% !TeX root = main.tex} 可提示编辑器当前文档所属的主文档位置} 168 | \end{frame} 169 | -------------------------------------------------------------------------------- /support/contents/newversion.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{新版说明} 4 | 5 | \begin{frame} 6 | \frametitle{SJTUThesis} 7 | \framesubtitle{学位论文模板} 8 | SJTUThesis v2 转向使用 \LaTeX3 编程。 9 | 新增日语 \texttt{ja} 和德语 \texttt{de} 主要语言,具体示例详见 SJTUTeX 仓库 \link{https://github.com/sjtug/SJTUTeX}。 10 | 11 | \begin{figure} 12 | \scriptsize 13 | \begin{columns}[c] 14 | \hfill 15 | \begin{column}{0.2\textwidth} 16 | \fzerobox{\includegraphics[width=\linewidth]{support/images/sjtuthesisv1.pdf}} 17 | \end{column} 18 | \begin{column}{0.45\textwidth} 19 | \begin{tabular}{>{\color{sjtuRedPrimary}}c@{\,}>{\color{sjtuRedPrimary}}l>{\color{sjtuBlueSecondary}}r@{\,}>{\color{sjtuBlueSecondary}}c} 20 | \faMinus{} & \LaTeXe{} & \LaTeX3 & \faPlus{} \\ 21 | \faMinus{} & 旧版封面 & 新版封面 & \faPlus{} \\ 22 | \faMinus{} & \texttt{type=course} & & \\ 23 | & & \texttt{math-style} & \faPlus{} \\ 24 | & & \texttt{integral} & \faPlus{} \\ 25 | & & \texttt{integral-limits} & \faPlus{} \\ 26 | & & \texttt{uppercase-greek} & \faPlus{} \\ 27 | \faMinus{} & \texttt{assisupervisor} & \texttt{assoc-supervisor} & \faPlus{} \\ 28 | & & \texttt{co-supervisor} & \faPlus{} \\ 29 | & & \texttt{subject} & \faPlus{} \\ 30 | & & \texttt{display-date} & \faPlus{} \\ 31 | & & \texttt{style/} & \faPlus{} \\ 32 | \faMinus{} & \texttt{summary} & & \\ 33 | & & \texttt{lang=ja, lang=de} & \faPlus{} \\ 34 | & & \texttt{info//} & \faPlus{} \\ 35 | \end{tabular} 36 | \end{column} 37 | \begin{column}{0.2\textwidth} 38 | \fzerobox{\includegraphics[width=\linewidth]{support/images/sjtuthesisv2.pdf}} 39 | \end{column} 40 | \hfill 41 | \end{columns} 42 | \caption{\SJTUThesis{} v1.x 到 v2.0 的变化} 43 | \end{figure} 44 | \note{\opt{style} 中新增了很多选项,可以灵活控制样式。具体参见文档。} 45 | \note{\opt{course} 被取消,现在请使用 \cls{sjtureport} 和 \cls{sjtuarticle} 文档类。} 46 | \end{frame} 47 | 48 | \begin{frame} 49 | \frametitle{SJTUBeamer} 50 | \framesubtitle{幻灯片模板} 51 | \begin{figure} 52 | \scriptsize 53 | \begin{columns}[c] 54 | \hfill\hfill 55 | \begin{column}{0.2\textwidth} 56 | \begin{tabular}{>{\color{sjtuRedPrimary}}r@{\,}>{\color{sjtuBlueSecondary}}c} 57 | \textbackslash\texttt{definelogo} & \faAsterisk{} \\ 58 | 快速入门 & \faPlus{} \\ 59 | 用户手册优化 & \faPlus{} \\ 60 | 开发手册优化 & \faPlus{} \\ 61 | \textbackslash\texttt{usesjtutheme} & \faAsterisk{} \\ 62 | poster 海报子主题 & \faPlus{} \\ 63 | 启用 Discussions \link{https://github.com/sjtug/SJTUBeamer/discussions} & \faPlus{} \\ 64 | \end{tabular} 65 | \end{column} 66 | \begin{column}{0.3\textwidth} 67 | \fzerobox{\includegraphics[width=0.995\linewidth]{support/images/sjtubeamerquickstartfirst.jpg}}\\ 68 | \fzerobox{\includegraphics[width=0.485\linewidth]{support/images/sjtubeamerfirst.jpg}}\hfill 69 | \fzerobox{\includegraphics[width=0.485\linewidth]{support/images/sjtubeamerdevguidefirst.pdf}} 70 | \end{column} 71 | \begin{column}{0.26\textwidth} 72 | \fzerobox{\includegraphics[width=\linewidth]{support/beamer/poster.pdf}} 73 | \end{column} 74 | \hfill\hfill 75 | \end{columns} 76 | \caption{\SJTUBeamer{} v2.9 到 v3.0 的变化} 77 | \end{figure} 78 | \note{实际上上传至 Overleaf 也是一个新特性。} 79 | \end{frame} 80 | 81 | \begin{frame} 82 | \frametitle{\SJTUTeX{}} 83 | \framesubtitle{和它的朋友} 84 | 85 | \begin{columns} 86 | \begin{column}{.45\textwidth} 87 | \begin{figure} 88 | \begin{subfigure}{\textwidth} 89 | \centering 90 | \fzerobox{\includegraphics[page=1,height=.25\textheight]{support/thesis/sample-report-zh.pdf}} 91 | \fzerobox{\includegraphics[page=3,height=.25\textheight]{support/thesis/sample-report-zh.pdf}} 92 | \caption{\textsc{SJTUReport} 课程大论文} 93 | \end{subfigure} 94 | \begin{subfigure}{\textwidth} 95 | \centering 96 | \fzerobox{\includegraphics[page=1,height=.25\textheight]{support/thesis/sample-article-zh.pdf}} 97 | \fzerobox{\includegraphics[page=2,height=.25\textheight]{support/thesis/sample-article-zh.pdf}} 98 | \caption{\textsc{SJTUArticle} 课程小论文} 99 | \end{subfigure} 100 | \end{figure} 101 | \end{column} 102 | \begin{column}{.5\textwidth} 103 | \begin{figure} 104 | \includegraphics{support/figures/sjtutex.pdf} 105 | \caption{\SJTUTeX{} 和它的朋友} 106 | \end{figure} 107 | \end{column} 108 | \end{columns} 109 | 110 | \note{\textsc{SJTUReport} 和 \textsc{SJTUArticle} 将沿用上一个版本的页眉设置。} 111 | \note{\textsc{SJTUReport} 的封面因不易维护被恢复为默认封面。} 112 | \end{frame} 113 | -------------------------------------------------------------------------------- /support/contents/learnlatex/install.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{安装和编辑} 4 | 5 | \begin{frame} 6 | \frametitle{发行版} 7 | \begin{table} 8 | \caption{\hologo{TeX} 发行版} 9 | \footnotesize 10 | \begin{stampbox} 11 | \begin{tabular}{c>{\raggedright}*{3}{p{3.2cm}}} 12 | \alert{发行版} & \hologo{MiKTeX} \link{https://miktex.org/} & \TeX{} Live \link{https://www.tug.org/texlive/} & Mac\TeX{} \link{https://www.tug.org/mactex/} \\[2pt] 13 | \alert{特点} & 只安装必要文件,依赖用时更新 & 所有平台均可使用,每年发布一次 & Mac 系统专用,对 \TeX{} Live 的进一步打包 \\ 14 | \alert{推荐平台} & \faWindows & \faWindows\,\faLinux & \faApple \\ 15 | \end{tabular} 16 | \end{stampbox} 17 | \end{table} 18 | \begin{center} 19 | \parbox{.9\textwidth}{ 20 | 要让 \LaTeX{} 跑起来,核心就是要有一套 \TeX{} 发行版,来获取让 \LaTeX{} 工作所需的一组程序和文件。参考《一份简短的关于 \LaTeX{} 安装的介绍》\link{https://mirrors.sjtug.sjtu.edu.cn/ctan/info/install-latex-guide-zh-cn/install-latex-guide-zh-cn.pdf} 安装想使用的发行版。推荐使用发行版的最新版本\footnote{老版本 Linux 系统的包管理器自带 \TeX{} Live 发行版可能不是最新的 \link{https://repology.org/project/texlive/versions},尽量使用镜像安装,并手动将相关环境变量添加到路径 \link{https://www.tug.org/texlive/doc/texlive-zh-cn/texlive-zh-cn.pdf}。},并使用国内镜像。 21 | } 22 | \end{center} 23 | \note{要让 \LaTeX{} 跑起来,核心就是要有一套 \TeX{} 发行版,来获取让 24 | \LaTeX{} 工作所需的一组程序和文件。参考《一份简短的关于 \LaTeX{} 安装的介绍》 25 | 安装想使用的发行版,里面介绍了 \faWindows{}, \faApple{}, \faLinux{}, WSL 等系统上 26 | \TeX{} Live 的安装,非常全面,一步一步做就可以成功安装。目前最新的 \TeX{} Live 版本为 27 | 2022,\SJTUThesis{} 用户不应当安装 \TeX{} Live 2020 以下的版本(后面会讲)。 28 | 29 | 事实上,我认为这几个发行版各有操作系统偏好,虽然前两者是跨平台的。 30 | 31 | \hologo{MiKTeX} 对 Windows 用户较为友好,安装简单,占用空间不大,安装时间短, 32 | 而且有完整的安装与卸载程序。可以给大家看一下 \hologo{MiKTeX} Console 的情况。 33 | 34 | \TeX{} Live 更符合 Linux 的更新传统。老版本 Linux 系统的包管理器自带 \TeX{} Live 35 | 发行版可能不是最新的(到时间也会锁定依赖库的版本),尽量使用镜像安装(当然也推荐使用最新的 36 | Linux 发行版,这样它的版本也就一直是最新的),并手动将相关环境变量添加到路径。 37 | 38 | Mac\TeX{} 发行版有 pkg 安装包封装,并且附带了 \TeX{}Shop 基本编辑软件,更加适合 Mac OS。 39 | 我用下来的话,感觉除了 \TeX{} Live Utility 外都有点过时了。} 40 | \end{frame} 41 | 42 | \begin{frame}[plain] 43 | \hbox to \textwidth{ 44 | \hfil 45 | \vbox to 3cm{ 46 | \hbox{ 47 | \resizebox{3cm}{!}{\includegraphics{support/examples/pics/sjtug}} 48 | } 49 | } 50 | \hfil 51 | \vbox to 3cm{ 52 | \vfill 53 | \hbox{\Large\bfseries\color{structure} 稳定、快速、现代的镜像服务。} 54 | \vskip2pt 55 | \hbox{托管于华东教育网骨干节点上海交通大学。} 56 | \vfill 57 | } 58 | \hskip20pt 59 | \hfil 60 | } 61 | 62 | \begin{center} 63 | \parbox{0.8\textwidth}{ 64 | 推荐使用 SJTUG 软件镜像服务 \link{https://mirror.sjtu.edu.cn/},离得近,下得快。 65 | 66 | \begin{description} 67 | \footnotesize 68 | \item[\hologo{MiKTeX}] \url{https://mirrors.sjtug.sjtu.edu.cn/CTAN/systems/win32/miktex/setup/windows-x64/} \\ 并在 \hologo{MiKTeX} Console 中设置镜像源为 \url{https://mirrors.sjtug.sjtu.edu.cn} 69 | \item[\TeX{} Live] \url{https://mirrors.sjtug.sjtu.edu.cn/CTAN/systems/texlive/tlnet} 70 | \item[Mac\TeX{}] \url{https://mirrors.sjtug.sjtu.edu.cn/CTAN/systems/mac/mactex/} 71 | \item[\faTelegram] 可以在 SJTUG 镜像站通知频道 \link{https://t.me/sjtug_mirrors_news} 获得更多信息,加入关联群组参与讨论。 72 | \end{description} 73 | } 74 | \end{center} 75 | \note{说到镜像,像后两者的安装包都很大(4GB 左右),由于一些原因,不采用镜像的话不知道要下到什么时候,对下载速度的要求高; 76 | 而 \hologo{MiKTeX} 需要随时更新,宏包大小颗粒度大,对延迟的要求高。 77 | 那么采用 SJTUG 镜像源将同时解决这两个问题,位于图信大楼的机房,凭借校内的高速网络,稳定快速下载, 78 | 现在由 LightQuantum 维护的镜像站欢迎大家的使用,主页上还有更多的其他镜像可供使用,加入 Telegram 群组参与讨论。} 79 | \end{frame} 80 | 81 | \begin{frame} 82 | \frametitle{编辑器} 83 | \begin{table} 84 | \caption{开源编辑器推荐} 85 | \footnotesize 86 | \begin{stampbox} 87 | \begin{tabular}{c>{\raggedright}*{3}{p{3.5cm}}} 88 | \alert{编辑器} & \begin{tabular}{c}Visual Studio Code \link{https://code.visualstudio.com}\\ +\,\LaTeX{} Workshop \link{https://marketplace.visualstudio.com/items?itemName=James-Yu.latex-workshop}\end{tabular} & \TeX{}studio \link{https://texstudio.org} & \TeX{}works \\[5pt] 89 | \alert{特点} & 搭配 VS Code 使用非常方便,易扩展 & 可以使用大量的菜单选项输入代码块,用户友好 & 只提供基础的高亮与运行方法,发行版自带\footnote{Mac\TeX{} 打包的是 \TeX{}Shop 编辑器。} \\ 90 | \end{tabular} 91 | \end{stampbox} 92 | \end{table} 93 | \begin{center} 94 | \parbox{.9\textwidth}{ 95 | 使用专为 \LaTeX{} 设计的编辑器将带来更多便利,因为它们往往会提供一键编译、内置 PDF 阅读器以及语法高亮等功能。几乎所有现代的 \LaTeX{} 编辑器都提供 Sync\TeX{} 这一强大的功能,以在 PDF 和代码间对应跳转。 96 | } 97 | \end{center} 98 | \note{编辑器的种类很多,我无法一一列举,但是对编写 \TeX{} 常用的开源编辑器我推荐这三个。 99 | 其中 \TeX{}studio 的安装包可能下得有点慢。这里我对这些编辑器都演示一下,初学者我更推荐使用 100 | \TeX{} studio 编辑器,如果平时就码很多代码的话,我更推荐使用 VS Code 加插件这种方式。 101 | 102 | 使用专为 \LaTeX{} 设计的编辑器将带来更多便利,因为它们往往会提供一键编译、内置 PDF 阅读器 103 | 以及语法高亮等功能。几乎所有现代的 \LaTeX{} 编辑器都提供 Sync\TeX{} 这一强大的功能 104 | (VS Code 的方法是 Ctrl + 某处,Overleaf 的方法是直接双击),以在 PDF 和代码间对应跳转。 105 | 当然如果你不喜欢使用这种 GUI 编辑器,\TeX{} 文档本身就是纯文本,对 Vim, Emacs 等终端用户 106 | 也很友好。} 107 | \end{frame} 108 | 109 | \begin{frame} 110 | \frametitle{在线平台} 111 | \begin{table} 112 | \caption{在线协作平台推荐} 113 | \footnotesize 114 | \begin{stampbox} 115 | \begin{tabular}{c>{\raggedright}*{2}{p{4cm}}} 116 | \alert{在线平台} & Overleaf \link{https://www.overleaf.com/} & 交大 \LaTeX{} 助手 \link{https://latex.sjtu.edu.cn/} \\[2pt] 117 | \alert{特点} & 最流行的在线平台,提供大量的模板,但国内访问慢 & 校内平台,隐私保护有保障,共享项目限制少 \\ 118 | \end{tabular} 119 | \end{stampbox} 120 | \end{table} 121 | \begin{center} 122 | \parbox{.9\textwidth}{ 123 | 在线平台允许你直接在网页中编辑文档,无需本地安装即可在后台运行 \LaTeX{},并显示生成的 PDF。可以参照 Overleaf 官方文档学习如何使用在线平台 \link{https://www.overleaf.com/learn}。 124 | } 125 | \end{center} 126 | \note{当然使用在线平台省去了安装发行版的麻烦,这里列出两种在线写作平台。 127 | 128 | 如果有数据合规需求的话,可以考虑使用由网络信息中心维护的交大 \LaTeX{} 助手,最近更新了 \TeX{} Live 2022,还是很不错的。 129 | 130 | 当然国内还有 \TeX{} Page \link{https://www.texpage.com/},Slagger \link{https://www.slager.cn/} 等。 131 | 一般来讲,这种平台使用的都是 Linux 操作系统,所以在排版中文的时候考虑将编译引擎更改为 \hologo{XeLaTeX}, 132 | 学习如何使用在线平台参见 Overleaf 的官方文档 \link{https://www.overleaf.com/learn}。} 133 | \end{frame} 134 | -------------------------------------------------------------------------------- /support/contents/learnlatex/intro.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../../latex-talk.tex 2 | 3 | \section{是什么} 4 | 5 | \begin{frame} 6 | \frametitle{\TeX{}} 7 | \begin{columns}[c] 8 | \begin{column}{0.7\textwidth} 9 | \begin{center} 10 | \rmfamily\Huge 11 | \highlight[structure]{\TeX{}} 12 | \end{center} 13 | \begin{center} 14 | \parbox{0.75\textwidth}{ 15 | \TeX{} 是由斯坦福大学教授高德纳 16 | (Donald E.~Knuth)于 1977 年开始开发的排版引擎。目前仍在更新,最新版本号为 3.141592653 \link{https://tug.org/TUGboat/tb42-1/tb130knuth-tuneup21.pdf}。 17 | } 18 | \end{center} 19 | \end{column} 20 | \begin{column}{0.3\textwidth} 21 | \includegraphics[width=.8\columnwidth]{support/images/Knuth.jpg} 22 | \end{column} 23 | \end{columns} 24 | \note{\emph{这一部分背景介绍大家可以了解一下,暂时跳过。} 25 | \LaTeX{} 这个词由两个部分组成,\hologo{La} 和 \TeX{}。那我们首先了解一下 \TeX{} 是什么。 26 | \TeX{} 是由斯坦福大学的教授高德纳于 1977 年开始开发的排版引擎,它已经有三十多年的历史了, 27 | 目前仍在更新,版本号(3.141592653)将会趋近于 $\pi$ 的取值,高德纳最近还在给 \textsl{TUGBoat} 写稿子 28 | \link{https://tug.org/TUGboat/tb42-1/tb130knuth-tuneup21.pdf}, 29 | 关于 \TeX{} 今年又做了哪些改进。} 30 | \end{frame} 31 | 32 | \begin{frame} 33 | \frametitle{\LaTeX{}} 34 | \begin{columns}[c] 35 | \begin{column}{0.7\textwidth} 36 | \begin{center} 37 | \rmfamily\Huge 38 | \highlight[structure]{\LaTeX{}} 39 | \end{center} 40 | \begin{center} 41 | \parbox{0.75\textwidth}{ 42 | \LaTeX{} 是最早在 1985 年由现就职于微软的 Leslie Lamport 开发的一种 \TeX{} \textbf{格式}\footnotemark,使用一些列宏和扩展宏包来简化 \TeX{} 的使用。现在由 \LaTeX{} Project 的成员维护。现在广泛使用的版本是 \LaTeXe{},最新的版本为 \LaTeX3(2020 年 10 月后默认内置)。 43 | } 44 | \end{center} 45 | \end{column} 46 | \begin{column}{0.3\textwidth} 47 | \includegraphics[width=.8\columnwidth]{support/images/Lamport.jpg} 48 | \end{column} 49 | \end{columns} 50 | \footnotetext{\hologo{ConTeXt} 也是一种 \TeX{} 格式 \link{https://www.contextgarden.net/}。} 51 | \note{\emph{这一部分的背景介绍大家可以了解一下,暂时跳过。} 52 | \LaTeX{} 是最早由现就职于微软的 Leslie Lamport 开发的一种 \TeX{} 格式(与其对标的是 53 | \hologo{ConTeXt}\link{https://www.contextgarden.net/}),主要也是为了简化 \TeX{} 的使用。 54 | 现在主要由 \LaTeX{} 开发组维护,现在广泛使用的版本是 \LaTeXe{},最新的版本为 \LaTeX3, 55 | 在 2020 年 10 月后默认内置,所以要尽可能使用较新的发行版,以充分发挥其功能。} 56 | \end{frame} 57 | 58 | \begin{frame} 59 | \frametitle{程序} 60 | \begin{columns}[c] 61 | \begin{column}{0.7\textwidth} 62 | \begin{center} 63 | \rmfamily\Huge 64 | \highlight[structure]{\hologo{pdfLaTeX}} 65 | \end{center} 66 | \begin{center} 67 | \parbox{0.7\textwidth}{ 68 | \hologo{pdfLaTeX} 是为了编译一个 \LaTeX{} 文档而运行的程序。实际上底层在运行一个叫 \hologo{pdfTeX} 的引擎,并预装了对应的 \LaTeX{} \textbf{格式}。为了利用临时文件,可能就需要多次运行程序。 69 | } 70 | \end{center} 71 | \end{column} 72 | \begin{column}{0.3\textwidth} 73 | \begin{block}{} 74 | \ttfamily\small 75 | > \highlight{pdflatex} main.tex\\ 76 | This is pdfTeX, Version 3.141592653- 77 | 2.6-1.40.23 (MiKTeX 21.10)\\ 78 | entering extended mode\\ 79 | \highlight{LaTeX2e} <2021-11-15>\\ 80 | \highlight{L3} programming layer <2021-11-22> 81 | \end{block} 82 | \end{column} 83 | \end{columns} 84 | \note{\hologo{pdfLaTeX} 是为了编译一个 \LaTeX{} 文档而运行的程序。} 85 | \end{frame} 86 | 87 | % \begin{frame} 88 | % \frametitle{引擎} 89 | % \begin{columns}[c] 90 | % \begin{column}{0.7\textwidth} 91 | % \begin{center} 92 | % \rmfamily\Huge 93 | % \highlight[structure!70]{pdf}\hologo{La}\highlight[structure!70]{\TeX{}} 94 | % \end{center} 95 | % \begin{center} 96 | % \parbox{0.7\textwidth}{ 97 | % pdf\TeX{} 是编译 \TeX{} 文档(以 \texttt{.tex} 结尾)的\textbf{引擎}---可以理解 \TeX{} 指令的\textbf{程序}。 98 | % } 99 | % \end{center} 100 | % \end{column} 101 | % \begin{column}{0.3\textwidth} 102 | % \begin{block}{} 103 | % \ttfamily\small 104 | % > pdflatex main.tex\\ 105 | % This is \highlight[structure!70]{pdfTeX}, Version 3.141592653- 106 | % 2.6-1.40.23 (MiKTeX 21.10) 107 | % entering extended mode\\ 108 | % LaTeX2e <2021-11-15>\\ 109 | % L3 programming layer <2021-11-22> 110 | % \end{block} 111 | % \end{column} 112 | % \end{columns} 113 | % \note{实际上底层在运行一个叫 \hologo{pdfTeX} 的引擎,并预装了对应的 \LaTeX{} 格式。} 114 | % \end{frame} 115 | 116 | \begin{frame}[label={frame:engine}] 117 | \frametitle{程序} 118 | \begin{table} 119 | \caption{主流 \hologo{(La)TeX} 程序 120 | \footnote{(u)p\TeX{} 是日语最常用的引擎,生成 \texttt{.dvi},支持 Unicode。}\footnote{Ap\TeX{} \link{https://github.com/clerkma/ptex-ng} 具有底层 CJK 支持,内联 Ruby,Color Emoji。}} 121 | \footnotesize 122 | \begin{stampbox} 123 | \begin{tabular}{c>{\raggedright}*{3}{p{3.5cm}}} 124 | \alert{引擎} & \hologo{pdfTeX} & \hologo{XeTeX} & \hologo{LuaTeX} \\ 125 | \alert{程序} & \hologo{pdfLaTeX} & \hologo{XeLaTeX} & \hologo{LuaLaTeX} \\ 126 | \alert{特点} & 直接生成 PDF,支持 micro-typography & 支持 Unicode、OpenType 与复杂文字编排 (CTL) & 支持 Unicode,内联 Lua,支持 OpenType \\ 127 | \end{tabular} 128 | \end{stampbox} 129 | \end{table} 130 | 131 | \begin{center} 132 | \parbox{.9\textwidth}{ 133 | \hologo{pdfLaTeX} 不支持 Unicode。为了排版中文,大部分情况下应当使用 \hologo{XeLaTeX},而 \hologo{LuaLaTeX} 速度相对较慢。\faWindows{} 可以在一些情况下使用 \hologo{pdfLaTeX}。 134 | } 135 | \end{center} 136 | \note{当然为了排版中文,已经不再推荐使用 \hologo{pdfLaTeX} 了,应该使用 137 | \hologo{XeLaTeX} 或者 \hologo{LuaLaTeX},当然后者的速度还是相对较慢, 138 | 它们支持 Unicode 编码,并可以使用 OpenType 字体的全部功能。 139 | 当然 \faWindows{} 平台下在某些追求速度的情况下, 140 | 还是可以试着使用 \hologo{pdfLaTeX} 的。 141 | 142 | \hologo{LuaLaTeX} 理想情况下不慢,但是使用一些宏包后会破坏理想状态, 143 | 也会因配置产生不同的结果,不同的操作系统在 I/O 速度上的不同也会导致不同的时间。 144 | 145 | \hologo{pdfLaTeX} 也支持,只不过需要先生成 tfm \TeX{} 字体度量文件,后续使用 \TeX{} 146 | 自身的配置方法,只能使用 7 比特或 8 比特字体。} 147 | \end{frame} 148 | 149 | % \begin{frame} 150 | % \paragraph{\hologo{pdfLaTeX}} \TeX{} 和 \LaTeX{} 被广泛使用之前,它们只需内置支持欧洲语言即可。在 Unicode 出现之前,\LaTeX{} 提供了许多种\textbf{文件编码}来允许很多语言的文字以原生的方式输入,\hologo{pdfLaTeX} 也只需要使用 8 位文件编码和 8 位字体。 151 | % \end{frame} 152 | 153 | -------------------------------------------------------------------------------- /support/contents/boost.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{\LaTeX{} 无止境} 4 | 5 | \begin{frame} 6 | \frametitle{宏包} 7 | 8 | \begin{itemize} 9 | \item 绝大多数 \LaTeX{} 宏包发布于 CTAN (Comprehensive \TeX{} Archive Network) \link{https://www.ctan.org/},1992 年建站以来,至今已经吸引 2855 名贡献者发布其 6215 个宏包。 10 | \item 基本不敢写精通 \LaTeX{} \sout{(虽然没有什么大用} 11 | \note{正如一般不会在简历上写精通 C++ 一样。但是正如之前的 \TeX{}works 虽然不怎么好用一样,它更多地提供的是一种基础通用性,对于像开发类似软件的程序员来说这是一个思考的起点,\LaTeX{} 对于熟悉于代码编写的人来说是一种更好的选择。} 12 | \item 可以通过编写宏来简化输入,可以阅读 \pkg{clsguide}\footnote{(中文版)\textsc{Laughcry}~译. 写给 \LaTeXe{} 类与宏包的作者[EB/OL]. 2010. \link{https://github.com/CTeX-org/ctex-doc/blob/master/clsguide-zh-cn/clsguide-zh-cn.tex}}, 13 | \pkg{xparse}\footnote{(中文版)盛文博~译. \pkg{xparse} 宏包:进行文档命令解析[EB/OL]. 2018. \link{https://github.com/WenboSheng/LaTeX3-doc-cn/blob/master/xparse-doc-cn/xparse-cn.pdf}} 文档。 14 | \end{itemize} 15 | 16 | \begin{exampleblock}{定义宏举例} 17 | \begin{description} 18 | \item[\TeX] \cmd{def}\texttt{\textbackslash{}foo}\#1\#2\{\#1 of \#2\} 19 | \item[\LaTeXe] \cmd{newcommand}\texttt{\textbackslash{}foo}[2]\{\#1 of \#2\} 20 | \item[\LaTeX3] \cmd{NewDocumentCommand}\texttt{\textbackslash{}foo}\{mm\}\{\#1 of \#2\} 21 | \end{description} 22 | \end{exampleblock} 23 | 24 | \note{简单了解即可,还可以设定可选参数,可以参见文档。} 25 | 26 | \note{宏包不是使用的越多越好,实际使用的包并没有想象的那么多。慢慢熟悉这些宏包的功能才有可能加快编译速度。} 27 | 28 | \end{frame} 29 | 30 | \begin{frame}[fragile] 31 | \frametitle{错误} 32 | \begin{columns} 33 | \begin{column}{0.55\textwidth} 34 | \begin{codeblock}[]{未定义命令} 35 | \newcommand\mycommand{\textbold{hmmm}} 36 | My command is used here \mycommand. 37 | \end{codeblock} 38 | \begin{codeblock}[]{括号不配对} 39 | \usepackage[leqno}{amsmath} 40 | \end{codeblock} 41 | \end{column} 42 | \begin{column}{0.45\textwidth} 43 | \begin{codeblock}[]{文件缺失} 44 | \usepackage{amsmathz} 45 | \end{codeblock} 46 | \begin{codeblock}[]{数学模式有空行} 47 | \begin{equation} 48 | 49 | 1=2 50 | 51 | \end{equation} 52 | \end{codeblock} 53 | \end{column} 54 | \end{columns} 55 | \end{frame} 56 | 57 | \begin{frame}[fragile] 58 | \frametitle{错误} 59 | \begin{columns} 60 | \begin{column}{0.55\textwidth} 61 | \begin{block}{未定义命令} 62 | \begin{lstlisting} 63 | ! Undefined control sequence. 64 | \mycommand ->\textbold 65 | {hmmm} 66 | l.8 My command is used here \mycommand 67 | . 68 | ? 69 | \end{lstlisting} 70 | \end{block} 71 | \begin{block}{括号不配对} 72 | \begin{lstlisting} 73 | ! Argument of \@fileswith@ptions has an extra }. 74 | \end{lstlisting} 75 | \end{block} 76 | \end{column} 77 | \begin{column}{0.45\textwidth} 78 | \begin{block}{文件缺失} 79 | \begin{lstlisting} 80 | ! LaTeX Error: File `amsmathz.sty' not found. 81 | \end{lstlisting} 82 | \note{检查是否安装了该宏包。或者宏包是否在搜索路径内。} 83 | \end{block} 84 | \begin{block}{数学模式有空行} 85 | \begin{lstlisting} 86 | ! Missing $ inserted. 87 | \end{lstlisting} 88 | \end{block} 89 | \end{column} 90 | \end{columns} 91 | \end{frame} 92 | 93 | \begin{frame} 94 | \frametitle{编译速度} 95 | \begin{columns} 96 | \begin{column}{0.5\textwidth} 97 | \begin{exampleblock}{\faWindows} 98 | \begin{itemize} 99 | \item \hologo{pdfLaTeX} 仍是目前最快的。 100 | \item 中文支持方面需要做变通方法。 101 | \item I/O 速度成为瓶颈。 102 | \end{itemize} 103 | \end{exampleblock} 104 | \end{column} 105 | \begin{column}{0.5\textwidth} 106 | \begin{exampleblock}{\faLinux{} \faApple} 107 | \begin{itemize} 108 | \item \hologo{XeLaTeX} 已经足够快。 109 | \item \CTeX{} 需要 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX}。 110 | \item 主要取决于单核性能。 111 | \end{itemize} 112 | \end{exampleblock} 113 | \end{column} 114 | \end{columns} 115 | \begin{columns} 116 | \begin{column}{0.5\textwidth} 117 | \begin{block}{文章} 118 | \begin{itemize} 119 | \item \LaTeX{} 的主要设计用途。 120 | \item \hologo{pdfLaTeX}, \hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 理想状态下速度差距不大 \link{https://stone-zeng.github.io/2019-07-24-tex-benchmark/}。 121 | \end{itemize} 122 | \end{block} 123 | \end{column} 124 | \begin{column}{0.5\textwidth} 125 | \begin{block}{幻灯} 126 | \begin{itemize} 127 | \item \LaTeX{} 的图形偏门流派。 128 | \item 由于 \textsc{pgf} 的引入使得 \hologo{LuaLaTeX} 明显偏慢。 129 | \end{itemize} 130 | \end{block} 131 | \end{column} 132 | \end{columns} 133 | 134 | \note[item]{\hologo{pdfLaTeX} 中文方面需要做变通方法的意思是,打字的时候汉字与英文之间要留空格,尽量少换行(否则可能会导致额外的空格,视设置而定)。} 135 | 136 | \note[item]{魔兽争霸 3 当年出来的时候战役模式是主流,后来大家都开始打 RPG, PVP, DotA(没错,发源地),自定义的一些内容也可以很精彩。} 137 | 138 | \note[item]{用 PowerPoint 做完幻灯片会有一种空虚感,因为可能会做大量的重复工作。而 beamer 如果使用的好的话不会。} 139 | \end{frame} 140 | 141 | % \begin{frame} 142 | % \frametitle{加速轮子} 143 | % \begin{columns} 144 | % \begin{column}{0.33\textwidth} 145 | % \begin{exampleblock}{ReportBoost \link{https://github.com/LogCreative/ReportBoost}} 146 | % \begin{tabular}{p{0.9\textwidth}} 147 | % 提供一个已经配置完备的 Visual Studio Code 预编译工程目录。\\ 148 | % \midrule 149 | % 主要使用 \hologo{eTeX} 对 \hologo{pdfLaTeX} 在 \faWindows{} 上转储头文件为一个中间文件,减少 I/O 操作。 150 | % \note{\hologo{eTeX} 是原生 \TeX{} 的扩展版本,支持更多的字符数,\hologo{XeTeX} 和 \hologo{LuaTeX} 基于其演变而来。}\\ 151 | % \midrule 152 | % 对 \hologo{XeLaTeX} 和 \hologo{LuaLaTeX} 支持不佳。 153 | % \end{tabular} 154 | % \end{exampleblock} 155 | % \end{column} 156 | % \begin{column}{0.33\textwidth} 157 | % \begin{exampleblock}{AutoBeamer \link{https://github.com/LogCreative/AutoBeamer}} 158 | % \begin{tabular}{p{0.9\textwidth}} 159 | % 主要提供将 \faMarkdown{} 文件翻译为 \LaTeX{} \cls{beamer} 代码的功能。\\ 160 | % \midrule 161 | % \pkg{pandoc} \link{https://pandoc.org/index.html} 也可以将 \faMarkdown{} 转换为 \LaTeX{} 幻灯片代码,但结果不够干净。\\ 162 | % \midrule 163 | % 使用网页脚本语言 \faJs{} 造轮子主要考虑跨平台与未来功能迁移的可能。 164 | % \end{tabular} 165 | % \end{exampleblock} 166 | % \end{column} 167 | % \begin{column}{0.33\textwidth} 168 | % \begin{exampleblock}{BeamerBoost \link{https://github.com/LogCreative/BeamerBoost}} 169 | % \begin{tabular}{p{0.9\textwidth}} 170 | % 主要提供对 \cls{beamer} 文档类自然切割单位(帧)的脏区与并行渲染实现,更早拿到每帧结果。\\ 171 | % \midrule 172 | % 目前只能采用预编译的手段减少进程切换开销,主要面向 \faWindows{} 编译较慢情况的预览。\\ 173 | % \midrule 174 | % 导航栏结果未必准确。 175 | % \end{tabular} 176 | % \end{exampleblock} 177 | % \end{column} 178 | % \end{columns} 179 | 180 | % \note{这些程序还都处于相互分离的阶段。但是也可以看到这种使用 Unix 哲学所涉及的程序带来的好处:每一个程序只做好一件事。模块化、尽可能使用文本输入输出流有助于程序的构建与修改,每一个部分都可以换成新的零件。} 181 | 182 | % \note{beamer(与动画 \pkg{animate}) 可能是目前 \LaTeX{} 方面唯一有可能并行化的东西。} 183 | 184 | % \note{当然如果完成这一步的话,就做出来一个 PowerPoint 了。} 185 | % \end{frame} 186 | -------------------------------------------------------------------------------- /support/contents/template.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{模版编写} 4 | 5 | \begin{frame} 6 | \frametitle{本部分主要参考} 7 | 8 | \begin{bibliolist}{00} 9 | \onlineitem \textsc{USTC \TeX{} Users Group}. 10 | \newblock \LaTeX{} 模板开发最佳实践[EB/OL]. 11 | \newblock 2019. \href{https://github.com/ustctug/ustcthesis/wiki/LaTeX-模板开发最佳实践} 12 | {\ttfamily https://github.com/ustctug/ustcthesis/wiki/LaTeX-模板开发最佳实践}. 13 | 14 | \onlineitem 项子越. 15 | \newblock \LaTeX3 教程[EB/OL]. 16 | \newblock 2021. \url{https://www.bilibili.com/video/BV1L44y1676h}. 17 | \link{http://www.alanshawn.com/latex3-tutorial/} 18 | 19 | \onlineitem \textsc{Wright J.} 20 | \newblock A model \texttt{.dtx} file [EB/OL]. 21 | \newblock 2009. \url{https://www.texdev.net/2009/10/06/a-model-dtx-file/}. 22 | \link{https://liam.page/2015/01/23/literate-programming-in-latex/} 23 | \end{bibliolist} 24 | 25 | \note[item]{由于第一篇文章的贡献者比较多,所以只以出现位置的所属作为作者。} 26 | \note[item]{项子越的主页 \link{http://www.alanshawn.com/latex3-tutorial/} 有全面的英文版资料, 27 | 甚至还有使用 \LaTeX3 刷 LeetCode 题的例子 \link{http://www.alanshawn.com/advanced-typesetting/}。} 28 | \note[item]{还有 \link{https://liam.page/2015/01/23/literate-programming-in-latex/} 可供参考。} 29 | \end{frame} 30 | 31 | \begin{frame} 32 | \frametitle{模板是什么} 33 | 34 | \begin{itemize} 35 | \item 已经设计好的格式框架 36 | \item<1-> \alert{不好的模板} 需要将时间花在调整格式框架上 37 | \item<2> \alert{好的模板} 适度封装底层实现,抽象功能以统一管理,使用户专注于内容 38 | \end{itemize} 39 | 40 | \begin{figure} 41 | \begin{subfigure}{0.5\textwidth} 42 | \framebox{ 43 | \parbox{\textwidth}{ 44 | {\bfseries\Large 3.3 本章小结}\vspace{6bp} 45 | 46 | \only<1>{{\scriptsize \btn{黑体 \faAngleDown} \btn{四号 \faAngleDown} \btn{\bfseries B} \btn{\faListOl} \btn{段落 \faExternalLink*} 47 | 段前 \btn{24 磅 \faSort} 段后 \btn{6 磅 \faSort} 行距 \btn{单倍行距 \faAngleDown} 特殊格式 \btn{(无) \faAngleDown}}} 48 | 49 | \only<2>{\btn{\parbox{5em}{\fbox{\bfseries 1.1 AaBb}\\{\scriptsize\centering 标题 2}}}} 50 | 51 | {\vspace{5bp}\songti\hspace{2em}本章介绍了……\vspace{5bp}} 52 | 53 | \only<1>{{\scriptsize \btn{宋体 \faAngleDown} \btn{小四 \faAngleDown} \btn{段落 \faExternalLink*} 54 | 段前 \btn{0 行 \faSort} 段后 \btn{0 行 \faSort} 行距 \btn{固定值 \faAngleDown} 设置值 \btn{20 磅 \faSort} 特殊格式 55 | \btn{首行缩进 \faAngleDown} 磅值:\btn{2 字符 \faSort}}} 56 | 57 | \only<2>{\btn{\parbox{5em}{\fbox{AaBbCcDd}\\{\scriptsize\centering 0\_缩进正文}}}} 58 | } 59 | } 60 | \caption{Word \only<2>{\link{https://shuiyuan.sjtu.edu.cn/t/topic/78768}}} 61 | \end{subfigure} 62 | \hspace{2em} 63 | \begin{subfigure}{0.4\textwidth} 64 | \scriptsize 65 | \framebox{ 66 | \parbox{\textwidth}{ 67 | \only<1>{ 68 | \cmd{newpage}\\ 69 | \cmd{fancyhead}[LH]\{上海交通大学学位论文\}\\ 70 | \cmd{fancyhead}[RH]\{第四章\cmd{quad}全文总结\}\\ 71 | \cmd{section}\{全文总结\}\\ 72 | 本文介绍了…… 73 | } 74 | \only<2>{ 75 | \cmd{chapter}\{全文总结\}\\ 76 | 本文介绍了…… 77 | } 78 | } 79 | } 80 | \vspace{10ex} 81 | \caption{\LaTeX{}} 82 | \end{subfigure} 83 | \caption{\only<1>{不}好的模板} 84 | \end{figure} 85 | 86 | \note[item]{我不太倾向于讲“Word 思维”这种东西,我认为只有好的模板 87 | 与不好的模板,把 Word 用得很麻烦大概是对 Word 了解的不够,学习 \LaTeX{} 88 | 可以帮你更好地学习 Word。} 89 | \note[item]<1>{当然,在 Word 里你也可以使用格式刷,但是我更喜欢复制粘贴。 90 | 这种方法治标不治本,一旦某一种样式需要更正,由于没有为格式添加语义标签, 91 | 所有的地方都需要重新设定格式。硬编号更是一种灾难,一旦前面有编号变动, 92 | 后面都需要变动,以及交叉引用几乎无从下手。} 93 | \note[item]<1>{以及 Word 中的多倍行距是不严谨的(详见 \pkg{zhlineskip} 宏包), 94 | 对于不同的字体会有不同的实际倍数的行距。使用磅值定义行间距是严谨的,在严肃排版中经常使用, 95 | 个人认为,是为了方便用户别去记那么多的磅值有了多倍行距这种说法,这个概念最好限定于日常使用中。} 96 | \note[item]<2>{有一位用过 \LaTeX{} 的大佬借助于 Word 域代码也搞出一个 97 | “非官方”模板,我试了一下很好用,直接使用预设好的样式就可以实现统一管理。} 98 | \end{frame} 99 | 100 | \begin{frame} 101 | \frametitle{封装的好处} 102 | 103 | \begin{itemize} 104 | \item 统一管理,同类型的样式可以被同步更改。 105 | \item<2-> 在不破坏顶层接口的情况下,无感升级底层实现。 106 | \item<4> 保持与标准类统一的接口,可以方便用户迁移内容至其他模板。 107 | \end{itemize} 108 | 109 | \begin{figure} 110 | \begin{tabular}{cl} 111 | \framebox[6em]{文档} & \cmd{chapter}\{全文总结\} \\ 112 | \framebox[6em]{接口} & \only<1>{“语义格式”}\only<2->{\cmd{chapter}} \\ 113 | \framebox[6em]{模板} & 114 | \only<1>{\texttt{.cls} 或 \texttt{.sty}}% 115 | \only<2>{\cmd{ctexset}\{\texttt{chapter/...=...}\}}% 116 | \only<3>{\cmd{ctex\_set:nn}\{\texttt{chapter}\}\{...\}}% 117 | \only<4>{$\langle\text{\cls{fduthesis 的实现}}\rangle$ \link{https://github.com/stone-zeng/fduthesis}} \\ 118 | \framebox[6em]{内核} & 119 | \only<1>{第 \ref{frame:latexiii} 页}% 120 | \only<2>{\LaTeXe{}}% 121 | \only<3->{\LaTeX3} \\ 122 | \framebox[6em]{引擎} & 123 | \only<1>{第 \ref{frame:engine} 页}% 124 | \only<2->{\hologo{XeTeX}, \hologo{LuaTeX}}% 125 | \only<3>{, (\hologo{pdfTeX})}% 126 | \only<4>{, (\hologo{pdfTeX}, Ap\TeX{})} \\ 127 | \end{tabular} 128 | \caption{封装} 129 | \end{figure} 130 | 131 | \note[item]{\SJTUThesis{} 在底层从 \LaTeXe{} 升级为 \LaTeX3 的时候, 132 | 几乎没有破坏顶层接口,用户升级模板时几乎是替换模板代码即可使用。} 133 | \note[item]{\SJTUBeamer{} 底层何时升级至 \LaTeX3?我想大概会等到 134 | \cls{beamer} 文档类底层使用 \LaTeX3 重写,或者出现了使用 \pkg{l3draw} 135 | 实现的幻灯片宏包,届时我们将迁移。} 136 | \note[item]{大部分的模板是对 \LaTeX{} 中“语义格式”的重新实现,一般存于 \texttt{.cls} 或 \texttt{.sty} 文件中。} 137 | \note[item]{对基础格式的实现一般是引擎的事情,一般称“原语”,比如如何实现加粗本身、如何读取字体文件。} 138 | \end{frame} 139 | 140 | \begin{frame} 141 | \frametitle{阅读文档} 142 | 143 | 了解一个宏包最好的方式是阅读宏包的文档。如果有多个文档备选,添加 \texttt{-l} 开关。 144 | \note{不要硬核 DIY,觉得不看说明书是一种很酷的行为,阅读文档实际上会帮你节省很多时间。} 145 | 146 | \begin{exampleblock}{\faTerminal} 147 | \ttfamily 148 | texdoc \textit{}\\ 149 | texdoc -l \textit{} 150 | \end{exampleblock} 151 | 152 | 如果你仍有问题: 153 | \begin{itemize} 154 | \item 可以考虑向 \TeX{} StackExchange \link{https://tex.stackexchange.com/} 寻找解答或提出问题。 155 | \item 中文相关的问题可以在 \CTeX{} 临时论坛 \link{https://github.com/CTeX-org/forum} 搜寻。 156 | \item 也可以在宏包文档提供的存储库内开 Discussions 或提 Issue。 157 | \item 提问时请附上最小工作案例(MWE)与日志文件。 158 | \item 模板开发常用文档列表:\link{https://github.com/ustctug/ustcthesis/wiki/参与开发} 159 | \end{itemize} 160 | 161 | \end{frame} 162 | 163 | \begin{frame}[fragile,label={frame:latexiii}] 164 | \frametitle{\LaTeXe{} 与 \LaTeX3} 165 | \begin{columns} 166 | \begin{column}{0.3\textwidth} 167 | \begin{exampleblock}{\TeX{}\hfill\texttt{texbytopic} \link{https://github.com/CTeX-org/tex-by-topic-cn}} 168 | 基础方法,提供与引擎层的直接交互。 169 | \end{exampleblock} 170 | \end{column} 171 | \begin{column}{0.6\textwidth} 172 | \begin{codeblock}[]{} 173 | \def\tempa#1{[#1]} 174 | \newcount{tempb} 175 | \end{codeblock} 176 | \end{column} 177 | \end{columns} 178 | \note<1>[item]{\TeX{} 作为最底层,提供了与引擎直接交互的原语。编写模板的话,只是偶尔用一下里面的东西,一般会有上层更好的封装。 179 | 这个东西内部机理深不可测,但是真的理解好了对于做相关工作的人来说会有帮助 180 | (知乎上看到了个研究 \TeX{} 的最后运用在了自己软件当中数学公式的排版。\link{https://www.zhihu.com/question/400835896/answer/1528269456}) 181 | 这方面的读物,\TeX{} Live 里自带的是 \pkg{texbytopic},这里链接附上的是它尚未完成的中译版。 182 | 当然,我读的更多的是 Knuth 的 The \TeX{}book \link{https://github.com/seuliang/the-texbook-cn}。} 183 | 184 | \begin{columns} 185 | \begin{column}{0.3\textwidth} 186 | \begin{alertblock}{\LaTeXe{}\hfill\texttt{latex2e.pdf} \link{https://github.com/CTeX-org/ctex-doc/blob/master/clsguide-zh-cn/clsguide-zh-cn.tex}} 187 | 目前最流行的语法版本,增强的命令检查。 188 | \end{alertblock} 189 | \end{column} 190 | \begin{column}{0.6\textwidth} 191 | \begin{codeblock}[]{} 192 | |\only<2>{\highlightline\ttfamily\cmd{makeatletter}}| 193 | \newcommand{\sjtu@tempa}[1][]{[#1]} 194 | \newcounter{tempb} 195 | |\only<2>{\highlightline\ttfamily\cmd{makeatother}}| 196 | \end{codeblock} 197 | \end{column} 198 | \end{columns} 199 | \note<1>[item]{\LaTeXe{} 是目前最广泛使用的 \LaTeX{} 版本,通过新的命令定义接口,实现对命令的额外检查(有没有定义过), 200 | 并提供可选参数的设定。近三十年来大家都在用 \LaTeXe{} 构建许多宏包。 201 | \TeX{} Live 自带的是 \pkg{latex2e},这个可能要加个 \texttt{.pdf} 才能看到,是非官方的一本百科全书。官方的 \textit{\LaTeX{} Companion} 花钱而且到现在第三版还没出来。} 202 | 203 | \begin{columns} 204 | \begin{column}{0.3\textwidth} 205 | \begin{block}{\LaTeX3\hfill\texttt{interface3} \link{https://github.com/WenboSheng/LaTeX3-doc-cn}} 206 | 显式的参数定义,标准的编程接口,未来趋势。 207 | \end{block} 208 | \end{column} 209 | \begin{column}{0.6\textwidth} 210 | \begin{codeblock}[]{} 211 | |\only<2>{\highlightline\ttfamily\cmd{ExplSyntaxOn}}| 212 | \NewDocumentCommand{\tempa}{O{}}{[#1]} 213 | \fp_new:N \l_sjtu_tempb_fp 214 | |\only<2>{\highlightline\ttfamily\cmd{ExplSyntaxOff}}| 215 | \end{codeblock} 216 | \end{column} 217 | \end{columns} 218 | \note<2>[item]{\LaTeXe{} 固然不错,但是它提供的功能还是没有那么全面:比如只能是第一个参数为可选参数,搞个键值对参数需要引入宏包; 219 | 浮点数运算仍然会丢精度,命名随意等等。这些在 \LaTeX3{} 得到了很好的解决,它提供了标准的接口,\cmd{NewDocumentCommand} 可以 220 | 非常全面,最早是 \pkg{xparse} 宏包引入的,中文翻译:\link{https://github.com/WenboSheng/LaTeX3-doc-cn/blob/master/xparse-doc-cn/xparse-cn.pdf}, 221 | 最新的 \TeX{} 发行版已经不必特别引入了。命名方面,\pkg{expl} 文档(中文翻译:\link{https://github.com/WenboSheng/LaTeX3-doc-cn/blob/master/expl3-doc-cn/expl3-cn.pdf}) 222 | 提供了 \LaTeX3 的命名规范,现在会区分全局、局部、常量,作用域,以及更多的变量类型。里面提供的 \texttt{fp} 类型的表现已经能够接近于 223 | IEEE754 标准了 \link{https://www.texdev.net/2018/12/09/floating-point-calculations-in-latex},这对于绘图来说是一个非常好的准备, 224 | 因为以前用原生的 \env{picture} 环境画一些对齐的线都费劲,因为浮点数精度都丢了。一般都需要引入浮点数的相关宏包。 225 | 这里的 \pkg{interface3} 文档提供了 \LaTeX3 内核所有接口的信息,如果你学过其他编程语言,可能这个东西会更好上手一些。} 226 | 227 | \note<2>[item]{这几种编程风格是可以在同一个文件中使用的。 228 | 对于 \LaTeXe{} 你需要使用 \cmd{makeatletter} 和 \cmd{makeatother} 来改变 @ 的字符类别,一般使用 @ 来分割命令的作用域与内容; 229 | 对于 \LaTeX3 你需要使用 \cmd{ExplSyntaxOn} 和 \cmd{ExplSyntaxOff} 来改变 \_ 和 : 的字符类别。 230 | 当然,如果是在文档类、样式文件中使用,就不必手动更改字符类别,参见 \link{https://zhuanlan.zhihu.com/p/92853481}} 231 | \end{frame} 232 | 233 | \begin{frame}[fragile] 234 | \frametitle{模板结构} 235 | 236 | \only<1-2>{模板的大致结构是接受选项;提供文档接口;传递选项给其他模块,引用其他模块的命令。} 237 | \only<2>{这样不同的模块就可以组合起来。} 238 | \only<3>{了解文档类/宏包的框架编写结构可以参见 \texttt{texdoc clsguide} \link{https://github.com/CTeX-org/ctex-doc/blob/master/clsguide-zh-cn/clsguide-zh-cn.tex}。使用有关宏包时,命令名称或略有不同。} 239 | \note<3>{请注意,可以使用不同的宏包来优化这种编写结构,所以命令形式可能在不同的情况下会略有不同。} 240 | \only<4>{\cmd{NeedsTeXFormat} 可以用来规定最低要求的 \LaTeX{} 版本。\cmd{ProvidesClass} 指明文档类的元信息:日期、版本、说明。} 241 | \only<5>{\cmd{DeclareOption} 声明文档类选项。} 242 | \only<6>{\cmd{ExecuteOption} 执行默认选项。} 243 | \only<7>{\cmd{ProcessOptions*} 执行文档传来的选项。} 244 | \only<8>{也就是引入文档类时中括号内传入的选项。} 245 | \only<9>{\cmd{LoadClass} 用来加载一个基础文档类。} 246 | \only<10>{文档类内部对接口进行声明。} 247 | \only<11>{在文档中就可以使用接口执行对应操作。} 248 | \only<12>{\cmd{PassOptionsToPackage} 用来向其他宏包传递选项。} 249 | \only<13>{\cmd{RequirePackage} 将会加载宏包并使用之前传递的选项。} 250 | \only<14>{引入其他宏包后,还可以在文档类内使用这些宏包提供的接口。} 251 | 252 | \begin{columns} 253 | \only<3-7,9-10,12-14>{\hspace*{2em}} 254 | \only<8,11>{\hspace*{-.6\textwidth}} 255 | \begin{column}<3-7,9-10,12-14>{.6\textwidth} 256 | \begin{codeblock}[]{myart.cls} 257 | |\highlightline<4>|\NeedsTeXFormat{LaTeX2e}[2020/10/01] 258 | |\highlightline<4>|\ProvidesClass{myart}[2022/12/28 v1.0 My] 259 | |\highlightline<5>|\DeclareOption{sjtu}{\def\school{SJTU}} 260 | |\highlightline<5>|\DeclareOption{fdu}{\def\school{FDU}} 261 | |\highlightline<6>|\ExecuteOptions{fdu} 262 | |\highlightline<7>|\ProcessOptions* 263 | |\highlightline<9>|\LoadClass{article} 264 | |\highlightline<10>|\newcommand{\mycmd}[1]{#1 in \school} 265 | |\highlightline<12>|\PassOptionsToPackage{\school}{myother} 266 | |\highlightline<13>|\RequirePackage{myother} 267 | |\highlightline<14>|\othercmd % provided by myother 268 | \end{codeblock} 269 | \end{column} 270 | \only<1-2,8,11>{\hspace*{-8em}} 271 | \begin{column}{.35\textwidth} 272 | \begin{figure} 273 | \centering 274 | \alt<5-8>{\highlight{选项}}{选项} \\ 275 | $\downarrow$ \\ 276 | \framebox[6em]{模板}\rlap{$\rightarrow$ \alt<10-11>{\highlight{接口}}{接口}} \\ 277 | \only<1,3-11,14>{$\downarrow$ \\ 其他模块} 278 | \only<12-13>{$\downarrow$ \\ \highlight{其他模块}} 279 | \only<2>{% 280 | \framebox[6em]{模块}\rlap{$\rightarrow$ 接口} \\ 281 | \framebox[6em]{模块}\rlap{$\rightarrow$ 接口}% 282 | } 283 | \end{figure} 284 | \end{column} 285 | \only<3-7,9-10,12-14>{\hspace*{-10em}} 286 | \begin{column}<8,11>{.5\textwidth} 287 | \begin{codeblock}[]{testmyart.tex} 288 | |\highlightline<8>|\documentclass[sjtu]{myart} 289 | \begin{document} 290 | |\highlightline<11>| \mycmd{SJTUG} 291 | \end{document} 292 | \end{codeblock} 293 | \end{column} 294 | \end{columns} 295 | 296 | \note<14>{可以使用 MCM 模板触类旁通,演示一下。} 297 | \end{frame} 298 | 299 | \begin{frame}[fragile] 300 | \frametitle{文学编程} 301 | \framesubtitle{Doc\TeX{}} 302 | 303 | \note{这两页主要是 \SJTUTeX{} 使用的开发模型,很多开发者现在已经不愿意使用 Doc\TeX{}, 304 | 因为那个可能会因注释过多加载宏包缓慢的年代已经过去了,现在的计算机性能相较于几十年前已经大幅提升。} 305 | 306 | 当代码具有规模后,丰富的注释可以让源代码更加可读,使用 Doc\TeX{} 文档来存储这些带注释的源文件,区别于部署的文档类、样式文件。 307 | 也可以排版 Doc\TeX{} 文件输出 PDF 文档以供查阅。\link{https://www.texdev.net/2009/10/06/a-model-dtx-file/} 308 | 309 | \begin{columns} 310 | \begin{column}{.4\textwidth} 311 | \begin{figure} 312 | \centering 313 | \btn{\ttfamily sjtutex.dtx}\\ 314 | $\swarrow$ \quad $\downarrow$ \quad $\downarrow$ \quad $\searrow$\\ 315 | \btn{\ttfamily .ins} \btn{\ttfamily .cls} \btn{\ttfamily .cfg} \btn{\ttfamily .def} \\[0.5ex] 316 | {\small 安装文件 文档类 \quad 辅助文件 \hspace*{2em}} 317 | \caption{\SJTUTeX{} 解包示意图} 318 | \end{figure} 319 | \end{column} 320 | \begin{column}{.5\textwidth} 321 | \begin{exampleblock}{\faTerminal} 322 | \ttfamily 323 | {\color{gray} \# SJTUTeX 封装了 ins 至 dtx 内部,可以自解包} \\ 324 | xetex sjtutex.dtx \\ 325 | {\color{gray} \# SJTUBeamer 使用了额外的 ins 文件引导解包}\\ 326 | xetex beamerthemesjtubeamer.ins \\ 327 | \end{exampleblock} 328 | 329 | \end{column} 330 | \end{columns} 331 | 332 | \note{Jupyter Notebook 也是一种文学编程,将代码生成文档的相关工具(比如 Sphinx)也属于文学编程。} 333 | 334 | \end{frame} 335 | 336 | \begin{frame} 337 | \frametitle{工程管理} 338 | \framesubtitle{l3build} 339 | 340 | \begin{columns} 341 | \begin{column}{.3\textwidth} 342 | \includegraphics[scale=0.9]{support/figures/beamerdir.pdf} 343 | \end{column} 344 | \begin{column}{.6\textwidth} 345 | \pkg{l3build} \link{https://github.com/latex3/l3build} 是辅助 \TeX{} 宏包开发的 Lua 脚本集合,可以用来进行工程管理、项目测试。\texttt{build.lua} 用于配置工程。 346 | 347 | \begin{description} 348 | \small 349 | \item[\ttfamily l3build unpack] 将 \texttt{source/} 中的源文件解包至 \texttt{build/unpacked},产物文件移至 \texttt{build/local}。 350 | \item[\ttfamily l3build doc] 编译定义在 \texttt{doc/} 中的文档,同时移进 \texttt{build/doc} 中的还有 \texttt{support/}。 351 | \item[\ttfamily l3build check] 对 \texttt{testfiles/} 中的文件回归测试。 352 | \item[\ttfamily l3build ctan] 执行上述所有流程,输出部署结果至 \texttt{build/distrib},生成 \texttt{*-ctan.zip} 压缩文件。\link{https://tug.org/tds/} 353 | \item[\ttfamily l3build install] 将解包后的文件安装至 \TeX{} Live,MiK\TeX{} 需要指定 \texttt{--texmfhome} 参数。新安装时需要刷新文件名数据库。 354 | \end{description} 355 | \end{column} 356 | \end{columns} 357 | 358 | \note{以前使用 Doc\TeX{} 文件的时候,\TeX{} 宏包开发喜欢单文件一把梭。但是对于复杂的项目,单文件的开发总会让代码定位变得复杂。 359 | 现在 \TeX{} 社区有了 l3build 这个统一框架用来管理多文件模块,特别地,它提供了回归测试工具。 360 | 361 | *-ctan.zip 中可以包含 .tds.zip,可以放在 \TeX{} 发行版的 TDS (\TeX{} Directory Structure) 文件目录下,之后刷新文件名数据库。 362 | 363 | 学完这些,你大概就可以看懂(can read)源代码,做出给自己使用的“宏包”了,甚至是一个“模板”: 364 | 可以使用 \LaTeX3 语法不用费心的处理数据,l3build 管理工程。 365 | 但是距离做出能够传上 CTAN 的通用宏包还有很长的一段距离,因为如果为了解决一个实际的 \TeX{} 需求, 366 | 你可能还需要阅读其他宏包的接口与源码,并做出一些 hack 出来, 367 | 甚至还要了解一些其他领域的知识:比如字体、图形、PDF 编码的相关知识。 368 | 所以编写模板大概只是 \TeX{} 知识中很小的一部分,我也只是有这样的水平,所以就先讲这么多吧。} 369 | 370 | \end{frame} 371 | -------------------------------------------------------------------------------- /support/contents/visualization.tex: -------------------------------------------------------------------------------- 1 | % !TeX root = ../../latex-talk.tex 2 | 3 | \part{像模像样 \LaTeX{}} 4 | 5 | \section{\TikZ{}} 6 | 7 | \begin{frame} 8 | \frametitle{绘何物为\footnote{中文译者 Hansimov \link{https://github.com/Hansimov/pgfmanual-zh},中文拼音 Hu\`i \textbf{h}\'e w\textbf{\`u} w\'e\textbf{i}。}} 9 | 10 | \note[item]{中文译名来自 Hansimov 看起来已经弃坑的《\TikZ{} \& \textsc{pgf} 中文手册》,可以催催他继续翻译这一千多页的大部头!} 11 | 12 | \begin{description} 13 | \item[\TikZ{}] (\alert{T}i\textit{k}Z \alert{i}st \textit{\alert{k}ein} \alert{Z}eichenprogramm\footnote{中文含义是“\TikZ{} 不是一个绘图程序”,德文跟随 \textbf{G}NU's \textbf{N}ot \textbf{U}nix! 传统。}) 定义了一些 \TeX{} 中的绘图命令,基础语法神似矢量字体设计语言 \hologo{METAFONT} 指令。 14 | \item[\pgf{}] (\alert{p}ortable \alert{g}raphics \alert{f}ormat\note[item]{pgf 很像 PDF 的全称:\textbf{p}ortable \textbf{d}ocument \textbf{f}ormat。}) 组成了 \TikZ{} 的基本层。\cls{beamer} 的一些机制也是基于此底层实现的。 15 | \end{description} 16 | 17 | \begin{figure} 18 | \includegraphics[width=0.75\textwidth]{support/figures/tikzlings.pdf} 19 | \caption{\TikZ{}lings 绘制的小动物 \link{https://github.com/samcarter/tikzlings}} 20 | \end{figure} 21 | 22 | \note[item]{最主要的用途是编程式输出矢量图形。} 23 | 24 | \note[item]{\LaTeX3 中的 \texttt{l3draw} \link{https://github.com/latex3/latex3/tree/main/l3experimental/l3draw} 妄图统一这种绘图宏包,目前仍处于实验阶段。} 25 | \end{frame} 26 | 27 | \begin{frame}[fragile,label=tikz] 28 | \frametitle{引入 \TikZ{}} 29 | \begin{columns} 30 | \begin{column}{0.4\textwidth} 31 | 32 | \only<1>{ 33 | 可以直接在文档导言区使用 \TikZ{} 包 \link{https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/base/doc/pgfmanual.pdf},或者采用 \cls{standalone} 文档类。 34 | 35 | \note[item]{如果需要使用中文,还需要添加 \pkg{ctex} 宏包。} 36 | } 37 | 38 | \only<2>{ 39 | 引入 \TikZ{} 后,使用 \env{tikzpicture} 环境开始绘制。 40 | } 41 | 42 | \only<3>{ 43 | \TikZ{} 命令需要以分号结尾。\cmd{node} 命令用于创建节点,还可以为该节点标记标签以便后续引用。 44 | } 45 | 46 | \only<4>{ 47 | \cmd{draw} 用来描边,\opt{edge} 用来指示这是一条线段,参数 \opt{->} 用来说明这是一个箭头。紧随其后可以添加线段上的节点,\opt{above}, \opt{below}, \opt{left}, \opt{right} 可以用来指示相对位置。 48 | } 49 | 50 | \only<5>{ 51 | \opt{draw} 参数用于对节点描边。 52 | } 53 | 54 | \begin{center} 55 | \begin{tikzpicture} 56 | \only<1-4>{ 57 | \node (v1) at (0,0) {\only<3>{\color{red}}$x$}; 58 | \node (v2) at (1,0) {\only<3>{\color{red}}$a$}; 59 | } 60 | \only<5>{ 61 | \node[draw] (v1) at (0,0) {\only<3>{\color{red}}$x$}; 62 | \node[draw] (v2) at (1,0) {\only<3>{\color{red}}$a$}; 63 | } 64 | \only<1-3,5>{\draw[->] (v1) edge node [above] {$z$} (v2);} 65 | \only<4>{\draw[->,red] (v1) edge node [above,red] {$z$} (v2);} 66 | \end{tikzpicture} 67 | \end{center} 68 | \end{column} 69 | \begin{column}{0.6\textwidth} 70 | \begin{codeblock}[]{使用 \TikZ{}} 71 | |\highlightline<1>|\documentclass[tikz]{standalone} 72 | \begin{document} 73 | |\highlightline<2>|\begin{tikzpicture} 74 | |\highlightline<3,5>| \node|\only<5>{[draw]}| (v1) at (0,0) {$x$}; 75 | |\highlightline<3,5>| \node|\only<5>{[draw]}| (v2) at (1,0) {$a$}; 76 | |\highlightline<4>| \draw (v1) edge[->] 77 | |\highlightline<4>| node [above] {$z$} (v2); 78 | |\highlightline<2>|\end{tikzpicture} 79 | |\phantom{}|\end{document} 80 | \end{codeblock} 81 | \end{column} 82 | \end{columns} 83 | \end{frame} 84 | 85 | \begin{frame}[fragile] 86 | \frametitle{\only<1-3>{循环}\only<4>{样式}} 87 | \begin{columns} 88 | \begin{column}{0.4\textwidth} 89 | 90 | \only<1>{ 91 | \begin{figure} 92 | \centering 93 | \includegraphics[height=0.6\textheight]{support/figures/neural.pdf} 94 | \end{figure} 95 | 96 | \note{绘制神经网络图像可能是非常适合 \TikZ{} 干的事情了,你说用 PowerPoint 繁琐的线段连接估计需要借助插件才能比较方便地实现。使用其他非编程性绘图工具都是比较头疼的事情。} 97 | } 98 | 99 | \only<2-3>{ 100 | 101 | \pgf{} 提供 \cmd{foreach} 用来创建循环体,以绘制繁琐且结构类似的图。 102 | 103 | \vspace{4ex} 104 | 105 | \onslide<3>{ 106 | \cmd{foreach} 可以嵌套使用。实际上 \cmd{foreach} 也可以接受多个参数的同时迭代,\cmd{foreach} \cmd{x}/\cmd{y} in \{1/2,2/3,3/4\} \{循环体\}。 107 | } 108 | } 109 | 110 | \only<4>{ 111 | \TikZ{} 提供 \cmd{tikzstyle} 命令用于设定一个样式别称。\note{类似于 HTML 中的 class 然后通过 CSS 设定样式。}之后的节点或者边就可以直接套用该样式。 112 | 113 | \note{更多方法参见手册,内容非常多。} 114 | } 115 | 116 | \end{column} 117 | \begin{column}{0.6\textwidth} 118 | \begin{codeblock}[basicstyle=\ttfamily\scriptsize]{神经网络} 119 | \documentclass[tikz]{standalone} 120 | \begin{document} 121 | \begin{tikzpicture} 122 | |\highlightline<4>|\tikzstyle{neuron}=[circle,draw,minimum width=1cm]; 123 | |\highlightline<2>|\foreach \x in {1,...,5} { 124 | |\highlightline<4>| \node[neuron] (a\x) at (0,-2*\x) {$a_{1\x}$}; 125 | } 126 | \foreach \y in {1,...,4} { 127 | |\highlightline<4>| \node[neuron] (b\y) at (3,-1-2*\y) {$a_{2\y}$}; 128 | } 129 | |\highlightline<3>|\foreach \x in {1,...,5} { 130 | |\highlightline<3>| \foreach \y in {1,...,4} { 131 | \draw (a\x) edge (b\y); 132 | } 133 | } 134 | \end{tikzpicture} 135 | \end{document} 136 | \end{codeblock} 137 | \end{column} 138 | \end{columns} 139 | \end{frame} 140 | 141 | \begin{frame}[fragile] 142 | \frametitle{思维导图} 143 | \begin{columns} 144 | \begin{column}{0.4\textwidth} 145 | 还可以通过 \cmd{usetikzlibrary} 调用内置库来绘制更多类型的图像。 146 | 比如 \pkg{mindmap} 可以用来绘制思维导图 \link{https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/base/doc/images/pgfmanual-mindmap-1.pdf}。 147 | 148 | \note{声明该 \env{tikzpicture} 为 \opt{mindmap} 类型,并使用 \opt{child} 指示子级,一个父级可以跟多个子级,子级可以嵌套子级。\opt{grow} 参数用来指示旋转角度,最后需要用分号结束。如果不想手动设定旋转角度,还可以在整幅图上使用 \opt{grow cyclic} 参数,如果想要实现这个链接所实现的效果,建议查看 \pgf{} 手册的 Tutorial 部分。} 149 | 150 | \begin{figure} 151 | \centering 152 | \includegraphics[height=0.35\textheight]{support/figures/mindmap.pdf} 153 | \caption{\ttfamily \pkg{mindmap} (tikzlibrary)} 154 | \end{figure} 155 | \end{column} 156 | \begin{column}{0.6\textwidth} 157 | \begin{codeblock}[]{\pkg{mindmap} 框架} 158 | \documentclass[tikz]{standalone} 159 | |\highlightline|\usetikzlibrary{mindmap} 160 | \begin{document} 161 | \begin{tikzpicture}[mindmap, concept color=blue] 162 | \node [concept] {Parent} 163 | child [concept color=gray, grow=150] { 164 | node [concept] {Child1}} 165 | child [concept color=gray, grow=0] { 166 | node [concept] {Child2}}; 167 | \end{tikzpicture} 168 | \end{document} 169 | \end{codeblock} 170 | \end{column} 171 | \end{columns} 172 | 173 | \note{\pkg{mindmap} 库是 \TikZ{} 中非常 iconic 的一个库。文档中专门有一个例子来展示这个功能。} 174 | \end{frame} 175 | 176 | \begin{frame} 177 | \frametitle{\TikZ{}Edt} 178 | \includeinlinelogo{support/images/tikzedt.png} \TikZ{}Edt \link{http://www.tikzedt.org/} 是一款半图形化的即时绘图编辑器,在 \faWindows{} 上工作较好。 179 | 180 | \begin{columns} 181 | \begin{column}{0.4\textwidth} 182 | \begin{itemize} 183 | \item 善用工具栏功能 \link{http://www.tikzedt.org/doc.html} 184 | 185 | \includegraphics[width=\linewidth]{support/images/tooltip.png} 186 | \item 开始时会提示生成缩略图 187 | 188 | {\tiny Compilation $\blacktriangleright$ Compile snippet thumbnails} 189 | \item 如果有时编译不成功了,尝试重新预编译头 190 | 191 | {\tiny Compilation $\blacktriangleright$ (Re-)Generate precompiled headers} 192 | \item 可以更改头文件 193 | 194 | {\tiny Settings $\blacktriangleright$ Settings $\blacktriangleright$ Compiler} 195 | \end{itemize} 196 | \end{column} 197 | \begin{column}{0.6\textwidth} 198 | \begin{figure} 199 | \centering 200 | \includegraphics[height=0.5\textheight]{support/images/tikzedtui.jpg} 201 | \caption{\TikZ{}Edt 界面} 202 | \end{figure} 203 | \end{column} 204 | \end{columns} 205 | 206 | \note[item]{框架基于 Windows Presentation Foundation (WPF),代码开源于 Google Code。2014 年,该项目伴随着这个开源代码平台的终结也开发停止,作者跑路。其适配的 \faApple{} 版本由于跟不上 Mac OS 的更新似乎不再可用,在 \faLinux{} 上更趋向于一种模拟。本人希望在未来有空的时候将其从 .NET Framework 迁移到 .NET Core 上,修改一些脚本文件,以原生跨平台,主要看微软在迁移层面的表现(一般挺好)(本人也对 WPF 较为熟悉,但是这个框架也已慢慢地 deprecated,很多年前是比较流行的,主要这个是 \faWindows{} 专有框架)。} 207 | 208 | \note[item]{\faLinux{}\faApple{} 用户可能本身就更熟悉代码编写的方式,或者转向 Inkscape,以及希望 \TeX{}\textsc{macs} 越来越好(其自带的绘图编辑器看起来也很优秀),这样就可以直接所见即所得了。} 209 | \end{frame} 210 | 211 | \section{PGFPlots} 212 | 213 | \begin{frame}[fragile] 214 | \frametitle{PGFPlots} 215 | \begin{columns} 216 | \begin{column}{0.4\textwidth} 217 | 218 | \only<1>{ 219 | \pgfplots{} \link{https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf} 是 \pgf{}/\TikZ{} 的衍生宏包,用于生成高质量中等数据规模的统计图。 220 | 221 | \begin{center} 222 | \includegraphics[width=0.75\textwidth]{support/figures/pgfplots.pdf} 223 | \end{center} 224 | } 225 | 226 | \only<2>{ 227 | 引入 \pgfplots{} 包,然后通过 \cmd{pgfplotsset} 设定版本和其他全局设定。 228 | } 229 | 230 | \only<3>{ 231 | \env{axis} 环境用于插入 \pgfplots{} 统计图。 232 | } 233 | 234 | \only<4>{ 235 | \cmd{addplot} 命令用于新建一个数据序列,其后不跟类型的情况下为关于 $x$ 的函数图像。 236 | 237 | \begin{table} 238 | \centering 239 | \footnotesize 240 | \begin{tabular}{>{\ttfamily}ll} 241 | \cmd{addplot} & 函数 \\ 242 | \cmd{addplot} coordinates & 坐标点 \\ 243 | \cmd{addplot} table & 文件表格 \\ 244 | \end{tabular} 245 | \end{table} 246 | } 247 | 248 | \only<5>{ 249 | \cmd{legend} 用于创建图例,使用逗号分隔每个序列的名称。 250 | } 251 | 252 | \end{column} 253 | \begin{column}{0.6\textwidth} 254 | 255 | \begin{codeblock}[]{使用 \pgfplots{}} 256 | \documentclass[tikz]{standalone} 257 | |\highlightline<2>|\usepackage{pgfplots} 258 | |\highlightline<2>|\pgfplotsset{compat=newest} 259 | \begin{document} 260 | |\highlightline<3>|\begin{axis} 261 | |\highlightline<4>| \addplot {x^2}; 262 | |\highlightline<5>| \legend{data,}; 263 | |\highlightline<3>|\end{axis} 264 | |\phantom{}|\end{document} 265 | \end{codeblock} 266 | 267 | \end{column} 268 | \end{columns} 269 | \end{frame} 270 | 271 | \begin{frame}[fragile] 272 | \frametitle{PGFPlotsTable} 273 | 274 | \begin{columns} 275 | \begin{column}{0.4\textwidth} 276 | 277 | \only<1>{ 278 | \pgfplotstable{} \link{https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/contrib/pgfplots/doc/pgfplotstable.pdf} 是用于数据处理的子包,可以用来从文件排印表格。 279 | 280 | \begin{center} 281 | \includepdflarge{support/examples/pgfplotstable.pdf} 282 | \end{center} 283 | } 284 | 285 | \only<2>{ 286 | \cmd{pgfplotstableset} 用于设定全局设置。这里设定了默认使用 CSV 文件,表格采用标准三线表格式。 287 | 288 | \begin{block}{\faInfo{}} 289 | SJTUBeamer 已经预先设置了这些格式。 290 | \end{block} 291 | } 292 | 293 | \only<3>{ 294 | \cmd{pgfplotstabletypeset} 用于从文件排印表格。这样你的 CSV 文件就可以通过 Excel 软件编辑与处理。 295 | \note{又一层内容与格式分离!} 296 | 297 | \begin{block}{\faExclamationTriangle} 298 | 含有中文内容的表格需要使用 \hologo{XeLaTeX} 编译! 299 | \end{block} 300 | } 301 | 302 | \end{column} 303 | \begin{column}{0.6\textwidth} 304 | 305 | \begin{codeblock}[]{使用 \pgfplotstable{}} 306 | \documentclass{ctexart} 307 | \usepackage{booktabs} 308 | |\highlightline<1>|\usepackage{pgfplotstable} 309 | \pgfplotsset{compat=newest} 310 | |\highlightline<2>|\pgfplotstableset{ 311 | col sep=comma, 312 | every head row/.style={before row=\toprule,after row=\midrule}, 313 | every last row/.style={ 314 | after row=\bottomrule}, 315 | } 316 | \begin{document} 317 | |\highlightline<3>| \pgfplotstabletypeset[]{data.csv} 318 | |\phantom{}|\end{document} 319 | \end{codeblock} 320 | 321 | \end{column} 322 | \end{columns} 323 | 324 | \end{frame} 325 | 326 | \begin{frame} 327 | \frametitle{PGFPlotsEdt} 328 | \includeinlinelogo{support/images/pgfplotsedt.pdf} PGFPlotsEdt \link{https://logcreative.github.io/PGFPlotsEdt/?lang=cn} 是一款基于 \pgfplots{} 的统计绘图编辑器,基于 \faVuejs{} 开发。 329 | 330 | \begin{columns} 331 | \begin{column}{0.4\textwidth} 332 | \begin{itemize} 333 | \item 顶部按钮提供了一些示例。 334 | \item 推荐首先在设定中设置好参数(比如三维)。 335 | \item 可以设置坐标系相关样式。 336 | \item 直接按下 \faExclamationTriangle{} 手动编辑代码。 337 | \note{按下没有回头路。因为回头路我没做好。} 338 | \end{itemize} 339 | \end{column} 340 | \begin{column}{0.6\textwidth} 341 | \begin{figure} 342 | \centering 343 | \includegraphics[height=0.4\textheight]{support/images/pgfplotsedtui.jpg} 344 | \caption{PGFPlotsEdt 界面} 345 | \end{figure} 346 | \end{column} 347 | \end{columns} 348 | 349 | \note{当年是想做个跟 \TikZ{}Edt 类似的软件,用于快速生成统计图代码。也想过使用 Qt 写,当然后面放弃了,转向编写网页应用。当时本人还没有什么服务器,就写了个纯前端。} 350 | 351 | \note{我为什么后来想翻译 Learn\LaTeX{}.org,也是因为我看到了它使用的编辑器框架与轻量级编译服务,非常适合用来开发小型软件,PGFPlotsEdt 也就是这个思想的实践。} 352 | \end{frame} 353 | 354 | \begin{frame} 355 | \frametitle{PGFPlotsEdt 帮助我完成物理实验报告图...} 356 | \begin{columns} 357 | \begin{column}{0.25\textwidth} 358 | \includegraphics[width=\linewidth]{support/pgfplots/a.pdf} 359 | \includegraphics[width=\linewidth]{support/pgfplots/b.pdf} 360 | \end{column} 361 | \begin{column}{0.50\textwidth} 362 | \includegraphics[width=\linewidth]{support/pgfplots/c.pdf} 363 | \begin{columns} 364 | \begin{column}{0.5\linewidth} 365 | \includegraphics[width=\linewidth]{support/pgfplots/d.pdf} 366 | \end{column} 367 | \begin{column}{0.5\linewidth} 368 | \includegraphics[width=\linewidth]{support/pgfplots/e.pdf} 369 | \end{column} 370 | \end{columns} 371 | \end{column} 372 | \begin{column}{0.25\textwidth} 373 | \includegraphics[width=\linewidth]{support/pgfplots/f.pdf} 374 | \includegraphics[width=\linewidth]{support/pgfplots/g.pdf} 375 | \end{column} 376 | \end{columns} 377 | \end{frame} 378 | 379 | \begin{frame} 380 | \frametitle{更多可能} 381 | 382 | \begin{columns} 383 | \begin{column}{0.58\textwidth} 384 | \begin{itemize} 385 | \item \TikZ{} 还内置很多的库可供使用! 386 | \item \TikZ{} 还有很多的衍生库可供使用! 387 | \note[item]{不只是 \pgfplots{}。} 388 | \item 推荐使用 \cls{standalone} 文档类编译再插入。 389 | \item 内存不足时需要使用 \hologo{LuaLaTeX} 编译。 390 | \note[item]{\hologo{LuaLaTeX} 使用了动态内存。之前的一个分形图就是因为需要大量的内存需要 \hologo{LuaLaTeX} 编译。} 391 | \item 使用 \pkg{external} 库缓存也是可行的。 392 | \item 更多内容请见手册\footnotemark。 393 | \end{itemize} 394 | \end{column} 395 | \begin{column}{0.42\textwidth} 396 | \begin{figure} 397 | \begin{tikzpicture}[scale=0.7,every node/.style={scale=0.7}] 398 | \node[draw,fill=white] (v1) at (-1.5,0) {\includegraphics[scale=0.7]{support/figures/tkzeuclide.pdf}}; 399 | \node[draw,fill=white] at (1.5,-2) {\includegraphics[scale=0.3]{support/figures/circuitikz.pdf}}; 400 | \node[draw,fill=white] at (-1.5,-3) {\includegraphics[scale=0.3]{support/figures/automata.pdf}}; 401 | \end{tikzpicture} 402 | \caption{\ttfamily tkz-euclide \link{http://mirrors.sjtug.sjtu.edu.cn/CTAN/macros/latex/contrib/tkz/tkz-euclide/doc/tkz-euclide.pdf}, circuitikz \link{https://mirrors.sjtug.sjtu.edu.cn/CTAN/graphics/pgf/contrib/circuitikz/doc/circuitikzmanual.pdf}, automata (tikzlibrary)} 403 | \end{figure} 404 | \end{column} 405 | \end{columns} 406 | 407 | \footnotetext{(中文版)\LaTeX{} 工作室. 408 | \TikZ{} \& \pgf{} 手册 (3.1.5b) 笔记[EB/OL]. 409 | 2020. \link{https://www.latexstudio.net/archives/51804.html}} 410 | 411 | \note[item]{看文档需要使用 texdoc pgf,这个笔记大略翻译了很多内容。\LaTeX{} 工作室的网站上也有很多 \TikZ{} 的 fancy 内容,感兴趣的可以参考。} 412 | 413 | \note[item]{可以做的很 fancy,也可以用它很基本的功能。因为有一种职业叫科技绘图,这种图形约是符合要求的矢量图。\TikZ{} 的意义在于提供了一种 inline 绘图的方式,有助于管理工程,过早优化万恶之源,这样的方式有助于减少重新绘制的可能。} 414 | 415 | \end{frame} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public licenses. 411 | Notwithstanding, Creative Commons may elect to apply one of its public 412 | licenses to material it publishes and in those instances will be 413 | considered the “Licensor.” The text of the Creative Commons public 414 | licenses is dedicated to the public domain under the CC0 Public Domain 415 | Dedication. Except for the limited purpose of indicating that material 416 | is shared under a Creative Commons public license or as otherwise 417 | permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the public 425 | licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | --------------------------------------------------------------------------------