UofU Fall 2020 - Prof. Vaibhav Pandey
This is a
It is fairly straight forward to use but I will include some pointers and best practices,
along with the basic instructions of how to do your work in the template.
One of the main things done in these templates are all of the problems form the book are already inputted into
Please note:
- These are not set up instructions for the template or $\LaTeX$.
- Instructions on how to set up the template for Overleaf are in the Discussion post on canvas, where you likely got this template from.
- This template includes the vs-code files necessary for plugging and playing with an existing $\LaTeX$ setup in vs-code using the $\LaTeX$ Workshop vs-code Extension.
Fill in the requisite information in main.tex
, this includes setting up your name and u# to be auto filled in the correct locations throughout the document.
(Note: These felids are filled with place holders that will cause your document to fail to compile if you do not change them.)
These felids are located on lines 6 & 7 respectively in main.tex
.
main.tex
(pre-changes)\def\yourName{<Your-Name>} % - Your name to be put on the paper. \def\yourUNum{u<Your-u#>} % - Your u# to be put on the paper.
main.tex
(post-changes)\def\yourName{Jane Doe} % - Your name to be put on the paper. \def\yourUNum{u1234567} % - Your u# to be put on the paper.
After these changes have been made the document should compile just fine. (in Overleaf press the "Compile" button or press ctrl+Enter (Mac OS: ⌘Cmd+return)).
To do the work for an exercise,
- Navigate to the appropriate location in the project:
- Expand the
tex/
directory. - Expand the directory labeled as the proper section (
s#-#/
). i.e. If the exercise you want to work on is in section 1.2 expand thes1-2/
directory. - Select the
.tex
file labeled with the desired exercise number (e#.tex
). i.e. If the exercise you wan tto work on is numbered 22 open the file labelede22.tex
.
- Expand the
- Locate the appropriate location to start inputting your work in the file.
- If the exercise you are working on has no parts just start your work under the "My Work" comment block.
- If the exercise you are working on has parts they should be split up inside the
\begin{exercise}...\end{exercise}
environment that is in the proper order and should have the premise of the exercise part as it's first line already.
-
"TeX-up" your work in
$\LaTeX$ !- This part is very subjective to what you are doing and will very greatly on what you are doing.
- Make sure to denote your answer!
- Create a solution environment:
\begin{solution} ... \end{solution}
- Type your solution on the inside of it.
- Create a solution environment:
This template uses a modular file structure with an organized structure.
This is done because it helps hide some of the mess involved in
To that effect these templates are built for the following structure:
./
│ main.tex
│ workspace.code-workspace
│
├─.vscode/
│ settings.json
│
├─code/
├─comm/
│ gen.bib
│ header.tex
│
├───fig
└─┬─tex
│ s#-#.tex
│
└─s#-#
e#.tex
-
main.tex
:: is the primary compile point of the document, it is where Chapter Headers reside, and the individual section documents are included from.- You can also create an external reference section by un-commenting out the code and including whatever you like to there.
- The
header.tex
file with most of the technical code is provided. - The Bibliography/Citation section is also generated from here, using the Bib TeX (
.bib
) info from thegen.bib
file.
-
tex/
:: This is the directory where your$\LaTeX$ code is located in. -
tex/s#-#.tex
:: Files that follow this naming format are Section Files.- They contain the Section headers,
the
\begin{exercise} ... \end{exercise}
environment declarations for labeling the Exercises & providing references to them, the\input{...}
statements for including the files for the individual Exercises, and any instructions that encompass multiple exercises.
- They contain the Section headers,
the
-
tex/s#-#/
:: The directory for exercise files for the specified chapter and section. -
tex/s#-#/e#.tex
:: Files that are where you do your work for your exercises, and the$\LaTeX$ code for the Exercise premise are.- If you have sub-exercises (Especially those denoted by letters) their work should be done in the appropriate
begin{exercise} ... \end{exercise}
environment inside the\begin{subthm}{exercise} ... \end{subthm}
environment.
- If you have sub-exercises (Especially those denoted by letters) their work should be done in the appropriate
-
fig/
:: This is a directory where you should put any pictures, or standalone$\LaTeX$ files that contain any Tikz pictures,$\LaTeX$ tables, or code snippets, you want to have in your document.- These files should be given descriptive names that do not contain spaces (use
-
&_
instead of spaces). - They can be included in your document using either the
\includegraphics[width=.6\textwidth]{./fig/...}
for pictures/images & documents,\include{./fig/...}
for the stand alone$\LaTeX$ files, or\lstinputlisting[language=...]{./fig/...}
for . - Supported picture/image formats:
.png
,.jpg
,.pdf
, &.eps
- These files should be given descriptive names that do not contain spaces (use
-
comm/
:: This is where the technical files for the the$\LaTeX$ document reside.- Use Caution when making changes to files in this directory.
-
comm/header.tex
:: This is the most technical file in the template, and everything possible has been done so that you don't ever have to make any changes to this file ever!- If you need to add a package to your document,
create your own TeX macro (
\def...{}
), define a custom$\LaTeX$ commands (\newcommand{...}[...]{...}
), or define default parameters for some utility, do it in the labeled section inmain.tex
and NOT in theheaders.tex
file!
- If you need to add a package to your document,
create your own TeX macro (
-
comm/gen.bib
:: This is a Bib TeX information file.- You can add any references you want to this just follow the Bib-TeX format.