Skip to content

Commit

Permalink
Add examples of using pandoc-secnos
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesOwers committed Jan 16, 2021
1 parent bc414eb commit 9b87737
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
Binary file modified output/thesis.docx
Binary file not shown.
4 changes: 2 additions & 2 deletions output/thesis.html
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ <h2 data-number="1.3" id="summary-of-chapters"><span class="header-section-numbe
For bold, add ** on either side of the text
For bold and italic, add _** on either side of the text
-->
<p>This is a brief outline of what went into each chapter, and a section which shows how to reference headers (which are labelled automatically for you). <strong><a href="#introduction-with-a-citation">Chapter 1</a></strong> shows how to use citations and how to reference section headers. <strong><a href="#literature-review-with-maths">Chapter 2</a></strong> shows how use and reference equations. <strong><a href="#first-research-study-with-code">Chapter 3</a></strong> shows how to use and reference code. <strong><a href="#research-containing-a-figure">Chapter 4</a></strong> shows how to use, reference, and resize pdf and jpg figures. <strong><a href="#research-containing-a-table">Chapter 5</a></strong> shows how to use and reference tables. <strong><a href="#final-research-study">Chapter 6</a></strong> is truly revolutionary (but shows nothing functional). <strong><a href="#appendix-1-some-extra-stuff">Appendix 1</a></strong> shows how to add chapters which are not numbered, as does <strong><a href="#appendix-2-some-more-extra-stuff">Appendix 2</a></strong>. See the base <a href="https://github.com/tompollard/phd_thesis_markdown/blob/master/README.md"><code>README.md</code></a> for how References are handled - leave <code>*_references.md</code> alone, and provide it to <code>pandoc</code> last.</p>
<p>This is a brief outline of what went into each chapter, and a section which shows how to reference headers (which are labelled automatically for you). This chapter, section <a href="#introduction-with-a-citation">1</a>, shows how to use citations and how to reference section headers. Section <a href="#literature-review-with-maths">2</a> shows how use and reference equations. Section <a href="#first-research-study-with-code">3</a> shows how to use and reference code. Section <a href="#research-containing-a-figure">4</a> shows how to use, reference, and resize pdf and jpg figures. Section <a href="#research-containing-a-table">5</a> shows how to use and reference tables. Section <a href="#final-research-study">6</a> is truly revolutionary (but shows nothing functional). <strong><a href="#appendix-1-some-extra-stuff">Appendix 1</a></strong> shows how to add chapters which are not numbered, and has to be referenced manually, as does <strong><a href="#appendix-2-some-more-extra-stuff">Appendix 2</a></strong>. See the base <a href="https://github.com/tompollard/phd_thesis_markdown/blob/master/README.md"><code>README.md</code></a> for how References are handled - leave <code>*_references.md</code> alone, and provide it to <code>pandoc</code> last.</p>
<p>Proin faucibus nibh sit amet augue blandit varius.</p>
<h1 data-number="2" id="literature-review-with-maths"><span class="header-section-number">2</span> Literature review, with maths</h1>
<!--
Expand Down Expand Up @@ -378,7 +378,7 @@ <h3 data-number="3.2.1" id="subsection-1-with-example-code-block"><span class="h
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="cf">if</span> mood <span class="op">==</span> <span class="st">&#39;happy&#39;</span>:</span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a> <span class="bu">print</span>(<span class="st">&quot;I am a happy robot&quot;</span>)</span></code></pre></div>
<h3 data-number="3.2.2" id="subsection-2"><span class="header-section-number">3.2.2</span> Subsection 2</h3>
<p>By running the code in <a href="#subsection-1-with-example-code-block">Section Subsection 1 with example code block</a>, we solved AI completely. This is the second part of the methodology. Proin tincidunt odio non sem mollis tristique. Fusce pharetra accumsan volutpat. In nec mauris vel orci rutrum dapibus nec ac nibh. Praesent malesuada sagittis nulla, eget commodo mauris ultricies eget. Suspendisse iaculis finibus ligula.</p>
<p>By running the code in section <a href="#subsection-1-with-example-code-block">3.2.1</a>, we solved AI completely. This is the second part of the methodology. Proin tincidunt odio non sem mollis tristique. Fusce pharetra accumsan volutpat. In nec mauris vel orci rutrum dapibus nec ac nibh. Praesent malesuada sagittis nulla, eget commodo mauris ultricies eget. Suspendisse iaculis finibus ligula.</p>
<!--
Comments can be added like this.
-->
Expand Down
Binary file modified output/thesis.pdf
Binary file not shown.
41 changes: 20 additions & 21 deletions output/thesis.tex
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@
\usepackage{bbold}
\DeclareMathOperator*{\argmin}{\arg\!\min}

% For use of \cref and \Cref used by pandoc secnos
\usepackage{cleveref}

\begin{document}


Expand Down Expand Up @@ -478,21 +481,18 @@ \section{Summary of chapters}\label{summary-of-chapters}}

This is a brief outline of what went into each chapter, and a section
which shows how to reference headers (which are labelled automatically
for you).
\textbf{\protect\hyperlink{introduction-with-a-citation}{Chapter 1}}
shows how to use citations and how to reference section headers.
\textbf{\protect\hyperlink{literature-review-with-maths}{Chapter 2}}
shows how use and reference equations.
\textbf{\protect\hyperlink{first-research-study-with-code}{Chapter 3}}
shows how to use and reference code.
\textbf{\protect\hyperlink{research-containing-a-figure}{Chapter 4}}
shows how to use, reference, and resize pdf and jpg figures.
\textbf{\protect\hyperlink{research-containing-a-table}{Chapter 5}}
shows how to use and reference tables.
\textbf{\protect\hyperlink{final-research-study}{Chapter 6}} is truly
revolutionary (but shows nothing functional).
for you). This chapter, \cref{introduction-with-a-citation}, shows how
to use citations and how to reference section headers.
\Cref{literature-review-with-maths} shows how use and reference
equations. \Cref{first-research-study-with-code} shows how to use and
reference code. \Cref{research-containing-a-figure} shows how to use,
reference, and resize pdf and jpg figures.
\Cref{research-containing-a-table} shows how to use and reference
tables. \Cref{final-research-study} is truly revolutionary (but shows
nothing functional).
\textbf{\protect\hyperlink{appendix-1-some-extra-stuff}{Appendix 1}}
shows how to add chapters which are not numbered, as does
shows how to add chapters which are not numbered, and has to be
referenced manually, as does
\textbf{\protect\hyperlink{appendix-2-some-more-extra-stuff}{Appendix
2}}. See the base
\href{https://github.com/tompollard/phd_thesis_markdown/blob/master/README.md}{\texttt{README.md}}
Expand Down Expand Up @@ -613,13 +613,12 @@ \subsection{Subsection 1 with example code
\hypertarget{subsection-2}{%
\subsection{Subsection 2}\label{subsection-2}}

By running the code in
\protect\hyperlink{subsection-1-with-example-code-block}{Section
Subsection 1 with example code block}, we solved AI completely. This is
the second part of the methodology. Proin tincidunt odio non sem mollis
tristique. Fusce pharetra accumsan volutpat. In nec mauris vel orci
rutrum dapibus nec ac nibh. Praesent malesuada sagittis nulla, eget
commodo mauris ultricies eget. Suspendisse iaculis finibus ligula.
By running the code in \cref{subsection-1-with-example-code-block}, we
solved AI completely. This is the second part of the methodology. Proin
tincidunt odio non sem mollis tristique. Fusce pharetra accumsan
volutpat. In nec mauris vel orci rutrum dapibus nec ac nibh. Praesent
malesuada sagittis nulla, eget commodo mauris ultricies eget.
Suspendisse iaculis finibus ligula.

\hypertarget{results}{%
\section{Results}\label{results}}
Expand Down
2 changes: 1 addition & 1 deletion source/09_chapter_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ For bold, add ** on either side of the text
For bold and italic, add _** on either side of the text
-->

This is a brief outline of what went into each chapter, and a section which shows how to reference headers (which are labelled automatically for you). **[Chapter 1](#introduction-with-a-citation)** shows how to use citations and how to reference section headers. **[Chapter 2](#literature-review-with-maths)** shows how use and reference equations. **[Chapter 3](#first-research-study-with-code)** shows how to use and reference code. **[Chapter 4](#research-containing-a-figure)** shows how to use, reference, and resize pdf and jpg figures. **[Chapter 5](#research-containing-a-table)** shows how to use and reference tables. **[Chapter 6](#final-research-study)** is truly revolutionary (but shows nothing functional). **[Appendix 1](#appendix-1-some-extra-stuff)** shows how to add chapters which are not numbered, as does **[Appendix 2](#appendix-2-some-more-extra-stuff)**. See the base [`README.md`](https://github.com/tompollard/phd_thesis_markdown/blob/master/README.md) for how References are handled - leave `*_references.md` alone, and provide it to `pandoc` last.
This is a brief outline of what went into each chapter, and a section which shows how to reference headers (which are labelled automatically for you). This chapter, +@sec:introduction-with-a-citation, shows how to use citations and how to reference section headers. \*@sec:literature-review-with-maths shows how use and reference equations. \*@sec:first-research-study-with-code shows how to use and reference code. \*@sec:research-containing-a-figure shows how to use, reference, and resize pdf and jpg figures. \*@sec:research-containing-a-table shows how to use and reference tables. \*@sec:final-research-study is truly revolutionary (but shows nothing functional). **[Appendix 1](#appendix-1-some-extra-stuff)** shows how to add chapters which are not numbered, and has to be referenced manually, as does **[Appendix 2](#appendix-2-some-more-extra-stuff)**. See the base [`README.md`](https://github.com/tompollard/phd_thesis_markdown/blob/master/README.md) for how References are handled - leave `*_references.md` alone, and provide it to `pandoc` last.

Proin faucibus nibh sit amet augue blandit varius.

Expand Down
2 changes: 1 addition & 1 deletion source/11_chapter_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if mood == 'happy':

### Subsection 2

By running the code in [Section Subsection 1 with example code block](#subsection-1-with-example-code-block), we solved AI completely. This is the second part of the methodology. Proin tincidunt odio non sem mollis tristique. Fusce pharetra accumsan volutpat. In nec mauris vel orci rutrum dapibus nec ac nibh. Praesent malesuada sagittis nulla, eget commodo mauris ultricies eget. Suspendisse iaculis finibus ligula.
By running the code in +@sec:subsection-1-with-example-code-block, we solved AI completely. This is the second part of the methodology. Proin tincidunt odio non sem mollis tristique. Fusce pharetra accumsan volutpat. In nec mauris vel orci rutrum dapibus nec ac nibh. Praesent malesuada sagittis nulla, eget commodo mauris ultricies eget. Suspendisse iaculis finibus ligula.

<!--
Comments can be added like this.
Expand Down
5 changes: 4 additions & 1 deletion style/preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,7 @@

% Custom math
\usepackage{bbold}
\DeclareMathOperator*{\argmin}{\arg\!\min}
\DeclareMathOperator*{\argmin}{\arg\!\min}

% For use of \cref and \Cref used by pandoc secnos
\usepackage{cleveref}

0 comments on commit 9b87737

Please sign in to comment.