From 8fe7d70a96da175d26ca2c8288da59c3cbe05427 Mon Sep 17 00:00:00 2001 From: Krzysztof Zych Date: Mon, 4 Jan 2021 13:18:14 +0100 Subject: [PATCH] Use minted for code blocks; figure out orgmode ways of setting necessary local variables. --- WHY_DOES_IT_SPIN_RIGHT.org | 56 ++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/WHY_DOES_IT_SPIN_RIGHT.org b/WHY_DOES_IT_SPIN_RIGHT.org index 4e3a874..9484f9a 100644 --- a/WHY_DOES_IT_SPIN_RIGHT.org +++ b/WHY_DOES_IT_SPIN_RIGHT.org @@ -3,14 +3,17 @@ #+EMAIL: krzysztof.zych@rebased.pl #+DATE: 2020-01-03 #+LANGUAGE: en -#+OPTIONS: toc:f tex:t latex:t ::t date:f H:2 -#+startup: beamer -#+latex_compiler: xelatex -#+latex_class: beamer -#+latex_header: \usepackage{amsmath} -#+latex_header: \usepackage{tikz} -#+latex_header: \mode{\usetheme{metropolis}} -# (eval setq org-preview-latex-default-process 'dvisvgm) +#+OPTIONS: toc:nil tex:t latex:t ::t date:nil H:2 +#+STARTUP: beamer +#+LATEX_COMPILER: xelatex +#+LATEX_CLASS: beamer +#+LATEX_CLASS_OPTIONS: [aspectratio=1610] +#+LATEX_HEADER: \usepackage{amsmath} +#+LATEX_HEADER: \usepackage{tikz} +#+LATEX_HEADER: \usepackage{minted} +#+LATEX_HEADER: \hypersetup{colorlinks,linkcolor=,urlcolor=gray} +#+BEAMER_THEME: metropolis + * TL;DR ** Executive summary, or I've only got 2 minutes for this @@ -52,7 +55,9 @@ The long story follows. ** Our viewBox is a unit square -~~ +#+BEGIN_SRC xml + +#+END_SRC \begin{tikzpicture}[scale=2] \draw [->] (-1, 0) -- (1, 0); @@ -68,12 +73,12 @@ The long story follows. \draw [dashed] (-1, -1) -- (-1, 1) -- (1, 1) -- (1, -1) -- cycle; \end{tikzpicture} -Well, almost. In the world of 2D computer graphics, the X axis actually goes down, not up. +Well, almost. In the world of 2D computer graphics, the Y axis actually goes down, not up. So our coordinate system is actually flipped: the point at $(-1, -1)$ is in the top-left corner. ** A single sector -\begin{tikzpicture}[scale=2] +\begin{tikzpicture}[scale=3] \draw [->] (-1, 0) -- (1, 0); \draw [->] (0, -1) -- (0, 1); \draw (-1, 0) node [anchor=north west] {$-1$}; @@ -82,7 +87,7 @@ So our coordinate system is actually flipped: the point at $(-1, -1)$ is in the \draw (0, 1) node [anchor=north east] {$1$}; \draw (0, 0) -- (1, 0) arc[start angle=0, end angle=30, radius=1] -- cycle; -\draw (0.5, 0.0) node [anchor=south] {$\alpha = \frac{2 \pi}{N}$}; +\draw (0.2, 0) node [rotate=30, right=8pt] {$\alpha = \frac{2 \pi}{N}$}; \draw (0, 0) -- node [anchor=north] {$\cos(\alpha)$} (30:1 |- 0,0) [thick]; \draw (30:1) -- node [anchor=west] {$\sin(\alpha)$} (30:1 |- 0,0) [thick]; \end{tikzpicture} @@ -239,6 +244,7 @@ $$ ** Wind-up, full spin, braking +#+ATTR_LATEX: #+BEGIN_SRC xml