Skip to content

Repository files navigation

Math documents

Repo structure

The repo contains 4 primary latex directories:

│
├── .github  -- Workflow files
│
├── scripts  -- Typescript files - only used in workflows
│
├── config   -- LaTeX class and style files
│
├── book     -- LaTeX root files - longer
├── handout  -- LaTeX root files - shorter
│
├── exercise -- LaTeX standalone files - single exercises
└── graphics -- LaTeX standalone files - single graphics

Config files

Config files are in the config folder. These files are used in the document preambles. In order to use these files, they have to be copied or linked to a location known to texlive. Running the following script takes care of this:

./link.sh

Motivation

Using the same config files in all of our tex source files helps us using consistent notations throughout our documents. They also make life easier when it comes to changing the styling of a specific element, because this way the change only has to be made in one location.

Class files

For each filetype, we have custom class files. You should begin the documents like this:

% Files in the book directory
\documentclass{math-book}

% Files in the handout directory
\documentclass{math-handout}

% Files in the exercise directory
\documentclass[exercise]{math-standalone}

% Files in the graphics directory
\documentclass[graphics]{math-standalone}

Style files

We also have custom style files. These files are already included in the class files, so you do not need to worry about importing them. They provide some useful environments or command, like these:

% Used for regular vectors
\rvec{u}

% Used for unit vectors
\uvec{v}

% Used for dot product
\dprod{u}{v}

Non config files

Besides config files, we have 4 different tex source file types

  • Standalone files
    • graphics files contain a single figure.
    • exercise files each contain one exercise.
  • Root files
    • handout files contain approximately 45 minutes worth of information.
    • book files contain more information

Folder structure

Required files

Each folder containing root or standalone files most contain the following files:

  • config.yml
root_files:
  - input: main  # Required
  - output:      # Undefined by default
  - lang:        # Undefined by default
out_file: true   # Can be true or false (true - infer, false - fallback)
lang: true       # Can be boolean or string (true - infer, false - off, string - force value)
external_deps:   # Undefined by default
  program_name:
    - dep1
    - dep2

Naming conventions

  • Language specific files must use either .hu.tex or .en.tex extensions.
  • Other files, that do not contain any language specific text (like graphics) can use the .tex extension, but lang = false must also be specified in the corresponding config.yml file.

Contribution

Cloning the repo

If you have the github cli gh installed, clone the repo by the following command:

gh repo clone tibi1220/math-docs

If you do not, use the default git command. It is already installed on MacOS:

git clone git@github.com:tibi1220/math-docs.git

Dependencies

Install MacTeX.

After installation, you will need to get latexindent working.

  • You can either install latexindent with brew by running the following script:
brew install latexindent
  • Or you can manually install the perl modules by using the cpanm package manager:
cpanm YAML::Tiny
cpanm File::HomeDir

Recommended plugins

Neovim

You can check out my neovim configuration here.

Some of the most important plugins when working with latex:

VS Code

These settings and extensions are already included in the repo, so if you are using VS Code, there is no need to change anything in your config.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages