yuki-koyama / latexie

Utilities for writing papers with LaTeX

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

latexie

Utilities for writing papers with LaTeX

  • latexie.sty: The main style file with many custom commands
  • latexie-article.cls: A plain article class with nice format settings

Goals

  • Faster paper writing (especially in the computer science domain)
  • Shorter commands while preserving readability (e.g., \bfx rather than \mathbf{x})
  • Better maintainability by providing semantic commands (e.g., \T rather than \top for the matrix transposition)

Usage

\usepackage{/path/to/this/repository/latexie}

Policies

Overall

Math

Documentation

Options

  • noannotation: If this option is passed, the annotation commands do not display annotaions. More specifically, \note and \todo do not rendered, and \spot displays its content without colored.

Dependencies

  • amsmath
  • amsfonts
  • ifthen
  • xcolor

Math Examples

Before:

p(\mathcal{D} \:\vert\: \boldsymbol{\theta})

After:

\cprob{ \calD }{ \bftheta }

Result:


Before:

\mathcal{N}(\mathbf{x}; \boldsymbol{\mu}, \boldsymbol{\Sigma})
=
\frac{1}{(2 \pi)^{\frac{n}{2}} \det(\boldsymbol{\Sigma})^{\frac{1}{2}}}
\exp \left\{
  - \frac{1}{2} (\mathbf{x} - \boldsymbol{\mu})^{\top} \boldsymbol{\Sigma}^{-1} (\mathbf{x} - \boldsymbol{\mu})
\right\}

After:

\calN(\bfx; \bfmu, \bfSigma)
=
\frac{1}{(2 \pi)^{\frac{n}{2}} \det(\bfSigma)^{\frac{1}{2}}}
\exp \left\{
  - \frac{1}{2} (\bfx - \bfmu)^\T \bfSigma^\inv (\bfx - \bfmu)
\right\}

Result:


Before:

\begin{bmatrix}
  \mathbf{A} & \mathbf{B} \\
  \mathbf{C} & \mathbf{D}
\end{bmatrix}^{-1}
=
\begin{bmatrix}
  \mathbf{A}^{-1} ( \mathbf{I} + \mathbf{B} ( \mathbf{D} - \mathbf{C} \mathbf{A}^{-1} \mathbf{B} )^{-1} \mathbf{C} \mathbf{A}^{-1} ) &
  - \mathbf{A}^{-1} \mathbf{B} ( \mathbf{D} - \mathbf{C} \mathbf{A}^{-1} \mathbf{B} )^{-1} \\
  - ( \mathbf{D} - \mathbf{C} \mathbf{A}^{-1} \mathbf{B} )^{-1} \mathbf{C} \mathbf{A}^{-1} &
  ( \mathbf{D} - \mathbf{C} \mathbf{A}^{-1} \mathbf{B} )^{-1}
\end{bmatrix}

After:

\bmat{
  \bfA & \bfB \\
  \bfC & \bfD
}^\inv
=
\bmat{
  \bfA^\inv ( \bfI + \bfB ( \bfD - \bfC \bfA^\inv \bfB )^\inv \bfC \bfA^\inv ) &
  - \bfA^\inv \bfB ( \bfD - \bfC \bfA^\inv \bfB )^\inv \\
  - ( \bfD - \bfC \bfA^\inv \bfB )^\inv \bfC \bfA^\inv &
  ( \bfD - \bfC \bfA^\inv \bfB )^\inv
}

Result:

Limitations

Some commands are probably not very effective with

  • code highlighting
  • code completion
  • code snippets

Example

See example.tex for a working example. It can be compiled by using pdflatex. If you use latexmk, then run this command:

latexmk -pdf example

About

Utilities for writing papers with LaTeX

License:MIT License


Languages

Language:TeX 100.0%