Stack

Chrony would solve most of my NTP problems.

Latex absolute positioning of images

\begin{picture}(50,50)
\put(200,-300){\hbox{\includegraphics[scale=0.3]{file}}}
\end{picture}

(from SO)

Adding LaTeX to Jekyll/Markdown/Webpages via Mathjax

This is freaking amazing.

Mathjax. For inline math:

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
</script>

This gets added to whatever template in Jekyll, usually _layouts/post.html. Used this in my MPT notes. Where was this my first 6 years of uni?

DNB



Latex multiple pictures on one page

\begin{figure}[ht!]
    \vspace{8mm}
    \centering
    {%
    \begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[height=0.4\textheight]{/home/sh/p/ms/p/p/pics/scanned/1888.png}
        %\caption{Picture 1}
        \label{fig:1}
    \end{subfigure}
    \begin{subfigure}[b]{0.4\textwidth}
        \includegraphics[height=0.4\textheight]{/home/sh/p/ms/p/p/pics/scanned/1889.png}
        %\caption{Picture 2}
        \label{fig:2}
    \end{subfigure}
    }%
\end{figure}

\vspace{8 mm}

\begin{figure}[ht!]
    \vspace{8mm}
    \centering
    {%
    \begin{subfigure}[b]{0.3\textwidth}
        \includegraphics[height=0.37\textheight]{/home/sh/p/ms/p/p/pics/scanned/1900.png}
        %\caption{Picture 1}
        \label{fig:1}
    \end{subfigure}
    \qquad
    \begin{subfigure}[b]{0.6\textwidth}
        \includegraphics[height=0.37\textheight]{/home/sh/p/ms/p/p/pics/scanned/1927+.png}
        \caption{Picture 2}
        \label{fig:2}
    \end{subfigure}
    \qquad
    }%
\end{figure}

… I feel the above is wrong on many levels, but I’ll leave this here. I need to research better pictures with different sizes and floats. Or just read a book about latex from A to Z

Vim comments plugin

Nerdcommenter. To comment: <leader>cc. <leader>cn for forced nesting. To toggle: <leader>c<space>.

If the topmost selected line is commented, all selected lines are uncommented and vice versa. <leader>cA goes to end of the line, inserts a comment and goes into insert mode.

Latex % character at the end of the line

A % allows you to go to a newline without adding a space.

Zathura side-by-side view

Side-by-side view is toggled by d. Also set first-page-column 1:1 changes which page gets shown first.

LaTeX page width

\paperwidth, not “pagewidth”.