Notes on LaTeX

Posted on Jun 19, 2021

Write Markdown in LaTeX for Notes

I often write my “chain of thought” in documents before writing the full page. I used to use verbatim environment for this. Now, I’ve found an alternative — Markdown directly!

First, make sure you import listings and xcolor packages.


Then, create a custom environment:



Now, whenever you want to write notes, you can put them in “markdown” environment.

Significance of research and prior work

- Discussion on novelty compared to previous work
- Why is it a hard problem?


  • Bold math symbols: Use the command \mathbf{} to write bold faced symbols like matrix variables.

  • Margins: The easiest way is to add \usepackage[margin=0.5in]{geometry} in the preamble.

  • Outer quotes: Latex doesn’t understand " as outer quotes. By default, you have to use ``. Here is a way out.

\usepackage [autostyle, english = american]{csquotes}
  • Some handy commands: \hfill, \vfill, \hskip, \vskip, \hspace, \vspace. Just Google to know their usage. They’re needed for extra spaces here and there in Latex documents.

  • Horizontal Line: \hrulefill for all non-tabular environments.


  • Inserting Images: Use \usepackage{graphicx,graphics} in preamble. Then, add image with the following code block.
    \caption{An example of fitting \texttt{GP} model in 1-d function with seven data points.}


  • Inserting Table: Use Table Generator online. Create the schema and then fill in the content.

  • Resize Latex Tables to Column-width or Text-width using resizebox:

    % ...
    & \multicolumn{1}{l}{Heading 1}
    & \multicolumn{1}{l}{Heading 2}
    & \multicolumn{1}{l}{Heading 3} \\ \cline{2-4}
    Row 1 & Cell 1,1 & Cell 1,2 & Cell 1,3 \\
    Row 2 & Cell 2,1 & Cell 2,2 & Cell 2,3

Exact Math Symbols

  • argmin and argmax: Use this in preamble:

Then, \underset{x} \argmax f(x) or \underset{x} \argmax f(x). This might not be very right according to this thread, but okay – it serves the purpose. If you find something better, tell me.

  • Sum (Sigma): \sum_{i = 1}^{n} x_n

  • Integral: \int_a^b f(x) \di x

  • Other math symbols: Overleaf and Oeis Wiki.

  • Tab: The simple tab (horizontal space) can be worked with \quad.

  • Drawing any symbol: It is difficult to find the appropriate symbol every time, so use Detexify to identify what you need.

  • Writing algorithms in LaTeX. Use algorithm and algorithmic. See this article for quick review.

Typesetting Exactly

  • To place pictures exactly in a slide, use tikz package. Exact coordinates by cm:
\begin{tikzpicture}[remember picture,overlay]
%% (x coord, y coord) -> (0 cm, 6.5 cm)
  \node[anchor=south west,inner sep=0pt] at ($(current page.south west)+(0cm,6.5cm)$) {

The best part is that it also works for exact text placements.

Referencing and Cross-referencing

  • Bibliography and References: Understand that in most academic writings they are different and Latex considers references as default. To add them, add following lines at the end of file, just before \end{document}.

Don’t forget to add \usepackage{natbib} in the preamble. Note that bibfile.bib contains all bibliographies. If you can’t get the BibTeX citations right, use Google Scholar.


  • New Commands: Outline format is \newcommand{newname}{definition}. See this and this for more details.

  • Style File (.sty): Basically, they’re instructions that can be used to redefine the preexisting values in the document. See my Github for two examples that I’ve created - one for homework assignments and other for IIM Indore’s official presentation.


  • Overleaf Gallery is the best. Otherwise, you can find some repositories on Google.

  • By Me: If you are searching for reports or presentations, or are an IIM Indore student looking for presentations, check my templates.