Notes are digital, and there is a challenge in it’s transition from handwriting. While this transition is in many cases vastly beneficial, the author no longer has the freedom to design their writings exactly as they wish. They are constrained by the limitations of the software systems they choose to use.

Plaintext ("*.txt") is the most basic of such systems - it simply stores symbols in order as they appear without any other formatting. These files can be edited directly with any text editor.
Markup ("*.md", “*.tex”, “*.html”) languages include additional text to specify some formatting, but can still be reasonably edited with a text editor. Richtext formats ("*.rtf", “*.docx”) store content with formatting instructions that typically require specialized software (word processors) to edit and render.

There are two broad categories of editors:

  • Code editors where a source file is edited and seperately rendered into a final document
  • What You See Is What You Get (WYSIWYG) editors where the document is rendered and edited seamlessly in the same place

Latex typically uses code editors, and this may seem imtimidating and complicated until the initial learning curve is overcome.
If a visual editor is strongly preffered, LyX works with latex and is completely free and open source (GPL).
If the goal is to just explore latex without setting it up on your system, Overleaf is very useful. Note that some features are locked behind a subscription.

LaTeX

LaTeX is a typesetting system - it is a way of organizing text and images on a page using text commands, templates and composition.

Simple Document

This is a simple latex source file (hello.tex) to show some of the features of latex:

\documentclass{article}

\begin{document}

\chapter{Title}

\end{document}

You can use it to create a pdf:

latexmk -pdf -outdir=build hello.tex

Quick Reference

Value

  • supports scientific and mathematical notation
  • creates a higher degree of separation of content from formatting
  • high typographical quality
  • stable and longevity
  • free and open source
  • robust referencing system

Extensive use in the scientific community

Template

The following is an example of a template that can be created:

.
├── build
├── chapters
│   ├── introduction.tex
│   ├── chapter1.tex
│   ├── chapter2.tex
│   ├── references.bib
│   └── title.tex
├── figures
├── main.tex
├── Makefile
└── style
    └── style.tex

The entire document does not need to be contained in a single source file - it can be composed from many files.

In this structure, each chapter has it’s own tex file. Figures are kept in a dedicated directory (figures/) and the styling is defined in style.tex.

main.tex brings everything together with the \input command:

\documentclass{report}

\input{style/style.tex}

\begin{document}

\pagenumbering{roman}
\input{chapters/title}

\tableofcontents
\newpage

\pagenumbering{arabic}

\input{chapters/introduction}
\input{chapters/chapter1}
\input{chapters/chapter2}
\newpage

\bibliography{chapters/references.bib}

\end{document}

This should give an idea of how latex can be used to create a powerful and efficient system - once a document format is well defined, it can be reproduced very easily. For most formatting you wish to do, there likely already exists some template. If you are creating one from scratch, or modifying an existing template to meet your requirement, the process may feel tedious and unncessary, but this is a once-off cost that will be rewarded every time it is reused.

The Workflow

text editor: neovim document generator: latexmk viewer: evince

Your workflow will depend on your operating system and software preferences. While the workflow defined uses examples for Linux, the general setup should be readily applicable to any platform.

Document Generator

This is the core software that automates the building of latex source files to the desired output document.

latexmk supports many operarating systems (including Linux, MacOS and Windows) and, given the source files for a document, it issues the appropriate sequence of commands to generate a pdf, ps or dvi document. 1

continous watching and updates pvc

Text Editor

To edit the latex source files, any text editor will do.

Not much features are required, but the following makes the editing easier:

  • Syntax highlighting (to validate syntax and quickly identify errors)
  • Autosave (to automatically trigger re-rendering on changes)

A terminal based text editor like neovim works perfectly too!

To autosave for the current file in neovim, run command autocmd TextChanged,TextChangedI <buffer> silent write.

Viewer

Once again, any PDF viewer will work. Some viewers may not automatically update if the output file changes - these are not very nice to work with as they have to be refreshed manally each time.

Evince is the default document view on GNOME. A cool feature is that it supports dark mode (color inversion)!