Skip to content

A repository where a bunch of LaTeX templates for the assignments in UofU-fall2020 MATH2200-001.

Notifications You must be signed in to change notification settings

osterhoutan-UofU/math2200_LaTeX-hw-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math2200 Discrete Mathematics $\LaTeX$ HW Template

UofU Fall 2020 - Prof. Vaibhav Pandey

This is a $\LaTeX$ template system for doing the assignments for the Math2200 Discrete Mathematics course. It is a modular file template, with many features and a fairly straight forward organizational structure. It is set up in a way to hade most of the verbose and complicated header section of the document, that is emissary to make the document work and look pretty.

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 $\LaTeX$ for you (If you downloaded a template for a specific HW assignment). That way you can see some of the latex commands & environments used in the problems to get decent formatting, and use some of the more obscure symbols.

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.

First Things to Do:

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)).

Basic Usage:

To do the work for an exercise,

  1. Navigate to the appropriate location in the project:
    1. Expand the tex/ directory.
    2. 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 the s1-2/ directory.
    3. 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 labeled e22.tex.
  2. 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.
  3. "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.
  4. Make sure to denote your answer!
    1. Create a solution environment:
      \begin{solution}
          ...
      \end{solution}
    2. Type your solution on the inside of it.

The File Structure:

This template uses a modular file structure with an organized structure. This is done because it helps hide some of the mess involved in $\LaTeX$, it allows you to only have to see what is really important for the exercise you are working on without the destructions from other problems and document structure, and far easier to navigate and find things in the document, because otherwise $\LaTeX$ documents tend to all be pne file that is thousands of lines long & therefore a pain to scroll through and find anything.

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 the gen.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.
  • 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.
  • 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
  • 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 in main.tex and NOT in the headers.tex file!
  • 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.

About

A repository where a bunch of LaTeX templates for the assignments in UofU-fall2020 MATH2200-001.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages