diff --git a/md_version/main.md b/md_version/main.md index 19f9dcd..3e98617 100644 --- a/md_version/main.md +++ b/md_version/main.md @@ -193,9 +193,27 @@ You can easily represent formal proofs using \LaTeX's ebproof or bussproof packa \end{prooftree} \end{center} -# Figures, Tables, (Code) Listings and Landscape Pages +# Inserting PDFs, Figures, Tables and (Code) Listings -## Figures +## Inserting PDFs + +PDF documents can be inserted using `pdfpages`'s `\includepdf` command. +For commodity, a `\modifiedincludepdf` is provided: + +```tex +\modifiedincludepdf{options for includepdf}% + {label}% + {full path to the document}% + {title of the document}% + {"level" (e.g., section, subsection, etc.)} +``` + +Note that using `label.x` will refer to the page `x` of the inserted document (starting with 1): refer to the source code of this current document for an example usage. +We insert [in the following pages](#pdf:Gluck13) (p. \pageref{pdf:Gluck13.1}--\pageref{pdf:Gluck13.9}) an article as an example of PDF insertion. + +\modifiedincludepdf{}{pdf:Gluck13}{pdf/simulation_of_two_ways_pushdown_automata_revisited.pdf}{A paper proving concisely a result in automata theory that helped solve a real programming problem~\cite{DBLP:journals/corr/Gluck13}}{subsection} + +## Inserting Figures Markdown only ~ You can easily insert [images and figures](https://pandoc.org/MANUAL.html#images) using Pandoc, as in \autoref{fig:d_un_autre_age}, a painting by [Jérôme Minard](http://jeromeminard.com/travaux/) under [copyleft](https://forceg.jimdofree.com/licence-art-libre/). @@ -203,7 +221,7 @@ Markdown only ![_D'un autre âge_\label{fig:d_un_autre_age}](pictures/D_un_autre_age.jpg){width=80%} -## Tables +## Inserting Tables Markdown only ~ You can write tables using [pandoc's syntax*es*](https://pandoc.org/MANUAL.html#tables), as in Tables \ref{tbl:demo1}, \ref{tbl:demo2} and \ref{tbl:demo3} (all borrowed from ). @@ -241,7 +259,7 @@ Markdown only +---------------+---------------+--------------------+ : The price and advantages of fruits \label{tbl:demo3} -## Code Listings +## Inserting Code Listings Code is displayed using the listings package. Check the "Table 1: Predefined languages" of the listings package documentation to see the list of supported languages by default. @@ -278,7 +296,7 @@ for num in {000..2}; do echo "$num"; done \lstinputlisting[language=C, caption={"\emph{Hello World}" in C}, label={lst:demo3}]{code/hello_world.c} -## Landscape Pages +# Landscape Pages You can obtain landscape pages using the landscape package in \LaTeX. diff --git a/md_version/main.pdf b/md_version/main.pdf index 4164477..7efcb9c 100644 Binary files a/md_version/main.pdf and b/md_version/main.pdf differ diff --git a/md_version/makefile b/md_version/makefile index 4f2a6a0..69ee630 100644 --- a/md_version/makefile +++ b/md_version/makefile @@ -37,6 +37,6 @@ clean: tex: main.md @pandoc $(PANDOC_OPTIONS) -s $< -o main.tex @mkdir -p ../tex_version/ - @cp -r main.tex fonts/ references/ pictures/ code/ ../tex_version/ + @cp -r main.tex fonts/ references/ pictures/ pdf/ code/ ../tex_version/ @echo "Your .tex version is available at ../tex_version/. Compile with latexmk -pdf -xelatex main.tex" diff --git a/md_version/pdf/simulation_of_two_ways_pushdown_automata_revisited.pdf b/md_version/pdf/simulation_of_two_ways_pushdown_automata_revisited.pdf new file mode 100644 index 0000000..6f73c6f Binary files /dev/null and b/md_version/pdf/simulation_of_two_ways_pushdown_automata_revisited.pdf differ diff --git a/md_version/references/references.bib b/md_version/references/references.bib index 4a26cec..ee53d94 100644 --- a/md_version/references/references.bib +++ b/md_version/references/references.bib @@ -13,3 +13,24 @@ @online{gradschool_policies url = {https://www.augusta.edu/gradschool/student-resources.php}, urldate = {2021-11-01} } +@inproceedings{DBLP:journals/corr/Gluck13, + author = {Robert Gl{\"{u}}ck}, + editor = {Anindya Banerjee and + Olivier Danvy and + Kyung{-}Goo Doh and + John Hatcliff}, + title = {Simulation of Two-Way Pushdown Automata Revisited}, + booktitle = {Semantics, Abstract Interpretation, and Reasoning about Programs: + Essays Dedicated to David A. Schmidt on the Occasion of his Sixtieth + Birthday, Manhattan, Kansas, USA, 19-20th September 2013}, + series = {{EPTCS}}, + volume = {129}, + pages = {250--258}, + year = {2013}, + url = {https://doi.org/10.4204/EPTCS.129.15}, + doi = {10.4204/EPTCS.129.15}, + timestamp = {Sun, 02 Jun 2019 20:54:28 +0200}, + biburl = {https://dblp.org/rec/journals/corr/Gluck13.bib}, + bibsource = {dblp computer science bibliography, https://dblp.org} +} + diff --git a/md_version/templates/head_c.tex b/md_version/templates/head_c.tex index 48d5c01..8cd779f 100644 --- a/md_version/templates/head_c.tex +++ b/md_version/templates/head_c.tex @@ -36,9 +36,9 @@ \normalsize } -%%%%% -% Emoji support for latex -%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Emoji support for latex % +%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[verbose]{newunicodechar} @@ -297,3 +297,63 @@ % We recommend using the more modern ebproof over % the more "traditional" bussproofs, \usepackage{ebproof} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Nice frames, for the documents we will be including % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\usepackage[breakable]{tcolorbox} % Will be used for frame around included documents. +% https://tex.stackexchange.com/a/66156 +\DeclareRobustCommand\titleforcurrentframe{temp} % Title for the current page of the frame. +% This macro is re-defined in \modifiedincludepdf +% and \modifiedincludetxt +\newcommand{\mybox}[1]{% + \begin{tcolorbox}[ + colframe=augustablue, + colback=white, + width={\dimexpr\textwidth}, + breakable, + adjusted title={\hypersetup{citecolor=white}\titleforcurrentframe} + ] + #1 + \end{tcolorbox} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Commands to include pdf % +%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\usepackage{pdfpages} +% https://tex.stackexchange.com/questions/198091/get-number-of-pages-of-external-pdf/198095#198095 +\newcommand*{\numberofpages}[1]{% + \the\XeTeXpdfpagecount"#1" % +} + +% Counter to add label to individual pages of the pdf. +% https://tex.stackexchange.com/a/25113 +\newcounter{currentpagecounter} +\newcounter{totaldocpages} +% Command to include pdf document. +% Usage: +% \modifiedincludepdf{options for includepdf}{label}{full path to the document}{title of the document}{"level" (e.g., section, subsection, etc.)} +\newcommand{\modifiedincludepdf}[6]{ + \let\fbox\mybox % includepsf, with the option "frame", use \fbox + % to draw the frame. We change the command, to use + % our custom frame, that uses tcolorbox. + \setcounter{currentpagecounter}{0} + \setcounter{totaldocpages}{\numberofpages{#3}} + \renewcommand{\titleforcurrentframe}{#4 (p.\ \thecurrentpagecounter\ / \thetotaldocpages) \hfill #6} % #6 acts as a subtitle + \includepdf[#1,% + width=\textwidth,% + pages=-,% + frame, + clip, + pagecommand={ + \stepcounter{currentpagecounter} % We increment the counter for the number of pages. + \label{#2.\thecurrentpagecounter}% We add a label of the form "label.pagenumber". + }, + link = true, + linkname = {#2}, + addtotoc={1, #5, 1, #4, #2} % We add an entry to the table of content. + ]{#3} +} diff --git a/readme.md b/readme.md index 958361c..7f038f8 100644 --- a/readme.md +++ b/readme.md @@ -81,6 +81,7 @@ Please, refer to the [Thesis/PhD Dissertation Preparation Booklet](https://www.a - This template uses and redistributes the [TeX Gyre Termes](http://www.gust.org.pl/projects/e-foundry/tex-gyre/termes) font (version 2.004), placed under the [GUST Font License](https://tug.org/fonts/licenses/GUST-FONT-LICENSE.txt), which is an extension of the [The LaTeX Project Public License](https://www.latex-project.org/lppl.txt). - This template uses and redistributes the [Symbola](http://web.archive.org/web/20180307012615/http://users.teilar.gr/~g1951d/Symbola.zip) font (version 10.24), which is "free for any use". - The file code/hello_world.c is courtesy of Brian Kernighan. +- The file pdf/simulation_of_two_ways_pushdown_automata_revisited.pdf is courtesy of Robert Glück and under Creative Commons Attribution License. - The file pictures/D_un_autre_age.jpg is courtesy of [Jérôme Minard](http://jeromeminard.com/travaux/) and under [copyleft](https://forceg.jimdofree.com/licence-art-libre/). - Unless otherwise noted, this template is under [Creative Commons Attribution 4.0 International](LICENSE.md). - © [Our contributors](https://github.com/the-au-forml-lab/au_ccs_dissertation_template/graphs/contributors), 2021-2025