❀✿❀ SuperLaserNino ✿❀✿ It’s a website! https://ninoan.com Make Neovim respect your macOS appearance settings <p>[<em>It turns out they’re <a href="https://x.com/Neovim/status/1861441698489884936">working on native support for this feature</a>, but it looks like my approach might be more flexible, so I decided to post this anyway.</em>]</p> <p>When I discovered that <a href="https://ghostty.org/">Ghostty</a> can change its colours based on the system light/dark mode settings, I was curious whether I could achieve the same effect in Neovim. It turns out, it’s possible! (You don’t need to use Ghostty for this to work, that was just my inspiration to figure this out.)</p> <p>This code only works on macOS, but I’m sure you could get an AI to translate it to work on Windows or Linux:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="lua"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">function</span><span style="color:var(--astro-code-token-function)"> CheckAppearance</span><span style="color:var(--astro-code-foreground)">()</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> local</span><span style="color:var(--astro-code-foreground)"> theme </span><span style="color:var(--astro-code-token-keyword)">=</span><span style="color:var(--astro-code-foreground)"> vim.fn.</span><span style="color:var(--astro-code-token-function)">system</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'defaults read -g AppleInterfaceStyle'</span><span style="color:var(--astro-code-foreground)">):</span><span style="color:var(--astro-code-token-function)">gsub</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'\n'</span><span style="color:var(--astro-code-foreground)">, </span><span style="color:var(--astro-code-token-string-expression)">''</span><span style="color:var(--astro-code-foreground)">)</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> if</span><span style="color:var(--astro-code-foreground)"> theme </span><span style="color:var(--astro-code-token-keyword)">==</span><span style="color:var(--astro-code-token-string-expression)"> 'Dark' </span><span style="color:var(--astro-code-token-keyword)">then</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.o.background </span><span style="color:var(--astro-code-token-keyword)">=</span><span style="color:var(--astro-code-token-string-expression)"> 'dark'</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'colorscheme modus_vivendi'</span><span style="color:var(--astro-code-foreground)">)</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-token-string-expression)"> [[ hi DiffText cterm=bold gui=bold ctermbg=225 guibg=DarkRed ]]</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"> -- For some reason the RenderMarkdown plugin doesn't pick up the changes</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"> -- when run through an autocmd</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-token-string-expression)"> [[ hi RenderMarkdown_bgtofg_RenderMarkdownCode guifg=#1e1e1e ]]</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> else</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.o.background </span><span style="color:var(--astro-code-token-keyword)">=</span><span style="color:var(--astro-code-token-string-expression)"> 'light'</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"> -- These are my settings, but you can go wild and put whatever you want</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'colorscheme modus_operandi'</span><span style="color:var(--astro-code-foreground)">)</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-token-string-expression)"> [[ hi DiffText cterm=bold gui=bold ctermbg=225 guibg=LightRed ]]</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"> -- For some reason the RenderMarkdown plugin doesn't pick up the changes</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"> -- when run through an autocmd</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> vim.</span><span style="color:var(--astro-code-token-function)">cmd</span><span style="color:var(--astro-code-token-string-expression)"> [[ hi RenderMarkdown_bgtofg_RenderMarkdownCode guifg=#f2f2f2 ]]</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> end</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">end</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-comment)">-- Run on startup</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">CheckAppearance</span><span style="color:var(--astro-code-foreground)">()</span></span></code></pre> <p>So far, it’ll just check the appearance setting when you start Neovim. There are a few ways to get it to dynamically detect changes to the setting:</p> <p><em>Manually.</em> Just create a user command and run it manually (ugh):</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="lua"><code><span class="line"><span style="color:var(--astro-code-foreground)">vim.api.</span><span style="color:var(--astro-code-token-function)">nvim_create_user_command</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'CheckAppearance'</span><span style="color:var(--astro-code-foreground)">, </span><span style="color:var(--astro-code-token-keyword)">function</span><span style="color:var(--astro-code-foreground)">()</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> CheckAppearance</span><span style="color:var(--astro-code-foreground)">()</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">end</span><span style="color:var(--astro-code-foreground)">, {})</span></span></code></pre> <p><em>On focus gained.</em> This is what I’m using – Neovim will check the appearance whenever you activate it. This means it won’t switch <em>immediately</em> with the system, but it’ll always match when you’re actually using Neovim:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="lua"><code><span class="line"><span style="color:var(--astro-code-foreground)">vim.api.</span><span style="color:var(--astro-code-token-function)">nvim_create_autocmd</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">"FocusGained"</span><span style="color:var(--astro-code-foreground)">, {</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> callback</span><span style="color:var(--astro-code-token-keyword)"> =</span><span style="color:var(--astro-code-token-keyword)"> function</span><span style="color:var(--astro-code-foreground)">()</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> CheckAppearance</span><span style="color:var(--astro-code-foreground)">()</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> end</span><span style="color:var(--astro-code-foreground)">,</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">})</span></span></code></pre> <p>Note: Some plugins might not pick up the changes properly, so you might have to add extra stuff in the <code>CheckAppearance</code> function, like that <code>RenderMarkdown_bgtofg_RenderMarkdownCode</code> highlight rule.</p> <p>Here’s what it looks like in the end:</p> <figure> <video controls> <source src="https://f001.backblazeb2.com/file/NinoPublic/videos/neovim-appearance-settings.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </figure> Tue, 07 Jan 2025 19:15:46 GMT https://ninoan.com/neovim-light-dark/ https://ninoan.com/neovim-light-dark/ Don’t manually hunt around for <code>yarn.lock</code> or <code>package-lock.json</code> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="perl"><code><span class="line"><span style="color:var(--astro-code-token-comment)">#!/usr/bin/env perl</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-comment)"># Node dependency manager. Never wonder whether to use `yarn` or `npm` again.</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-comment)"># Usage:</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"># np --> runs `yarn` or `npm i`</span></span> <span class="line"><span style="color:var(--astro-code-token-comment)"># np &#x3C;args> --> runs `yarn &#x3C;args>` or `npm run &#x3C;args>`</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">use</span><span style="color:var(--astro-code-foreground)"> strict;</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">use</span><span style="color:var(--astro-code-foreground)"> warnings;</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">if</span><span style="color:var(--astro-code-foreground)"> (!</span><span style="color:var(--astro-code-token-keyword)">-e</span><span style="color:var(--astro-code-token-string-expression)"> 'package.json'</span><span style="color:var(--astro-code-foreground)">) {</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> my</span><span style="color:var(--astro-code-foreground)"> $did_run = 0;</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> my</span><span style="color:var(--astro-code-foreground)"> @dirs = </span><span style="color:var(--astro-code-token-function)">grep</span><span style="color:var(--astro-code-foreground)"> { </span><span style="color:var(--astro-code-token-keyword)">-d</span><span style="color:var(--astro-code-foreground)"> $_ } </span><span style="color:var(--astro-code-token-function)">glob</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'*'</span><span style="color:var(--astro-code-foreground)">);</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> for</span><span style="color:var(--astro-code-token-keyword)"> my</span><span style="color:var(--astro-code-foreground)"> $dir (@dirs) {</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> $did_run = 1;</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> chdir</span><span style="color:var(--astro-code-foreground)">($dir);</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> if</span><span style="color:var(--astro-code-foreground)"> (</span><span style="color:var(--astro-code-token-keyword)">-e</span><span style="color:var(--astro-code-token-string-expression)"> 'package.json'</span><span style="color:var(--astro-code-foreground)">) {</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> print</span><span style="color:var(--astro-code-token-string-expression)"> "Running `np` in $dir\n"</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> my</span><span style="color:var(--astro-code-foreground)"> $exit_code = </span><span style="color:var(--astro-code-token-function)">system</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'np '</span><span style="color:var(--astro-code-foreground)"> . </span><span style="color:var(--astro-code-token-function)">join</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">' '</span><span style="color:var(--astro-code-foreground)">, @ARGV));</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> exit</span><span style="color:var(--astro-code-foreground)">($exit_code >> 8) </span><span style="color:var(--astro-code-token-keyword)">if</span><span style="color:var(--astro-code-foreground)"> $exit_code != 0;</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> chdir</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'..'</span><span style="color:var(--astro-code-foreground)">);</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> if</span><span style="color:var(--astro-code-foreground)"> ($did_run == 0) {</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> print</span><span style="color:var(--astro-code-token-string-expression)"> "No package.json found. Exiting.\n"</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> exit</span><span style="color:var(--astro-code-foreground)">(1);</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> exit</span><span style="color:var(--astro-code-foreground)">(0);</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">my</span><span style="color:var(--astro-code-foreground)"> $exit_code;</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">if</span><span style="color:var(--astro-code-foreground)"> (</span><span style="color:var(--astro-code-token-keyword)">-e</span><span style="color:var(--astro-code-token-string-expression)"> 'package-lock.json'</span><span style="color:var(--astro-code-foreground)">) {</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> if</span><span style="color:var(--astro-code-foreground)"> (@ARGV) {</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> $exit_code = </span><span style="color:var(--astro-code-token-function)">system</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'npm run '</span><span style="color:var(--astro-code-foreground)"> . </span><span style="color:var(--astro-code-token-function)">join</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">' '</span><span style="color:var(--astro-code-foreground)">, @ARGV));</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> } </span><span style="color:var(--astro-code-token-keyword)">else</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> $exit_code = </span><span style="color:var(--astro-code-token-function)">system</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'npm i'</span><span style="color:var(--astro-code-foreground)">);</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">} </span><span style="color:var(--astro-code-token-keyword)">else</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> $exit_code = </span><span style="color:var(--astro-code-token-function)">system</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">'yarn '</span><span style="color:var(--astro-code-foreground)"> . </span><span style="color:var(--astro-code-token-function)">join</span><span style="color:var(--astro-code-foreground)">(</span><span style="color:var(--astro-code-token-string-expression)">' '</span><span style="color:var(--astro-code-foreground)">, @ARGV));</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">exit</span><span style="color:var(--astro-code-foreground)">($exit_code >> 8);</span></span></code></pre> Tue, 27 Aug 2024 09:11:01 GMT https://ninoan.com/np/ https://ninoan.com/np/ Catio Chronicles 1: Let’s make a plan <!-- Original start date: 2024-06-03T17:15:00 --> <p>Our cat <a href="https://www.youtube.com/watch?v=WZEhBdCZypE">Jinx</a> keeps getting sick and vomiting, and the vets are saying this is most likely because young cats like to eat random stuff outside. We really don’t want to restrict Jinx to being an indoor cat, so we decided we would build him a little outside enclosure, a “catio”.</p> <!--more--> <p>Since this will be a big undertaking, we need to figure out what we want to achieve with the catio, and make a plan. These are some hard requirements:</p> <ul> <li>We need an enclosure that connects to the cat flap, so Jinx can get in and out on his own.</li> <li>The catio shouldn’t keep humans from using the back door to get into the garden.</li> <li>Apparently you need a permit to build anything higher than 2.5m, so that’s our height limit.</li> <li>Maintenance people still need to be able to access the pipes stuck to the outside of the house.</li> </ul> <p>And we also have some things that would be nice to have:</p> <ul> <li>It would be great if there was no mesh right outside the bedroom window, and if Jinx could get into the catio through the bedroom window.</li> <li>The space should be as big as possible, so we can fit lots of toys and climbing opportunities.</li> <li>The frame shouldn’t be too tall on the neighbours’ side, so it doesn’t bother them.</li> </ul> <p>The basic plan we started out with looked like this:</p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/basic_plan.jpg" alt=""></p> <p>We would then add mesh to the top, the slanted area, the right side (against the brick wall), and the side facing the viewer. The walls of our flat should ideally not get any mesh, so Jinx can get in and out through the windows.</p> <p>Buuuuut there are a bunch of pipes running along the walls, so the frame needs to somehow go around them.</p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/problems_with_pipes.jpg" alt=""></p> <p>My sister came up with the idea of putting the frame far enough away from the walls to avoid the pipes, and then fill the gaps with flat wooden panels (highlighted in red):</p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/planes.png" alt=""></p> <p>I discussed the plans with my dad (who had built us a tree-house when we were young, so I figured he might know stuff). His advice was:</p> <ul> <li>Build the frame out of 8×8cm wooden planks (we later haggled him down to 7×7cm, because we couldn’t find any 8×8cm planks).</li> <li>Put 90° brackets in every right angle and hinges on non-90° angles.</li> <li>Add diagonal stabilising struts to reinforce the corners.</li> </ul> <hr> <p>If you know me in real life, you may be wondering: Didn’t I start this whole project like 8 million years ago? Why did it take me so long to write this post?</p> <p>Well, I’ve been sitting on this unfinished draft since June, planning to have the following be the end of the article:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="plaintext"><code><span class="line"><span>The final design looks like this:</span></span> <span class="line"><span></span></span> <span class="line"><span>%% Better design %%</span></span> <span class="line"><span></span></span> <span class="line"><span>In the next episode, we'll look at finding materials and starting to build stuff!</span></span></code></pre> <p>But it turned out, making a nice archviz-y render of the catio never felt quite worth it. We used Blender to solve many of the design problems – and it was <em>really</em> helpful for that purpose – but once we’d figured out the general idea, it felt really tedious to painstakingly attach every single bracket and make sure all the beams line up right, etc. Also, whenever I started finessing the scene, I’d hit some new design issue that we needed to solve, and that would mean more changes to the design, so, the more high-fidelity the model, the more stuff I’d need to change every time.</p> <p>The main takeaway for this episode is:</p> <ol> <li>This is an exciting project.</li> <li>It was absolutely the right choice to plan this project in 3D. I tried a few sketches on paper and I kept getting hopelessly lost.</li> <li>I’d wished for a nice photoreal render at the end, but this would have required a lot more time investment. And if I’m gonna be spending time making “art” in Blender, I’d rather it be spaceships instead of wooden frames with mesh.</li> </ol> <p>Anyway, here are some screenshots of the design as it currently exists:</p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/catio-finished-design1.png" alt=""></p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/catio-finished-design2.png" alt=""></p> <p>I hesitate to call it “finished”, since a bunch of stuff might still change, and we’ve probably already deviated from this plan anyway in real life.</p> <p>Next time, we’ll look at the materials we got, and the beginning of the construction process.</p> Sun, 18 Aug 2024 12:14:25 GMT https://ninoan.com/catio1/ https://ninoan.com/catio1/ Finally you can remember whether the lift will ding once or twice <p><del>Elevators</del> Lifts have this cool accessibility feature where, depending on whether they’re going up or down, they’ll ding once or twice when they arrive. This is so you know the direction without having to look at the display above the doors.</p> <p>I’ve finally come up with a mnemonic for remembering which is which:</p> <ul> <li>One ding for going up – think “to one-up someone”</li> <li>Two dings for going down – think “to double down on something”</li> </ul> <p>🤯</p> Sun, 18 Aug 2024 12:06:21 GMT https://ninoan.com/lift-ding/ https://ninoan.com/lift-ding/ Thoughts on Texts (a multi-platform instant messaging app) <p>Having a handful of different instant messaging clients on your computer is inconvenient. There is <del>Ferdi</del> <a href="https://ferdium.org/">Ferdium</a>, but that’s basically just a browser with a tab for each service. I want something like <a href="https://adium.im/">Adium</a>: an app that transparently talks to all your IM services, so you don’t have to think about it.</p> <p>For years this seemed to be impossible, but recently I heard about <a href="https://texts.com/">Texts</a>, and decided to give it a go.</p> <p>My first thoughts were:</p> <ul> <li>I’m baffled at how they managed to make this app, given that all modern IM services have their own custom features, and most of them are proprietary/closed-source/etc. I still can’t quite believe this is real. <ul> <li>And Texts is owned by <a href="https://automattic.com/">Automattic</a>, which also owns WordPress, Tumblr, Pocket Casts, etc. So it’s at least probably not a total scam.</li> </ul> </li> <li>Seeing the screenshot on their homepage, I got excited that this might actually be a native Mac app, but it turns out it’s a 350 MB Electron app.</li> </ul> <h2 id="setup-and-first-impressions">Setup and first impressions</h2> <p>The setup was relatively smooth. Adding accounts worked fine. The UI is pretty ok.</p> <p>There are some nice settings:</p> <ul> <li>“Decrease sidebar density”, which you obviously don’t turn on, because density is good.</li> <li>“Distinct bubble color for each participant in groups”, which is great.</li> <li>You can add custom CSS (I guess that’s an advantage of it being an Electron app)</li> <li>“Optimized message rendering (beta) — Only render on-screen messages, to improve app performance. Might have some visual glitches.” This seems like a good thing to include. They’re right about the glitches tho.</li> <li>“Run with Safari renderer — Use a different rendering engine that consumes less CPU and RAM. Might have playback bugs for some messaging platforms.” This is a weird one. Do they have a special mode where it’s Electron, but not using Chromium to render?? I’m turning it on to see what it’s like.</li> </ul> <p>The UI is pretty nice and feels almost like a normal app, except for the very modern-web-app-feeling tooltips:</p> <figure> <img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/electron-tooltip.png" srcset="https://f001.backblazeb2.com/file/NinoPublic/pictures/electron-tooltip.png 2x" alt="A tooltip for a magnifying-glass icon. The tooltip says “Command Bar: Search Threads”."> </figure> <p>I may be the only person on Earth with this opinion, but I do actually like the native tooltips you get on macOS (and, I assume, Windows and Linux), that only show up after you point your mouse at a thing for a second, and look a bit more subtle.</p> <p>The app has a bunch of other interesting features like automatic reminders, labels, undo for sending messages (via a delay), etc. Also there are keyboard shortcuts for everything and you can change the app icon to whatever you like.</p> <p>The notification settings seem reasonable too:</p> <figure> <img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/texts-notification-settings.png" srcset="https://f001.backblazeb2.com/file/NinoPublic/pictures/texts-notification-settings.png 2x" alt="Text’s notification settings. Items are: A toggle for “Message notifications”. A dropdown for “Sound”. A toggle for “Group message notifications”. Another dropdown for “Sound”. A toggle for “Notify when app is in focus”. A toggle for “Notify when someone reacts to a message”. A toggle for “Notify when someone starts typing (supported platforms only)”. A dropdown for “Delay notifications for x seconds”, with explanation “Instead of getting notified for each message, delay and batch notifications for successive texts from someone”. There are also buttons “Open Notifications in System Preferences” and “Restart Notification Center”."> </figure> <h3 id="glitches">Glitches</h3> <p>When first setting up my accounts, the unread counter badge in the Dock icon was stuck on 1, but that eventually resolved itself.</p> <h2 id="compatibility">Compatibility</h2> <p>So the app seems nice and things broadly work. But how well does Texts support all the custom features of the various IM services?</p> <h3 id="replies">Replies</h3> <p>Yep:</p> <figure> <img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/texts-replies.png" srcset="https://f001.backblazeb2.com/file/NinoPublic/pictures/texts-replies.png 2x" alt="Screenshot of a chat conversation (with all the text blurred). The first item is a turquoise bubble containing a white box with a quoted message from Nino. The bottom half of the turquoise bubble contains the reply to Nino&#x27;s message. Below the bubble is a button titled “Show reply”. Next is a right-aligned blue bubble, also containing a white box with a quoted message and some response text."> </figure> <p>This is Telegram, but it seems to work just as well with Messenger. Also, the original message gets a “Show reply” button and a “Show All Replies” button. “Show All Replies” opens a little popup with all replies to that particular message. (Would be nice if the UI team could make up their minds on whether they want sentence case or title case for their button labels tho.)</p> <h3 id="forwarded-messages">Forwarded messages</h3> <p>Nope. At least in Telegram, forwarded messages just show up as regular messages. This can be confusing, but people in my circles mostly use forwarding to quickly send a message to multiple people (i.e., send long message to person A, then forward to person B, C, etc.). In that case, it doesn’t matter that it’s not marked.</p> <h3 id="stickers">Stickers</h3> <p>The Telegram integration even gives you an extra button for stickers.</p> <h3 id="reactions">Reactions</h3> <p>Working totally fine in Telegram and Messenger (haven’t checked others), but the emoji picker looks a bit odd:</p> <figure> <img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/.texts-emoji-picker~imageoptim.png" srcset="https://f001.backblazeb2.com/file/NinoPublic/pictures/.texts-emoji-picker~imageoptim.png 2x" alt="Screenshot of a reaction-emoji-picker like you&#x27;d see in most chat apps, but a random subset of the emoji are rendered as unsettling black-and-white line drawings instead of full-color pictures."> </figure> <h3 id="spoilers">Spoilers</h3> <p>Yep. Text marked as a spoiler/redacted works with Telegram. You can click to reveal it.</p> <h2 id="resource-usage">Resource usage</h2> <p>CPU usage seems ok, but it uses 1 GB of RAM. But then again, what doesn’t, these days? My browser uses 5½ GB.</p> <h2 id="pricing">Pricing</h2> <p>Texts is free for up to 10 accounts, and £12 per month if you have more. This seems fair. I don’t have 10 accounts in the app, so I’m using the free tier. But, assuming I don’t find any big issues, I’d absolutely be willing to pay £12 per month for an app like this.</p> <h2 id="conclusion">Conclusion</h2> <p>Using Texts really does revive some of that Adium feeling from the early 2000s. I’ll keep using it for now and see how it goes.</p> Wed, 05 Jun 2024 12:56:00 GMT https://ninoan.com/texts/ https://ninoan.com/texts/ Trying to stop my glasses sliding down my face <p>For some reason, my glasses really don’t like staying on my face. Since this is especially bad when I’m sweating, I wanted to figure out a way to improve the situation before the summer. It looks like wrapping a hair tie around each temple, just behind the place that rests on the ear, might help keep the glasses in place a bit more.</p> <p>So far this seems to work for me, and it doesn’t feel like it adds too much pressure on my head. One drawback is that now my glasses sometimes come off when I take off my headphones, but that is probably overall still better than <em>constantly</em> fighting the glasses.</p> <p><img src="https://f001.backblazeb2.com/file/NinoPublic/pictures/glasses.png" alt="A pair of glasses with cream-colored plastic frames sitting on a white surface. Each temple has a black hair tie wrapped around it, just behind the part where it bends."></p> Fri, 03 May 2024 15:02:36 GMT https://ninoan.com/glasses/ https://ninoan.com/glasses/ Mostly objective things to appreciate about Python <p>I really don’t like Python<sup><a href="#user-content-fn-why" id="user-content-fnref-why" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>, but I have to use it for work, and so I have set myself the goal of learning to appreciate it. This is a list of mostly objective claims about Python that I appreciate. Submissions are welcome, but I’ll only add them if I agree that they’re basically objectively true.</p> <ul> <li>Python starts up in less than 0.1s, so it can be used for short scripts.</li> <li>I guess it is more readable than <a href="https://en.wikipedia.org/wiki/APL_(programming_language)">APL</a> or Cobol.</li> <li>You can FFI into <del>better</del> other languages relatively easily.</li> <li>It has a more complete standard library than OCaml or C.</li> <li>Package management is easier than it used to be, I think.</li> <li>It has lots of libraries.</li> <li>Some apps (e.g., Blender) use Python for scripting, so knowing Python will help there.</li> <li>It has official Qt bindings, so should be one of the easier language-choices for making little GUIs.</li> <li>Type annotations + Pyright is better than nothing.</li> <li>This is not really an objective thing, but I appreciate the fact that the culture has agreed to import whole namespaces (e.g. <code>import pandas as pd</code>, <code>import numpy as np</code>), so you can always tell where a function or class is coming from (e.g. <code>pd.DataFrame</code>, etc). This also probably helps avoid using “private” APIs: if the top of my file says <code>from whatever import _hello</code>, a thousand lines further down, it won’t look out of place to call <code>_hello()</code> (“maybe it’s just a private helper function defined in this file!”). But if you do <code>import whatever</code>, you’ll have to write <code>whatever._hello()</code>, which will stick out like a marginally sore thumb.</li> <li><a href="https://docs.python.org/3.12/library/functions.html#zip"><code>zip</code></a> is a built-in function.</li> </ul> <p>I’ll add more points as I think of them.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-why"> <p>I have an unfinished post titled “Unhinged rant about the Python community” explaining some of my feelings. Maybe one day I’ll publish that too. <a href="#user-content-fnref-why" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Thu, 14 Dec 2023 12:07:00 GMT https://ninoan.com/appreciate-python/ https://ninoan.com/appreciate-python/ Words that German does have and English does not <p>You’ve heard me complain about how, while people will tell you that “the Germans have a word for that”, German actually has too <em>few</em> words, and one thing that makes English so beautiful is its rich vocabulary.</p> <p>(If you haven’t heard me rant about it, all of those “the Germans have a word for that” words are just compound words that work just as well in English – German just makes things confusing by leaving out the spaces or hyphens. (E.g., “Schadenfreude” is just “damage-joy”. It sounds weird in English, but that’s just because it’s not established as a common phrase.) This compound-word game can be a lot of fun at parties, but it doesn’t help you when you realize German doesn’t really have different words for “proof” and “evidence”.)</p> <p>So, after two paragraphs of preamble, here’s the list (at the time of writing, this list has only two items, but I may extend it over the years):</p> <ol> <li>“schmatzen” (verb). This word refers either to the act of chewing with your mouth open, or mouth sounds that sound like it. E.g., your cat might pounce on your chest and wake you up with schmatz sounds, even though he’s not actually eating at the time.</li> <li>“lutschen” (verb). To lick or suck on something that is predominantly or entirely in one’s mouth, e.g. a bon-bon, lollipop, or dick.</li> <li>“zerspielt” (adjective?). When you’ve destroyed something by playing with it too vigorously. (added 2 Feb 2025, h/t Anne)</li> </ol> Mon, 04 Sep 2023 08:08:33 GMT https://ninoan.com/german-words/ https://ninoan.com/german-words/ Modifier keys are named all wrong <p>The <kbd>option</kbd> key in macOS should be called <kbd>alt</kbd> like on Windows, because it is used to type <em>alternative</em> characters, or to run alternative commands when used in conjunction with the <kbd>command</kbd> key. On Windows, the <kbd>alt</kbd> key should be called <kbd>command</kbd> because you use it to move focus to the menus to execute commands. The <kbd>alt gr</kbd> key on Windows should become the <kbd>alt</kbd> key because that’s what you use to type alternative characters. The <kbd>shift</kbd> key should be called <kbd>caps</kbd> because nobody has used a typewriter in decades, and nothing is being shifted anymore. (The name isn’t perfect because you also use that key to type alternative symbols on the number row, but we already have an <kbd>alt</kbd> key. Maybe we could use our new <kbd>alt</kbd> key to type all the symbols from the number row and the number keys can produce old-style figures without <kbd>caps</kbd> and lining figures with – though that would require changes to unicode, so that might be out of scope for this project.) The <kbd>caps lock</kbd> key should be dropped entirely and replaced with an escape key that functions as <kbd>ctrl</kbd> or <kbd>command</kbd> when held down, according to user preferences. On keyboards that have one, the <kbd>fn</kbd> key should be renamed to something like <kbd>alt-ctrl</kbd> because it’s usually like a <kbd>ctrl</kbd> or <kbd>command</kbd> key, but it does different things. Maybe <kbd>special</kbd> would work, as a nod to the old “Special” menu in Classic Mac OS.</p> <p>And while we’re renaming keys, the <kbd>tab</kbd> key should be renamed to <kbd>shift</kbd> because we make tables using the “Insert table” command, not by pressing the <kbd>tab</kbd> key. The <kbd>tab</kbd> key is used to shift text to the right, or to shift focus to the next input element. (On the other hand, <kbd>ctrl</kbd> + <kbd>tab</kbd> is used to navigate between browser tabs, but that’s one bit of elegance we can probably do without. (You can still say you’re “shifting” focus to the next browser tab, so it all works out in the end.))</p> Fri, 17 Jan 2020 08:00:00 GMT https://ninoan.com/modifier-keys/ https://ninoan.com/modifier-keys/ Muscle memory <p>Fun things I discovered about my muscle memory.</p> <!--more--> <h2 id="1-other-peoples-computers">1. Other people’s computers</h2> <p>For the last 5–10 years, I’ve been using the Dvorak keyboard layout for typing.<sup><a href="#user-content-fn-dvorak" id="user-content-fnref-dvorak" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> At this point, I’m pretty fast and usually don’t make a <em>ton</em> of mistakes. Since I almost never<sup><a href="#user-content-fn-almost" id="user-content-fnref-almost" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup> use a QWERTY layout,<sup><a href="#user-content-fn-qwerty" id="user-content-fnref-qwerty" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup> I’ve gotten really slow with it. So, when I’m helping a coworker with a problem, I’ll sometimes switch their keyboard to a Dvorak layout and try to type normally. But my hands will often think, <em>this keyboard feels different; it must be another person’s keyboard; other people use the QWERTY layout</em>, and so I keep typing words as though I were using a QWERTY layout, resulting in a big jumble of random letters. Or maybe it’s not necessarily that the keyboard feels different, and more that I know I’m using another person’s computer. Because when I plug a new keyboard into my own computer, I can usually use Dvorak without a problem.</p> <h2 id="2-proprioception4">2. Proprioception<sup><a href="#user-content-fn-joke" id="user-content-fnref-joke" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></h2> <p>I have two mechanical keyboards. At work, I use a <a href="https://ergodox-ez.com">keyboard</a> with an ergonomic split-layout. At home, I use a <a href="https://ergodox-ez.com/pages/planck">tiny</a> keyboard with slightly more traditional key layout. I can type reasonably fast on either of them. <em>However</em>, when I bring my home-keyboard into the office, my hands will just feel a mechanical keyboard, and since I am in the office, they assume I’m using the split keyboard, and keep trying to use it as such. When I tell my hands to insert a new line, suddenly my thumb will press the “Upper layer” button, because that’s where the enter key is on the split keyboard. This does not happen when I use the tiny keyboard at home, so, somehow, my hands can figure out whether I’m in the office or not.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-dvorak"> <p>I learned Dvorak back in high school because I was dissatisfied with the <a href="https://www.neo-layout.org">Neo layout</a>’s performance for English text and, as a high school student, I could afford the approximately 1 month of being essentially unable to type. If you’re considering learning Dvorak because you think it’ll make you faster, the speed gains are negligible, and probably not worth typing slow for 1–3 months. If you have trouble with RSI and are looking for fun and quirky ways to address the issue, Dvorak may be for you – although I hear Colemak is better, so maybe try that instead. <a href="#user-content-fnref-dvorak" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-almost"> <p>I do use a QWERTY layout when typing Chinese. Specifically, I use the Sougou Shuangpin layout. Shuangpin because Pinyin has me press way to many keys, and I don’t trust the autocompletion, and the Sougou variant because it was the first one in the list on iOS.</p> <p>Also, I use QWERTY software keyboards, both on my phone and tablet. <a href="#user-content-fnref-almost" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-qwerty"> <p>Ironically, the word “QWERTY” is more fun to type on a Dvorak keyboard than on a QWERTY keyboard, because you don’t get into that uncomfortable spot where your left index finger has to type 50% of the letters. <a href="#user-content-fnref-qwerty" data-footnote-backref="" aria-label="Back to reference 3" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-joke"> <p>The title for this section is a joke. I know proprioception has nothing to do with detecting when you’re in the office or at home. (Or, at least, I hope it doesn’t. Otherwise this footnote would be very embarrassing.) <a href="#user-content-fnref-joke" data-footnote-backref="" aria-label="Back to reference 4" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Tue, 03 Sep 2019 00:00:00 GMT https://ninoan.com/muscle-memory/ https://ninoan.com/muscle-memory/ Are rails partials actually slow? <p>At my previous job, we were told not to use partials to clean up our view code, because each rendering of a partial would add around 10ms to the overall response time. After I was told this I did a quick test in my dev environment, but I’d never actually tested the claim on production … until today!</p> <!--more--> <h2 id="the-setup">The setup</h2> <p>I created a new rails project and generated a scaffold I called <code>things</code>. On the index page, underneath the auto-generated table, I put the following:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="erb"><code><span class="line"><span style="color:var(--astro-code-foreground)">&#x3C;% </span><span style="color:var(--astro-code-token-keyword)">if</span><span style="color:var(--astro-code-foreground)"> params[</span><span style="color:var(--astro-code-token-constant)">:manypartials</span><span style="color:var(--astro-code-foreground)">]</span><span style="color:var(--astro-code-token-punctuation)">.</span><span style="color:var(--astro-code-token-function)">present?</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">>Many partials:&#x3C;/</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;% </span><span style="color:var(--astro-code-token-constant)">1000</span><span style="color:var(--astro-code-token-punctuation)">.</span><span style="color:var(--astro-code-token-function)">times</span><span style="color:var(--astro-code-token-keyword)"> do</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;%= render </span><span style="color:var(--astro-code-token-string-expression)">"simplepartial"</span><span style="color:var(--astro-code-token-punctuation)">,</span><span style="color:var(--astro-code-token-constant)"> iterations:</span><span style="color:var(--astro-code-token-constant)"> 1</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;% </span><span style="color:var(--astro-code-token-keyword)">end</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)">&#x3C;% </span><span style="color:var(--astro-code-token-keyword)">else</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">>One big partial:&#x3C;/</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;%= render </span><span style="color:var(--astro-code-token-string-expression)">"simplepartial"</span><span style="color:var(--astro-code-token-punctuation)">,</span><span style="color:var(--astro-code-token-constant)"> iterations:</span><span style="color:var(--astro-code-token-constant)"> 1000</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)">&#x3C;% </span><span style="color:var(--astro-code-token-keyword)">end</span><span style="color:var(--astro-code-foreground)"> %></span></span></code></pre> <p>I then created the partial <code>simplepartial</code> and added this code:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="erb"><code><span class="line"><span style="color:var(--astro-code-foreground)">&#x3C;% iterations</span><span style="color:var(--astro-code-token-punctuation)">.</span><span style="color:var(--astro-code-token-function)">times</span><span style="color:var(--astro-code-token-keyword)"> do</span><span style="color:var(--astro-code-foreground)"> %></span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> &#x3C;</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">>This is a simple partial. Hello from the partial!&#x3C;/</span><span style="color:var(--astro-code-token-string-expression)">p</span><span style="color:var(--astro-code-foreground)">></span></span> <span class="line"><span style="color:var(--astro-code-foreground)">&#x3C;% </span><span style="color:var(--astro-code-token-keyword)">end</span><span style="color:var(--astro-code-foreground)"> %></span></span></code></pre> <h2 id="results">Results</h2> <p>I launched the dev server with <code>rails s</code> and the production server with <code>rails s -e production</code>. I ran</p> <p><code>time curl "http://0.0.0.0:3000/things?manypartials=true" > /dev/null</code></p> <p>and</p> <p><code>time curl "http://0.0.0.0:3000/things" > /dev/null</code></p> <p>to make the requests. (The pipe to <code>/dev/null</code> is to reduce the time spent printing stuff to the terminal.)</p> <table><thead><tr><th></th><th align="right">Many partials</th><th align="right">One big partial</th></tr></thead><tbody><tr><td>Dev</td><td align="right">44.365s</td><td align="right">0.852s</td></tr><tr><td>Production</td><td align="right">0.273s</td><td align="right">0.152s</td></tr></tbody></table> <p>So it seems that rendering 1000 partials will cause around 100–200ms of extra rendering time. That’s certainly not great, but it may not be too high a price to pay for HTML templates not growing to thousands of lines.</p> Sun, 04 Mar 2018 21:38:04 GMT https://ninoan.com/slow-partials/ https://ninoan.com/slow-partials/ DPI-dependent CSS in Atom and everywhere else too <p>When programming on low-resolution screens, I like to use 10pt Monaco with antialiasing turned off. But when switching to my MacBook’s retina display, I want antialiasing turned back on. Until now, I would manually comment/uncomment some CSS in Atom’s <code>styles.less</code> file to change this.</p> <p>Turns out, you can define <a href="https://css-tricks.com/snippets/css/retina-display-media-query/">CSS rules based on the current screen resolution</a>. By adding the following to <code>styles.less</code>, Atom automatically switches the font and antialiasing settings as soon as you move the window from one screen to the other:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="scss"><code><span class="line"><span style="color:var(--astro-code-token-string-expression)">atom-text-editor</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> @media</span><span style="color:var(--astro-code-foreground)"> (</span><span style="color:var(--astro-code-token-constant)">-webkit-max-device-pixel-ratio</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> 1</span><span style="color:var(--astro-code-foreground)">), (</span><span style="color:var(--astro-code-token-constant)">max-resolution</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> 150</span><span style="color:var(--astro-code-token-keyword)">dpi</span><span style="color:var(--astro-code-foreground)">) {</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> .line</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> -webkit-font-smoothing</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> none</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> font-family</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> Monaco</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> font-size</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> 10</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> transform</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-function)"> translateX</span><span style="color:var(--astro-code-token-constant)">(1</span><span style="color:var(--astro-code-token-keyword)">px</span><span style="color:var(--astro-code-token-constant)">)</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> font-style</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> normal </span><span style="color:var(--astro-code-token-keyword)">!important</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-string-expression)"> *</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> font-style</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> normal </span><span style="color:var(--astro-code-token-keyword)">!important</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> }</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>The <code>transform</code> line is there because Atom will sometimes cut off the first column of pixels when antialiasing is turned off.</p> Mon, 04 Dec 2017 00:00:00 GMT https://ninoan.com/dpi-css/ https://ninoan.com/dpi-css/ Smooth cursor motion in Atom <p>I’m currently trying out Atom as the main tool for my computer job and I wanted to make it more fun, so I added some CSS to make the cursor move smoothly and give the text-selection rounded corners. To try it yourself, click on <em>Stylesheet</em> in the <em>Atom</em> menu and paste this code:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="css"><code><span class="line"><span style="color:var(--astro-code-token-string-expression)">atom-text-editor</span><span style="color:var(--astro-code-token-function)"> .cursor</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> transition</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> all 80</span><span style="color:var(--astro-code-token-keyword)">ms</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-string-expression)">atom-text-editor</span><span style="color:var(--astro-code-token-function)"> .selection</span><span style="color:var(--astro-code-foreground)"> {</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> border-radius</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> 4</span><span style="color:var(--astro-code-token-keyword)">px</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> transition</span><span style="color:var(--astro-code-token-keyword)">:</span><span style="color:var(--astro-code-token-constant)"> all 20</span><span style="color:var(--astro-code-token-keyword)">ms</span><span style="color:var(--astro-code-foreground)">;</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>Now everything is nice and smooth. Yay!</p> Sun, 08 Oct 2017 00:00:00 GMT https://ninoan.com/smooth-cursor-motion/ https://ninoan.com/smooth-cursor-motion/ Big numbers, small numbers <p>You don’t want things to be complicated. I get it. I am here to help. Don’t worry, it’s all going to be over soon.</p> <!--more--> <h2 id="contents">Contents</h2> <ul> <li><a href="#preamble--skip-this-section-if-you-dont-care">Preamble – skip this section if you don’t care</a></li> <li><a href="#the-solution--read-this-part">The solution – read this part</a></li> </ul> <h2 id="preamble--skip-this-section-if-you-dont-care">Preamble – skip this section if you don’t care</h2> <p>Having numbers and letters in the same text is a difficult challenge for typography: Arabic numerals have a completely different origin, and thus completely different shapes than roman letters. If you just <em>somehow</em> throw them in the middle of your text, the numbers will look out of place. But (let’s pretend) you want them to look like they fit in. You don’t want your numbers to show up at their friend’s party and someone walks up to <del>you</del> them and is like, “So how do you know the host?”, and <del>you’re</del> the numbers are like, <del>“I study physics with them,”</del> “We come from the other end of the world,” and the person is like, “Haha yeah, I figured, from the way you look.” Because that would be embarrassing.</p> <p>So the typography friends all sat down together and adapted numbers to look more like letters. Since there are two kinds of letters, they made two kinds of numbers. One kind to go well with upper case letters, for titles and tables, and one to go well with lower case letters, for body text. They are called by many names, but we’ll call them upper case and lower case numbers. Using upper case numbers in the middle of body text has the same effect as using ALL CAPS in the middle of body text: it makes the number seem damn important. That’s fine if the number <em>is</em> damn important, but most numbers are not.</p> <p>Quick historical interlude from Robert Bringhurst’s <a href="https://books.google.de/books?id=940sAAAAYAAJ"><em>The elements of typographic style</em></a>:</p> <blockquote> <p>During most of the nineteenth and twentieth centuries, lining figures were more widely known as ‘modern’ and text figures as ‘old-style.’ Modernism was preached as a sacred duty, and numbers, in a sense, were actually deified. Modernism is nothing if not complex, but its gospel was radical simplicity. Many efforts were made to reduce the Latin alphabet back to a single case. (The telegraph and teletype, with their unicameral alphabets, are also products of that time.) These efforts failed to make much headway where letters were concerned. With numbers, the campaign had considerable success. Typewriters soon came to have letters in both upper and lower case but numbers in upper case alone. And from typewriters come computer keyboards.</p> <p>Typographic civilization seems, nonetheless, determined to proceed. Text figures are again a normal part of type design – and have thus been retroactively supplied for faces that were earlier denied them. However common it may be, the use of titling figures in running text is illiterate: it spurns the truth of letters.</p> </blockquote> <p>Ok, let’s continue.</p> <p>Unfortunately, uppercase numbers aren’t always bad. Especially the scientifically minded will often wish to have big tables of numbers, and the contents of tables are supposed to look nice and regular – “tabular”, you might say. In this case, it makes sense to take advantage of the uniform, blocky shapes of upper case numbers to make everything line up neatly. As a result, we’d want lower case numbers for text, and upper case numbers for tables.</p> <p>Buuuuuuut, because fonts and the web and everything are complicated and we can be glad to even occasionally get half-decent fonts on the web at all, this is too much to ask. Instead, let’s see if we can find a middle ground where everyone is only sorta unhappy.</p> <h2 id="the-solution--read-this-part">The solution – read this part</h2> <p>From what we’ve learned in the last section, if you ever want to have a table with numbers in your text, using lowercase numbers is kind of a nonstarter. Instead, we’re aiming for uppercase numbers that are less awful.</p> <p>Let’s look at some fonts:</p> <figure> <img src="http://ninoan.com/images/big-numbers.PNG" alt="A selection of fonts, demonstrating how they handle numbers"> <figcaption>A number and a typo. From top to bottom: Times, EB Garamond, Palatino, Hoefler Text, Gentium Book.</figcaption> </figure> <p><img src="http://ninoan.com/images/heights.JPG" alt="Different heights that exist in fonts"> {:.right.half}</p> <p>In the first and third line (Times New Roman, Palatino), the problem is clearly visible: the numbers are absolutely gigantic and distract from the text. In the second and fourth line (EB Garamond, Hoefler Text), lowercase numbers emulate the dynamics of the text and thus blend in better. In the fifth line (Gentium Book), the numbers are upper case and thus usable for tables and titles, but they aren’t obnoxiously huge. Now, the makers of Gentium did not just scale down the numbers and call it a day. Instead, they lowered the entire cap height (see picture on the right or possibly above). This is especially visible in the “The” at the beginning of the line; the “T” is much shorter than the “h”. As a result, lowercase letters can retain their ascender height and don’t look squished, and numbers (which have cap-height) aren’t obnoxious. On top of that, you get the positive side effect of having nice-looking acronyms without needing small-caps, which has been another source of constant frustration for me.</p> <p>I first saw this technique in the font FiveThirtyEight use:</p> <p><img src="http://ninoan.com/images/fivethirtyeight-font.JPG" alt="FiveThirtyEight sample"></p> <p>By the nature of their content, they need a lot of numbers and acronyms, while still wanting to maintain a generally nice-looking page. Their font solves this problem wonderfully.</p> <p>In conclusion: If you want good looking text and not worry about things and not bother with small numbers, find a font with a small cap-height and/or large x-height, and ideally with long-enough ascenders that it doesn’t look all cheap and squished. If you’re unsure, just use Gentium Book – that one’s in Google Docs, looks cool, and has all kinds of non-latin accents and stuff too.</p> Wed, 15 Mar 2017 00:00:00 GMT https://ninoan.com/big-numbers/ https://ninoan.com/big-numbers/ Willpower day <h1 id="background">Background</h1> <p>I noticed I wasn’t happy with the way I spend my time. Over the last year or so I learned to structure my work habits such that I need the least amount of willpower possible to get myself to work. I tried hard to get myself to do things without requiring willpower and, in the process, built somewhat of an aversion to do anything that seemed like it might require effort. For the most part, this was good: I learned to notice moments when I just didn’t have the mental capacity to do work, and so learned not to judge myself for sometimes <em>not</em> working and instead looking at comics on the internet.</p> <!--more--> <p>On the flip-side, I have become dissatisfied with the amount of challenging activities I do in my non-work time. Too often, I spend my after-work time doing only effortless things, neglecting my desire to do low-but-finite-effort activities like reading, writing<sup><a href="#user-content-fn-writing-effort" id="user-content-fnref-writing-effort" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>, or even just tidying up the apartment for a few minutes.</p> <p>It’s not that I <em>never</em> do anything useful with my time, but I feel like I could increase the quality-density of my time by making more of an effort. Additionally, maybe spending a bit of willpower will allow me to build a habit of taking fewer (or shorter) breaks and, generally, living (at least somewhat) <em>faster</em>.</p> <h1 id="the-experiment">The experiment</h1> <p>So I decided to do an experiment: For one day, I spend as much willpower as I can to combat my usual slowness and aversion to effortful tasks. On the object level, this meant roughly three things:</p> <ol> <li>When I’m taking time to relax, instead of watching cat videos, I’ll read things, take notes, etc.</li> <li>Whenever I’m feeling like I just want to take a break and not do <em>anything</em>, I’ll go against that urge and work anyway. The reasoning behind this is that, if it turns out I can’t focus in the moment, I can still stop working. But at least I don’t run the risk of underestimating my ability to work.</li> <li>I resist the urge to put tasks off if I can easily do them immediately.</li> </ol> <h1 id="the-result">The result</h1> <p>Overall, the results of this experiment are surprisingly unspectacular.</p> <p>Getting up in the morning wasn’t a problem since I had an early call that I was looking forward to. After that, I tried, just for fun, to step into the shower before the water was at the right temperature. That worked … so … yay.</p> <p>Looking at the way I spent my time during the day, it seems like noticing when I’m doing nothing, and then doing something instead, is a good idea:</p> <figure> <img src="/images/willpower-time.JPG" alt="Pie chart showing the distribution of activities on an average day, compared to willpower day"> <figcaption>Time tracking results on an average day compared to Willpower Day. Making charts from spreadsheets is really difficult.</figcaption> </figure> <p>I spent significantly more time working and less time doing “break” than on the average day.</p> <p>What makes the experiment so unspectacular is that it turned out there were actually not that many situations where I could really change anything using willpower. I could will myself to go in the cold shower, sure, and I can will myself to read a bit more, but when I can’t think because my brain is all used up, there is nothing I can do about that. There are some emails I can will myself to write faster, but when I’m faced with a mental block because of anxiety or descision fatigue, what I really need is L-theanine, not <em>more</em> stress.</p> <p><del>The final unsurprising finding is that I got extremely tired and needed to sleep for 10½ hours after the day, plus a 90-minute nap during the day. Wow. That’s 12 hours total! Okay, let’s start this paragraph over.</del></p> <p>As a final finding, I was quite surprised with how much extra sleep my body required just from trying to work a little more. I already need a lot of sleep, but 12 hours is a bit more than I’m happy to accept. Two caveats to the surprise:</p> <ol> <li>Since I had an early morning call I slept only 7½ hours the previous night, which is a bit less than my average.</li> <li>I just today realized that there is no more caffeinated coffee in this house and I may just have been feeling strangely tired during the day because I was drinking decaf without realizing it.<sup><a href="#user-content-fn-caf" id="user-content-fnref-caf" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></li> </ol> <h1 id="in-conclusion">In conclusion</h1> <p>Using a bit more willpower seems good. Having regular designated willpower days may be good practice to get into the habit of being strong of will. Don’t overdo it though.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-writing-effort"> <p>Calling writing “low-effort” is a bit of a stretch, but taking some notes shouldn’t be impossible. <a href="#user-content-fnref-writing-effort" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-caf"> <p>This is pretty cool, too, because I’ve now spent 2 or 3 days without caffeine, which means the worst of the withdrawal headaches should be gone soon and I get a caffeine-addiction-reset. <a href="#user-content-fnref-caf" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Wed, 08 Mar 2017 19:12:00 GMT https://ninoan.com/willpower/ https://ninoan.com/willpower/ Inconsolata LGC with oldstyle numerals <p>In my perennial quest to make everyone love oldstyle numerals, I decided to make a fork of one of my favorite programming fonts, <a href="https://github.com/samposm/Inconsolata-LGC">Inconsolata</a>, and give it oldstyle numerals.</p> <figure> <img src="/images/inconsolata-oldstyle-example.png" alt="The numbers 0 through 9 set in Inconsolata LGC using oldstyle numerals"> <figcaption>This is what it looks like</figcaption> </figure> <p>The font can be downloaded <a href="https://github.com/nino/Inconsolata-LGC">from GitHub</a>.</p> <p>If I figure out how to properly use FontForge, I’ll also add <a href="https://github.com/tonsky/FiraCode">programming ligatures</a> at some point.</p> Sun, 18 Dec 2016 10:35:00 GMT https://ninoan.com/inconsolata-lgc-oldstyle/ https://ninoan.com/inconsolata-lgc-oldstyle/ Focusing on the breath <p>During mindfulness meditation, you’re supposed to focus on your breath. If you encounter any stray thoughts, you’re instructed to notice them and let them pass by, always returning your focus to the breath. I often find it difficult to stay focused on my breath for an extended length of time; it’s easy to <em>start</em> focusing on the breath, but after a short while, I’ll notice I’ve drifted off to thinking about something completely different.</p> <p>I recently realized that, since it’s easy to <em>shift</em> my focus instead of <em>holding</em> it, it is much easier to focus on one breath at a time. Then, when the breath is over, instead of trying to keep focused, I’d repeat the mental motion of shifting my focus to the breath – again, only for a single breath. This way, I’ve been able to stay focused on my breathing for many minutes without drifting off into other thoughts.</p> <p>So, in general, this is good, but it also feels like cheating since I’m not actually <em>holding</em> the focus; instead I’m doing a new mental motion after every single breath, which might put me in a less calm state than I’d be in if I could just learn to stay focused. I’d be curious to hear from people who have more experience with meditation, whether this is a bad way of doing things.</p> Tue, 15 Nov 2016 10:49:00 GMT https://ninoan.com/focusing-on-the-breath/ https://ninoan.com/focusing-on-the-breath/ Four or five thoughts on scientific writing <p>A few days ago I handed in my bachelor’s thesis in physics and I had a few thoughts while writing it. Some of these thoughts only apply to literature that features a lot of mathematical equations, but some apply to all academic writing, or all writing in general.</p> <!--more--> <ul> <li>{:toc}</li> </ul> <h1 id="cite-before-you-write-is-difficult">“Cite before you write” is difficult</h1> <p>I have the impression that a common mistake for undergrads writing their first scientific paper is that they start writing and only insert citations later. This takes a lot of time because they have to go through the whole text and remember where they read each argument they mention. Additionally, it leads to worse quality citations because many students will get lazy and only insert citations until their supervisors stop complaining.</p> <p>Like anyone who thinks they’re smart, I figured I wouldn’t make this mistake when I’m writing my bachelor’s thesis. But there I was, multiple pages written, a rough outline of the entire document finished, and I still had approximately zero citations in the text.</p> <p>This surprised me because, whenever I research a topic online and take notes about it for myself, I never fail to cite sources. I gather links to sources, put them at the bottom of a markdown file, and write my notes around those links.</p> <p>Why did I do it wrong in the context of my thesis? The problem wasn’t that I didn’t <em>know</em> citing as I write would be a good idea – I’d explicitly planned to do it. My best guess is that there was too much friction in the process. In the markdown example, all I have to do is copy the link to the source, paste it into the document, and put some identifier for the link at the beginning of the line (e.g. <code>[example]: http://example.com "Optional title"</code>). To get a proper citation into BibTeX, I have to find the paper on Google Scholar, click “Cite”, click “BibTeX”, copy the content of the entry, open the bibliography file, paste it in, change the identifier if it looks gross, go back to my document, and enter <code>\cite{identifier}</code>. It’s no surprise that people get lazy if that’s what they have to do for each source.</p> <p>A solution to this problem is using citation management applications. There is, for example, <a href="https://www.zotero.org/">Zotero</a>, which can store all your papers in a handy library. It even gives you a button for your browser to quickly add new references without digging through cite-menus on Google Scholar. Using such an app, you just add every paper you look at into your library and, from there, export your bibliography file. Then you can copy or drag the citations from your Zotero library without having to think about the details.</p> <p>I find it surprising that I hadn’t heard much or thought about them until a few weeks before my deadline.</p> <h1 id="on-formal-tone">On formal tone</h1> <p>I was surprised to see how much the tone of scientific papers differs from that of textbooks. So far I’d only ever read textbooks, and a lot of why I was excited to write my bachelor’s thesis was that I liked the styles of some textbooks. Authors like David Griffiths or David Halliday<sup><a href="#user-content-fn-davidwtf" id="user-content-fnref-davidwtf" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> write in a way that is both whimsical and easy to understand.</p> <p>Here are some fun examples:</p> <blockquote> <p>Before leaving our review of the notion of temperature, we should dispel the popular misconception that high temperature necessarily means a lot of heat. People are usually amazed to learn that the electron temperature inside a fluorescent light bulb is about 20,000°K. “My, it doesn’t feel that hot!”<sup><a href="#user-content-fn-chen" id="user-content-fnref-chen" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></p> </blockquote> <blockquote> <p>I would be delinquent if I failed to mention the archaic nomenclature for atomic states, because all chemists and most physicists use it (and the people who make up the Graduate Record Exam <em>love</em> this kind of thing). For reasons known best to nineteenth century spectroscopists, <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi><mo>=</mo><mn>0</mn></mrow><annotation encoding="application/x-tex">l=0</annotation></semantics></math></span> is called <em>s</em> (“sharp”), <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">l=1</annotation></semantics></math></span> is <em>p</em> (for “principal”), <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">l=2</annotation></semantics></math></span> is <em>d</em> (“diffuse”), and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>l</mi><mo>=</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">l=3</annotation></semantics></math></span> is <em>f</em> (“fundamental”); after that I guess they ran out of imagination, because now it continues alphabetically (<em>g</em>, <em>h</em>, <em>i</em>, but skip <em>j</em>—just to be utterly perverse, <em>k</em>, <em>l</em>, etc.). The shells themselves are assigned equally arbitrary nicknames, starting (don’t ask me why) with <em>K</em>: The <em>K</em> shell is <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mn>1</mn></mrow><annotation encoding="application/x-tex">n=1</annotation></semantics></math></span>, the <em>L</em> shell is <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mn>2</mn></mrow><annotation encoding="application/x-tex">n=2</annotation></semantics></math></span>, <em>M</em> is <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>n</mi><mo>=</mo><mn>3</mn></mrow><annotation encoding="application/x-tex">n=3</annotation></semantics></math></span>, and so on (at least they’re in alphabetical order).<sup><a href="#user-content-fn-griffithsquantum" id="user-content-fnref-griffithsquantum" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup></p> </blockquote> <p>And then I looked at articles and didn’t find a single joke in them! In fact the more papers I read, the more it felt like I was reading an entirely new language. Sentences are much longer than in non-academic writing. Most authors avoid using contractions (e.g. “can’t”, “isn’t”). Nobody puts any emotion into their writing, eliminating all traces of informality from the text. To say something “ran out” as in the second example above would probably already be too informal. It seems uncommon to add analogies to complicated explanations to make them intuitively easier to understand.</p> <p>In a <a href="https://www.ted.com/talks/john_mcwhorter_txtng_is_killing_language_jk?language=en" title="Txting is killing language. JK!!! – TED">TED talk</a>, linguist John McWhorter proposes that texting doesn’t harm teenagers’ writing skills because they subconsciously treat it like a form of speech rather than writing. Since writing a text message doesn’t <em>feel</em> like composing an essay, using <em>lol</em> and <em>rofl</em> won’t destroy the child’s ability to spell. I suspect that this compartmentalization of different means of communication is part of why formality is so important in academic writing: “Normal” written language can be imprecise but still easy to understand, if the reader and writer have shared background knowledge. Academic papers usually communicate complicated ideas where precision is important. It’s not hard to imagine that funny metaphors can easily lead to misunderstandings. So, while I don’t see how contractions would cause any problems on their own, the rule “be careful with funny metaphores” is harder to follow than “nothing even remotely informal ever”. If following either rule will lead to a well-argued paper, the latter is more efficient. Similarly, if it’s forbidden to write in terms of analogies, it’ll be easier not to be tempted to <em>think</em> in terms of bad analogies.</p> <p>So simply writing in a way that feels very formal and fancy is a good way to make sure one’s writing stays precise without having to think about it too much.</p> <p>But (1), on the other hand, “regular language” is a good tool for communication, too. We’ve all been trained to speak and write from very early on, and if you’re forced to write an basically a different language, it can slow down your thoughts and make you less efficient. Contractions aren’t “formal”, but they can make sentences more fluent and easy-to-parse. And analogies can offer valuable support for complicated explanations to steer the reader’s mind in the right direction such that they have an easier time following the text.</p> <!-- Compare the following two sentences: > Example haha rofl --> <p>But (2), using formal language is not a fool-proof way to make sure all of your thinking is precise. I recently read a paper that contained the sentence, “At the inner boundary there are basically two types of reasonable boundary conditions: …” Saying words like “basically”, or “essentially”, or “reasonable” may sound fancy, but doesn’t actually explain anything.</p> <p>But (3), using formal language can actually be harmful for clarity. You know how saying “I did X” sounds informal? A lot of the time, authors use “We did X” instead. This strikes me as a weird custom for papers that only have one author, but it’s still reasonably clear what the author means. It gets problematic when they start using the passive voice to sound fancy. <em>Using the passive voice is almost always a bad idea.</em> The reader needs to know who does what. “The stress tensor is given by …” Is that the definition? Does this follow from something? Are we assuming this? Using the passive voice is an easy way to accidentally leave out crucial information that the readers then have to figure out themselves.</p> <h1 id="nobody-ever-quotes-anything">Nobody ever quotes anything</h1> <p>I was wondering why there were so few quotations in the papers I read. Searching the internet revealed arguments like the following:</p> <blockquote> <p>Unlike other styles of writing, scientific writing rarely includes direct quotations. Why?</p> <ul> <li>Quotations usually detract from the point you want to communicate.</li> <li>Quotations do not reflect original thinking.</li> </ul> <p>Inexperienced writers may be tempted to quote, especially when they don’t understand the content. However, the writer who understands her subject can always find a way to paraphrase from a research article without losing the intended meaning – and paraphrasing shows that the writer knows what she is talking about.<sup><a href="#user-content-fn-quotes" id="user-content-fnref-quotes" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup></p> </blockquote> <p>I get that you want to make sure the author understands the concepts they’re writing about and didn’t just copy–paste stuff from other papers without having read them first. But even so, it strikes me as wildly inefficient for them to paraphrase the same thoughts over and over in every paper they write on the same topic. You wouldn’t believe how many times I’ve read about the viscosity prescription being the big unsolved problem of accretion disc physics.</p> <p>If you’re literally repeating what someone else already said, there is not much value in trying to come up with a new way to phrase it, unless you have a great new explanation. If everyone just quoted one really good explanation, they wouldn’t have to waste their time rewriting the same information and could instead spend their time doing more research.</p> <p>Next, if you paraphrase everything you read in a paper and then just say, “see &#x3C;Some paper>”, it can be hard for the reader to find the exact spot you’re referencing. Also, the reader has to have a copy of each paper you’re citing on hand, and find the statement you’re paraphrasing to check whether you <em>actually</em> understood the source material correctly. This is not optimal. On the web, this can be easily solved by putting a quotation of the relevant section, plus a reference to the original article, into a footnote. Then the reader can immediately see the sentence/paragraph what you’re referring to without having to seek out the source article. I can imagine the reason that this hasn’t caught on yet is that it doesn’t work well on paper. If you only have a limited amount of space, you don’t want to dilute your own text with foreign material – and, contrary to the web, footnotes must always take up physical space on the page.</p> <p>But yeah, I’m always happy when I look at how <a href="http://www.gwern.net/">Gwern</a> cites sources using enormous footnotes.</p> <h1 id="texmacs-is-better-than-latex-even-though-it-has-bugs">TeXmacs is better than LaTeX (even though it has bugs)</h1> <p><a href="http://texmacs.org">TeXmacs</a> is a <a href="https://en.wikipedia.org/wiki/WYSIWYG" title="Wikipedia: WYSIWYG">WYSIWYG</a> text editor that makes it easy to write sort of LaTeX-looking documents without the hassle of having to look at the source code and output files separately. What sets TeXmacs apart from other word processors is that you still get a lot of the benefits you expect from plain text editors. For example, one thing I like about writing in markdown is that I can see formatting control characters, like * for denoting the start and end of italics. Most WYSIWYG editors only show you the currently selected formatting options in a toolbar somewhere, which leads to the classic “Write an italicized word, write a normal word, delete the normal word, retype the normal word, <em>argh</em> now the new word is italicized too”-problem. In TeXmacs, when the cursor is in a region with formatting applied, it draws a little box around that region, so you can always tell what’s happening. Typesetting formulas in TeXmacs is the most pleasant experience I have ever had in my entire life and I never want to go back to writing LaTeX equations.</p> <p>Unfortunately, when I started writing, I discovered bugs that occasionally made TeXmacs freeze up and I had to restart it. It seemed relatively dangerous to make myself dependent on a program that sometimes freezes, but, in retrospect, I should’ve stuck with it. I switched to LaTeX and it felt like placing individual atoms of ink on the paper. This decision probably cost me a lot of time and writing quality, since I had less time for editing.</p> <p>I tried talking to people at my university about TeXmacs and most of them said, “I’m pretty happy with LaTeX,” or, “I’m pretty fast at typing LaTeX,” but once you see how fast you can really be, you will not want to go back.</p> <p>My hope is that if many people use TeXmacs, it’ll get more code contributions and become less buggy, because that’s supposedly how open-source works.</p> <h1 id="putting-each-sentence-on-a-single-line-in-your-text-file-is-a-good-idea">Putting each sentence on a single line in your text file is a good idea</h1> <p>Say you use LaTeX for your writing anyway, or you write in markdown. There are two common ways to write plain-text documents:</p> <ol> <li> <p><em>One line per paragraph</em>. Each paragraph is contained in a single “line” of text, followed by an empty line. Most text editors wrap lines dynamically, such that these one-line paragraphs just look like normal paragraphs.</p> </li> <li> <p><em>Hard wrapped lines</em>. Some people like to use old text editors like Vim. Vim isn’t very good at handling long lines that have to be displayed on multiple lines on the screen. So, instead of putting an entire paragraph into a single line, Vim users configure their text editor to insert line breaks after, e.g., 80 characters. This makes the files nice to look at in old text editors, but it makes editing more complicated: Whenever you change something at the beginning of a paragraph, the line breaks in the rest of the paragraph may no longer be in appropriate places, so you have to reformat the entire paragraph.</p> </li> </ol> <p>After switching to LaTeX, I wanted to try a technique I <a href="http://rhodesmill.org/brandon/2012/one-sentence-per-line/">read about</a> a few years back: Inserting a hard line break after each sentence or sub-clause. This sounds like a strange idea because it makes the right edge of your text look all jaggedy, but it is actually really useful.</p> <p>LaTeX and markdown ignore single line breaks in the text, so the output you create is going to look the same as when you use methods 1 or 2. But if you place line breaks after periods, or important commas, it suddenly becomes much easier to delete, edit, and re-order individual sentences. Another nice feature is that you can easily see when you’re accidentally starting each sentence with the same words. <em>And</em> your version control system is going to love keeping track of your writing because version control systems natively operate on lines and not sentences. <em>And</em> you can now see how long your sentences are, because they’re visually separated from each other. This can help prevent the common problem where scientists write extremely long sentences.</p> <p>Note that I’m only recommending putting line breaks in the source documents. Don’t put line breaks in published texts.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-davidwtf"> <p>Every author of good textbooks is called David. It’s true. <a href="#user-content-fnref-davidwtf" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-chen"> <p>Chen, Francis F. 1974. <a href="http://www.springer.com/us/book/9781441932013"><em>Introduction to Plasma Physics</em></a>. Springer, New York. <a href="#user-content-fnref-chen" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-griffithsquantum"> <p>Griffiths, David J. 2004. <a href="https://www.amazon.com/Introduction-Quantum-Mechanics-David-Griffiths/dp/0131118927"><em>Introduction to Quantum Mechanics</em></a>. 2nd edition. Upper Saddle River, NJ: Pearson Prentice Hall. <a href="#user-content-fnref-griffithsquantum" data-footnote-backref="" aria-label="Back to reference 3" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-quotes"> <p>The University of Washington <a href="http://www.psych.uw.edu/psych.php?p=339">Psychology Writing Center</a> on <a href="https://depts.washington.edu/psych/files/writing_center/quotes.pdf">using quotes in scientific writing</a>. <a href="#user-content-fnref-quotes" data-footnote-backref="" aria-label="Back to reference 4" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Thu, 18 Aug 2016 14:16:00 GMT https://ninoan.com/scientific-writing/ https://ninoan.com/scientific-writing/ ∞/3: Epilog · Abstraction <p><small>[<em>When I gave a draft of <a href="http://ninoan.com/notation/">part 3</a> to a friend to read, they commented on the first paragraph, “Math isn’t about giving things <em>funny</em> names; it’s about giving things meaningless names!” I had a thought on this topic but when I wrote part 3, but I couldn’t really make it fit and thought it wasn’t that interesting anyway, but my friend said it was, so here goes.</em> (<em>Parts <a href="http://ninoan.com/just-the-way-things-are/">1</a>, <a href="http://ninoan.com/models/">2</a>, <a href="http://ninoan.com/notation/">3</a>.</em>)]</small></p> <p>15-year old Nino had an idea once: “Math is stupid! When solving physics problems, you always have to take the actual physical quantities, then make up weird letters to put them through the equations, and then you have to translate them <em>back</em> to the physical quantities. This makes it harder to see what you’re doing because, when you glance at an equation, you only see the relations between letters and not the relationships between the actual physical quantities. In the hundreds of years that science has been around, <em>someone</em> must’ve come up with a more intuitive way to write equations. After all, computer scientists don’t just call their variables <code>a</code>, <code>b</code>, <code>c</code>, <code>x</code>, <code>y</code>, <code>z</code> either!”</p> <!--more--> <p>However, the meaningless symbols are actually a good thing. As I said <a href="http://ninoan.com/just-the-way-things-are/">earlier</a>, the scientist’s job is coming up with mathematical constructs that mirror the behavior of certain aspects of reality. They use this mathematical model to look for new unexpected behaviors and run experiments to check whether these behaviors can be observed in reality. Now, since many things in the universe kinda look the same if you squint a little, it makes sense to apply the same models to them. Thus, you can solve the complicated math parts of your model once, while getting new predictions for many different experiments. For example, you only have to solve the equations for the harmonic oscillator once to model everything that sort of vibrates a little.</p> <p>Or, you write an object’s kinetic energy as <span><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>E</mi><mi>k</mi></msub><mo>=</mo><mi>m</mi><msup><mi>v</mi><mn>2</mn></msup><mi mathvariant="normal">/</mi><mn>2</mn></mrow><annotation encoding="application/x-tex">E_k=m v^2/2</annotation></semantics></math></span></span>, and its rotation energy as <span><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>E</mi><mi>r</mi></msub><mo>=</mo><mi>I</mi><msup><mi>ω</mi><mn>2</mn></msup><mi mathvariant="normal">/</mi><mn>2</mn></mrow><annotation encoding="application/x-tex">E_r = I \omega^2/2</annotation></semantics></math></span></span>. In both cases, you have half of some property the object has (the mass <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>m</mi></mrow><annotation encoding="application/x-tex">m</annotation></semantics></math></span> or the moment of inertia <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>I</mi></mrow><annotation encoding="application/x-tex">I</annotation></semantics></math></span>), multiplied by the square of what the object is doing (How fast the object is moving <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>v</mi></mrow><annotation encoding="application/x-tex">v</annotation></semantics></math></span>, or how fast it’s spinning <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ω</mi></mrow><annotation encoding="application/x-tex">\omega</annotation></semantics></math></span>). So when you want to, e.g., form the time derivative of <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>E</mi><mi>k</mi></msub></mrow><annotation encoding="application/x-tex">E_k</annotation></semantics></math></span> or <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>E</mi><mi>r</mi></msub></mrow><annotation encoding="application/x-tex">E_r</annotation></semantics></math></span>, it still has the same form (<span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mover accent="true"><mi>E</mi><mo>˙</mo></mover><mi>k</mi></msub><mo>=</mo><mi>m</mi><mi>v</mi><mover accent="true"><mi>v</mi><mo>˙</mo></mover></mrow><annotation encoding="application/x-tex">\dot E_k = m v \dot v</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mover accent="true"><mi>E</mi><mo>˙</mo></mover><mi>r</mi></msub><mo>=</mo><mi>I</mi><mi>ω</mi><mover accent="true"><mi>ω</mi><mo>˙</mo></mover></mrow><annotation encoding="application/x-tex">\dot E_r = I \omega \dot\omega</annotation></semantics></math></span>) and you can easily see that you don’t have to do the calculation twice. Thinking about formulas in this way can also help with memorization: If you take the rule, “Energy is always<sup><a href="#user-content-fn-always" id="user-content-fnref-always" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> half of a property times the square of something that changes,” what do you think the energy stored in a capacitor looks like? If you’re a person who frequently finds themselves in situations where they have to answer such questions, you may remember that the Very Important Property of a capacitor is the capacitance <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>C</mi></mrow><annotation encoding="application/x-tex">C</annotation></semantics></math></span>, and a thing that changes is its voltage <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>V</mi></mrow><annotation encoding="application/x-tex">V</annotation></semantics></math></span>. This suggests the stored energy would be <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>E</mi><mi>c</mi></msub><mo>=</mo><mi>C</mi><msup><mi>V</mi><mn>2</mn></msup><mi mathvariant="normal">/</mi><mn>2</mn></mrow><annotation encoding="application/x-tex">E_c = C V^2/2</annotation></semantics></math></span> which, in fact, is correct.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-always"> <p>I mean, obviously not <em>always</em>, but when you need an answer quickly, it’s better to have a heuristic than to say nothing at all. <a href="#user-content-fnref-always" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Sun, 26 Jun 2016 11:16:00 GMT https://ninoan.com/abstraction/ https://ninoan.com/abstraction/ 3/3: Mathematical notation <p><small>[<em>Part 3 is about communicating mathematical ideas. <a href="http://ninoan.com/just-the-way-things-are/">Part 1</a>, <a href="http://ninoan.com/models/">Part 2</a>. I took care to contain the tedious math bits in single paragraphs, so the point is still clear if you choose to only read the fun parts.<sup><a href="#user-content-fn-meta" id="user-content-fnref-meta" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></em>]</small></p> <p><em>summary.</em> There is no such thing as “wrong” notation. All that counts is that you get the math right and communicate your ideas clearly.</p> <hr> <p>Last time I <a href="http://ninoan.com/models/">explained</a> how it’s not accurate to say that an electron “is” a wave function, because an electron is a thing in the universe and a wave function is a mathematical object, and mathematical objects don’t live in the real universe. When people talk about wave functions, they often use the letter <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ψ</mi></mrow><annotation encoding="application/x-tex">\psi</annotation></semantics></math></span>. Obviously, even though it looks all nice and wavy, the <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ψ</mi></mrow><annotation encoding="application/x-tex">\psi</annotation></semantics></math></span> itself isn’t the wave function either – it’s just its name. The concept of names is one we know and love from the real world: When I point at a chair and say, “This is Bob,” it’ll be clear what I mean when I explain that Bob has three legs. While it’s a terrible idea to call a chair Bob, giving things and their relationships with each other funny names is basically what mathematics is all about.</p> <!--more--> <p>Just like we grew up believing that dictionaries had authority over the reality of words, school taught us that <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>+</mo></mrow><annotation encoding="application/x-tex">+</annotation></semantics></math></span> means you add two numbers, <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>−</mo></mrow><annotation encoding="application/x-tex">-</annotation></semantics></math></span> means you subtract them, <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>×</mo></mrow><annotation encoding="application/x-tex">\times</annotation></semantics></math></span> means you times them, and so on. But these symbols weren’t handed down from the heavens to the first humans to walk the Earth. There was a time when they didn’t exist, and then someone <em>made them up</em>. Now, <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>+</mo><mo separator="true">,</mo><mo>−</mo><mo separator="true">,</mo><mi mathvariant="normal">/</mi><mo separator="true">,</mo><mo>×</mo></mrow><annotation encoding="application/x-tex">+, -, /, \times</annotation></semantics></math></span> are pretty basic and sometimes you may even have a use for them in every day life, so these symbols are generally assumed to refer to their corresponding arithmetic operation. There are a handful of other symbols that are pretty unambiguous in their meaning, like <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msqrt><mo lspace="0em" rspace="0em">⋅</mo></msqrt></mrow><annotation encoding="application/x-tex">\sqrt{\cdot}</annotation></semantics></math></span> or <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>=</mo></mrow><annotation encoding="application/x-tex">=</annotation></semantics></math></span>, but beyond this lies madness.</p> <h2 id="madness-1-when-wrong-is-right-and-right-is-complicated">madness 1: when wrong is right and right is complicated</h2> <p>The slope of a function graph is called the function’s derivative. (If you’re familiar with, like, math, this may be known to you.) When your function is a straight line, you get the slope by dividing the difference between two function values by the difference of their arguments. When we write the differences as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\Delta f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\Delta x</annotation></semantics></math></span>, the derivative can be written as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup><mo>=</mo><mi mathvariant="normal">Δ</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">Δ</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">f' = \Delta f / \Delta x</annotation></semantics></math></span>. Here, both <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\Delta f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\Delta x</annotation></semantics></math></span> are real numbers. When you have an arbitrary curve instead of a straight line, you can approximate the slope by choosing <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\Delta f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\Delta x</annotation></semantics></math></span> very small. The smaller you make them, the more accurate the result will be. Want infinite accuracy? Make them infinitely small. To make it clear that you’re working with infinitely small numbers (“infinitesimals”), you call them <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\mathrm d f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d x</annotation></semantics></math></span>, which gives you <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup><mo>=</mo><mi mathvariant="normal">d</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">f'=\mathrm d f/\mathrm d x</annotation></semantics></math></span>. Yay!</p> <p>But … what are <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\mathrm d f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d x</annotation></semantics></math></span>? Both are infinitely small, right? So if you try to calculate <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\mathrm d f</annotation></semantics></math></span>, you get <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span>. And if you try to calculate <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d x</annotation></semantics></math></span>, you get <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn></mrow><annotation encoding="application/x-tex">0</annotation></semantics></math></span>, too. If you took any other value for them, they’d no longer be infinitely small, and thus you’d get an inaccurate result. Thus, if <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d f/\mathrm d x</annotation></semantics></math></span> were a normal fraction like <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">Δ</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">Δ</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\Delta f/\Delta x</annotation></semantics></math></span>, it would be equal to <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>0</mn><mi mathvariant="normal">/</mi><mn>0</mn></mrow><annotation encoding="application/x-tex">0/0</annotation></semantics></math></span>, and we all know never to divide by zero. Hence, since <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d f/\mathrm d x</annotation></semantics></math></span> <em>does have</em> a value, it must be something else entirely. Remember <a href="http://ninoan.com/models/">part 2</a>, where I wrote,</p> <blockquote> <p>If Newtonian mechanics is wrong, why do we still use it so damn much?</p> </blockquote> <p>In that post, I explained that Newtonian mechanics often gives us the best prediction we can make, and using a “more correct” model would not give us a better result. Maybe this situation is similar: what do we get if we <em>pretend</em> <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi></mrow><annotation encoding="application/x-tex">\mathrm d f</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d x</annotation></semantics></math></span> are numbers, and that we just don’t know their values?</p> <p><em>example 1.</em> Say you’re told to solve the equation <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>⋅</mo><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">f(x) \cdot f'(x) = x^2</annotation></semantics></math></span>. This may look daunting at first, but when you write the derivative as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">d</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\mathrm d f/\mathrm d x</annotation></semantics></math></span> instead of <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup></mrow><annotation encoding="application/x-tex">f'</annotation></semantics></math></span>, you get</p> <p><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>⋅</mo><mfrac><mrow><mi mathvariant="normal">d</mi><mi>f</mi></mrow><mrow><mi mathvariant="normal">d</mi><mi>x</mi></mrow></mfrac><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup><mtext> </mtext><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">f(x) \cdot \frac{\mathrm d f}{\mathrm d x} = x^2\,.</annotation></semantics></math></span></p> <p>and multiplying each side by <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">dx</annotation></semantics></math></span> gives you <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mtext> </mtext><mi>d</mi><mi>f</mi><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup><mtext> </mtext><mi>d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">f(x)\,df=x^2\,dx</annotation></semantics></math></span>. This looks like integrals without the integral signs, so let’s put some on both sides:</p> <p><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo>∫</mo><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mtext> </mtext><mi>d</mi><mi>f</mi><mo>=</mo><mo>∫</mo><msup><mi>x</mi><mn>2</mn></msup><mtext> </mtext><mi>d</mi><mi>x</mi><mtext> </mtext><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">\int f(x)\,df = \int x^2\,dx\,.</annotation></semantics></math></span></p> <p>Now we have <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mn>2</mn></msup><mi mathvariant="normal">/</mi><mn>2</mn><mo>=</mo><msup><mi>x</mi><mn>3</mn></msup><mi mathvariant="normal">/</mi><mn>3</mn></mrow><annotation encoding="application/x-tex">f^2 /2 = x^3 / 3</annotation></semantics></math></span>, so <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><msqrt><mrow><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn></mrow></msqrt><msup><mi>x</mi><mrow><mn>3</mn><mi mathvariant="normal">/</mi><mn>2</mn></mrow></msup></mrow><annotation encoding="application/x-tex">f(x)=\sqrt{2/3} x^{3/2}</annotation></semantics></math></span>, and from this you can calculate the derivative <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><msqrt><mrow><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn></mrow></msqrt><mo stretchy="false">(</mo><mn>3</mn><mi mathvariant="normal">/</mi><mn>2</mn><mo stretchy="false">)</mo><msqrt><mi>x</mi></msqrt></mrow><annotation encoding="application/x-tex">f'(x) = \sqrt{2/3} (3/2) \sqrt x</annotation></semantics></math></span>. Popping this back into our initial equation, we get <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msqrt><mrow><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn></mrow></msqrt><mo>⋅</mo><msqrt><mrow><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn></mrow></msqrt><mo>⋅</mo><mo stretchy="false">(</mo><mn>3</mn><mi mathvariant="normal">/</mi><mn>2</mn><mo stretchy="false">)</mo><mo>⋅</mo><msup><mi>x</mi><mrow><mn>3</mn><mi mathvariant="normal">/</mi><mn>2</mn><mo>+</mo><mn>1</mn><mi mathvariant="normal">/</mi><mn>2</mn></mrow></msup><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">\sqrt{2/3}\cdot \sqrt{2/3}\cdot (3/2) \cdot x^{3/2 + 1/2} = x^2</annotation></semantics></math></span>. The roots of <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(2/3)</annotation></semantics></math></span> combine to a full <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>2</mn><mi mathvariant="normal">/</mi><mn>3</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(2/3)</annotation></semantics></math></span>, which then cancels with <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>3</mn><mi mathvariant="normal">/</mi><mn>2</mn><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(3/2)</annotation></semantics></math></span>, and you’re left with <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>x</mi><mn>2</mn></msup><mo>=</mo><msup><mi>x</mi><mn>2</mn></msup></mrow><annotation encoding="application/x-tex">x^2=x^2</annotation></semantics></math></span>, which tells you that your solution is correct. <em>/example 1.</em></p> <figure class="half"> <img src="/images/owls-shoes.jpg" alt="Owls sitting in shoes"> <figcaption>As a reward for getting through the last paragraph, here's a picture of plush owls sitting in shoes. Inhale. Exhale.</figcaption> </figure> <p>In other words, we used a “mathematically” “wrong” approach to correctly solve a problem. In many situations, this is even a good idea. As long as you can <a href="https://4gravitons.wordpress.com/2016/01/22/trust-your-notation-as-far-as-you-can-prove-it/" title="4 gravitons: Trust your notation as far as you can prove it">prove that what you’re doing works</a>, using symbols that look less mathematically rigorous but lead you to the solution more intuitively can save a lot of time and even help prevent mistakes.</p> <p>The cool thing about this is: Many people have already realized this, which is exactly the reason we have <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>f</mi><mo mathvariant="normal" lspace="0em" rspace="0em">′</mo></msup><mo stretchy="false">(</mo><mi>x</mi><mo stretchy="false">)</mo><mo>=</mo><mi mathvariant="normal">d</mi><mi>f</mi><mi mathvariant="normal">/</mi><mi mathvariant="normal">d</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">f'(x)=\mathrm d f/\mathrm d x</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mrow><mi mathvariant="normal">c</mi><mi mathvariant="normal">u</mi><mi mathvariant="normal">r</mi><mi mathvariant="normal">l</mi></mrow><mtext> </mtext><mover accent="true"><mi>v</mi><mo>⃗</mo></mover><mo>=</mo><mi mathvariant="normal">∇</mi><mo>×</mo><mover accent="true"><mi>v</mi><mo>⃗</mo></mover></mrow><annotation encoding="application/x-tex">\mathrm{curl}\,\vec v = \nabla\times\vec v</annotation></semantics></math></span> and so on, which means you can often be pretty wishy-washy about your notation and still end up making fewer mistakes.</p> <h2 id="madness-2-when-math-isnt-all-clear-and-unambiguous">madness 2: when math isn’t all clear and unambiguous</h2> <p>Mathematics is known for being clear and unambiguous. And yes, we can definitively<sup><a href="#user-content-fn-uncertain" id="user-content-fnref-uncertain" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup> prove that a theorem is either true or false, in contrast to the sciences where we only have falsifiable hypotheses and probabilities. But the <em>language</em> of math is just as bad as the language of language. Languages take shortcuts, sacrificing semantic clarity for the sake of data transmission rates. This is okay because most of the time everyone knows what you’re talking about.<sup><a href="#user-content-fn-except" id="user-content-fnref-except" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup> They tell you that mathematics doesn’t work that way, but I’m going to make the case that it does.</p> <p>You know how you do your particle physics homework, and you use the symbol <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>m</mi><mi>e</mi></msub></mrow><annotation encoding="application/x-tex">m_e</annotation></semantics></math></span>, and the only thing that symbol has ever stood for was the mass of an electron, and your teacher tries to make this elaborate argument about the importance of declaring your variables but somehow they completely miss that you never told anyone what <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>π</mi></mrow><annotation encoding="application/x-tex">\pi</annotation></semantics></math></span> means or what <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>e</mi></mrow><annotation encoding="application/x-tex">e</annotation></semantics></math></span> means or what <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>log</mi><mo>⁡</mo></mrow><annotation encoding="application/x-tex">\log</annotation></semantics></math></span> means, and so on? But then the cutoff point between what you need to define and what’s “obvious” isn’t really clear, and it becomes this huge frustrating mess? That’s the kind of thing I’m talking about. Or you say, “Let <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span> be the momentum operator,” and your professor complains that <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span> can’t be an operator because operators always need to have a hat, like <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mover accent="true"><mi>p</mi><mo>^</mo></mover></mrow><annotation encoding="application/x-tex">\hat p</annotation></semantics></math></span>, and you say, no, you defined <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span> to be the operator and shut up you’re being ridiculous, but the professor insists and you end up having to draw a little hat on <em>every single</em> instance of the letter <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>p</mi></mrow><annotation encoding="application/x-tex">p</annotation></semantics></math></span> in your equations even though leaving it out would give you 100% the correct result and cause zero confusion.</p> <p><em>example 3.</em> You have a function <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">f(x,t)</annotation></semantics></math></span> you want to integrate over <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span>.<sup><a href="#user-content-fn-sorry" id="user-content-fnref-sorry" data-footnote-ref="" aria-describedby="footnote-label">4</a></sup> You’ll write something like <span><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msubsup><mo>∫</mo><mi>a</mi><mi>b</mi></msubsup><mi>f</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">)</mo><mtext> </mtext><mi>d</mi><mi>x</mi><mo>=</mo><mo stretchy="false">[</mo><mi>F</mi><mo stretchy="false">(</mo><mi>x</mi><mo separator="true">,</mo><mi>t</mi><mo stretchy="false">)</mo><msubsup><mo stretchy="false">]</mo><mi>a</mi><mi>b</mi></msubsup></mrow><annotation encoding="application/x-tex">\int_a^b f(x,t)\,dx=[F(x,t)]_a^b</annotation></semantics></math></span></span>, right? And here it’s totally not clear if the brackets are to be evaluated with <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>x</mi></mrow><annotation encoding="application/x-tex">x</annotation></semantics></math></span> as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi></mrow><annotation encoding="application/x-tex">a</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>b</mi></mrow><annotation encoding="application/x-tex">b</annotation></semantics></math></span> or <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>t</mi></mrow><annotation encoding="application/x-tex">t</annotation></semantics></math></span> as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>a</mi></mrow><annotation encoding="application/x-tex">a</annotation></semantics></math></span> and <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>b</mi></mrow><annotation encoding="application/x-tex">b</annotation></semantics></math></span>. You <em>know</em>, from looking to the left of the equals-sign, but it isn’t clear just by looking at the right half of the equation. Likewise, some authors write volume integrals as <span><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mo>∫</mo><mi>V</mi></msub><mi>f</mi><mo stretchy="false">(</mo><msub><mover accent="true"><mi>r</mi><mo>⃗</mo></mover><mn>1</mn></msub><mo separator="true">,</mo><msub><mover accent="true"><mi>r</mi><mo>⃗</mo></mover><mn>2</mn></msub><mo stretchy="false">)</mo><mtext> </mtext><mi>d</mi><mi>τ</mi></mrow><annotation encoding="application/x-tex">\int_V f(\vec r_1, \vec r_2)\,d\tau</annotation></semantics></math></span></span>, where it’s unclear whether they’re integrating over <span><span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mover accent="true"><mi>r</mi><mo>⃗</mo></mover><mn>1</mn></msub></mrow><annotation encoding="application/x-tex">\vec r_1</annotation></semantics></math></span> or <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mover accent="true"><mi>r</mi><mo>⃗</mo></mover><mn>2</mn></msub></mrow><annotation encoding="application/x-tex">\vec r_2</annotation></semantics></math></span></span>. They fix this problem by putting explanations in the text and following conventions throughout the book so it’s clear from context what they mean. <em>/example 3.</em></p> <p><em>example 4.</em> Or, instead of integrals, let’s talk about derivatives. When you have a bunch of equations with many partial derivatives, it can be frustrating to write <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">∂</mi><msub><mi>V</mi><mi>x</mi></msub><mi mathvariant="normal">/</mi><mi mathvariant="normal">∂</mi><mi>x</mi><mo separator="true">,</mo><mi mathvariant="normal">∂</mi><msub><mi>V</mi><mi>y</mi></msub><mi mathvariant="normal">/</mi><mi mathvariant="normal">∂</mi><mi>x</mi><mo separator="true">,</mo><mi mathvariant="normal">∂</mi><msub><mi>V</mi><mi>x</mi></msub><mi mathvariant="normal">/</mi><mi mathvariant="normal">∂</mi><mi>y</mi></mrow><annotation encoding="application/x-tex">\partial V_x/\partial x, \partial V_y/\partial x, \partial V_x/\partial y</annotation></semantics></math></span>, and so on, over and over. This is because you’re told that the components of a vector field <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mover accent="true"><mi>V</mi><mo>⃗</mo></mover></mrow><annotation encoding="application/x-tex">\vec V</annotation></semantics></math></span> must always be written as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><msub><mi>V</mi><mi>x</mi></msub><mo separator="true">,</mo><msub><mi>V</mi><mi>y</mi></msub><mo separator="true">,</mo><msub><mi>V</mi><mi>z</mi></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(V_x,V_y,V_z)</annotation></semantics></math></span>. But since all these letters are only names, you can simply rename the components. For example, you could call the vector field <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mover accent="true"><mi>V</mi><mo>⃗</mo></mover><mo>=</mo><mo stretchy="false">(</mo><mi>X</mi><mo separator="true">,</mo><mi>Y</mi><mo separator="true">,</mo><mi>Z</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\vec V = (X,Y,Z)</annotation></semantics></math></span>. This already saves you the work of writing a subscript every time you reference one of the components of <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mover accent="true"><mi>V</mi><mo>⃗</mo></mover></mrow><annotation encoding="application/x-tex">\vec V</annotation></semantics></math></span>. But as an added bonus, you can now use the subscripts for other purposes, like partial derivatives. Thus, you can define <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">∂</mi><msub><mi>V</mi><mi>x</mi></msub><mi mathvariant="normal">/</mi><mi mathvariant="normal">∂</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\partial V_x/\partial x</annotation></semantics></math></span> as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>X</mi><mi>x</mi></msub></mrow><annotation encoding="application/x-tex">X_x</annotation></semantics></math></span>, <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">∂</mi><msub><mi>V</mi><mi>y</mi></msub><mi mathvariant="normal">/</mi><mi mathvariant="normal">∂</mi><mi>x</mi></mrow><annotation encoding="application/x-tex">\partial V_y/\partial x</annotation></semantics></math></span> as <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>Y</mi><mi>x</mi></msub></mrow><annotation encoding="application/x-tex">Y_x</annotation></semantics></math></span>, and so on. This is much shorter and way more fun! I tried that once and my TA was hopelessly confused because they didn’t understand that indices on vectors don’t <em>have to</em> mean selecting the corresponding component, even though I explicitly defined what everything means at the top of the page. <em>/example 4.</em></p> <p>Context matters when writing down equations. Everything doesn’t have to be clear in isolation, as long as you explain what’s happening. Obviously this doesn’t mean that you can just write literally anything because then it wouldn’t be clear anymore what you mean. But what you <em>can</em> do is invent new notation and use that if it makes sense. Note, however, that making up your own things isn’t always a good idea: there already exists a large set of shared expectations about what many symbols do and, often, it makes sense to go with established conventions. Like if you’re using other people’s equations, you shouldn’t just exchange all the letters for no good reason, even if you feel like <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>ξ</mi></mrow><annotation encoding="application/x-tex">\xi</annotation></semantics></math></span> is a much nicer letter than <span class="katex"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>λ</mi></mrow><annotation encoding="application/x-tex">\lambda</annotation></semantics></math></span>.</p> <p>In conclusion: Be free, be spontaneous, be brave – give your equations meaning instead of useless hats and subscripts. Sometimes, you really don’t have to repeat yourself.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-meta"> <p>In the future, when I have a list of my most notable essays, this one will be “The Long, Confusing, Meandering One.” This is my <em>A Feast For Crows</em> in terms of exciting action; it’s my <em>American Gods</em> in terms of quickly getting to the point; it’s my <em>Getting Things Done</em> in terms of elegant phrasing – you get the idea. Think of this more as a piece of performance art, rather than an informative article. <a href="#user-content-fnref-meta" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-uncertain"> <p>If you ignore <a href="http://lesswrong.com/lw/3be/confidence_levels_inside_and_outside_an_argument/">external uncertainties</a>. <a href="#user-content-fnref-uncertain" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-except"> <p>Except when you’re writing a 2000 word essay on how to use mathematical notation without an outline. What was this guy thinking? <a href="#user-content-fnref-except" data-footnote-backref="" aria-label="Back to reference 3" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-sorry"> <p>I’m so sorry about all the integrals. And all the footnotes. <a href="#user-content-fnref-sorry" data-footnote-backref="" aria-label="Back to reference 4" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Mon, 13 Jun 2016 16:33:00 GMT https://ninoan.com/notation/ https://ninoan.com/notation/ 2/3: Models <!--<small>\[_Part 2 is a complaint about people who may or may not understand how science works._\]</small>--> <p><small>[<em>Part 2 is the best part. <a href="http://ninoan.com/just-the-way-things-are" title="1/3: Just The Way Things Are | ❀✿❀ SuperLaserNino ✿❀✿">Part 1</a>, <a href="http://ninoan.com/notation/" title="3/3: Mathematical notation | ❀✿❀ SuperLaserNino ✿❀✿">part 3</a>.</em>]</small></p> <p>In science, we try to understand the world by building models and theories that describe it. You see an apple falling on your head, think, “oh, maybe that’s how the planets move, too”, and you write down rules that allow for the motion of planets and don’t allow for some phenomena you do not see, like things falling upward. You call the collection of those rules your model, or theory. When you have your model, you perform more experiments to test it, and every time your model’s prediction roughly matches your observations, you get more confident that your model is correct.</p> <!--more--> <p>What does it mean for a model to be correct? This is where the trouble starts. In school we learn that classical mechanics is a pretty good approximation of reality, but quantum mechanics and relativity is the <em>correct</em> theory of how the universe works.<sup><a href="#user-content-fn-qmrel" id="user-content-fnref-qmrel" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> This framing has always bothered me: If Newtonian mechanics is wrong, why do we still use it so damn much?</p> <p>Say you throw your keys out the window, and you want to calculate the path they will take to the ground as exactly as possible. So you get out your pencil and notebook and you start scribbling. Should you do your calculations relativistically? It would be more work, but you want to be really exact, so you add a bunch of γ’s everywhere and do your calculations relativistically. Then you notice that you’ve been assuming a flat earth the whole time. Oh no! All right – the earth’s a sphere, right? Let’s use that and we get an ellipse instead of a parabola for the flight path of our keychain. So – is the result more accurate than the classical, flat-earth one? Certainly not a lot more, but maybe a little? Nope. Not one bit. Why? Because the difference the air resistance makes, and the uncertainty of the direction you’re throwing in is much bigger than the difference a relativistic calculation could make.</p> <p>This still doesn’t mean that objects in our everyday lives have a different nature than single electrons or supermassive black holes. It just means that, if you put enough electrons and protons and stuff together, and you don’t make them too dense or too fast, you can predict what they’re going to do by using the model of classical mechanics.</p> <p>Many physics students, when they’re starting out, seem to feel like they’ve been promised something. That they’ll be led behind the curtains of reality and shown how the world <em>really</em> works. They seem to accept Newtonian mechanics – it works, after all. Medium sized objects, apparently, are Newtonian in nature. But it doesn’t take long for the disappointments to start. “Ideal gases don’t exist in nature, but it’s a simple model that works relatively well for lots of stuff,” they tell us. We’re not happy, but we’ll take the approximation, for now. We’re relieved when they teach us the “real gas” models, like Van der Waals gases. Then it gets worse again: “Ideal fluids are a pretty absurd approximation. There are no ideal fluids in the real world, and for most fluids, you don’t even get very good results using this model. But it’s simple, and it teaches the principles that you need to understand to work with better fluid models later.” We’re not taught the more complicated fluid models in that semester, and it leaves us with a quasy feeling. <em>Why are we being taught a rough approximation instead of the correct model?</em></p> <p>After a few semesters, the students get herded into a lab, to perform their first experiments themselves. Their belief is already shaken by countless lectures only teaching rough approximations instead of the real thing. But this is worse. Here, they finally see how the sausage is made. “All of physics is just estimations and approximations!” they exclaim. “Nothing here is exact!” It slowly sinks in that <em>this</em> is not just a rough approximation of what physicists do. Physics really is just approximations. Dutifully, the students draw error bars in their hand-crafted plots of noisy data, and wheep.</p> <p>What’s important is that this isn’t a bad thing, and especially not a preventable thing. The approximations aren’t the result of laziness. The small inaccuracies in every scientific theory are the result of countless hours of patient, skillful labor. It’s awesome that we can make very accurate predictions about the behavior of gases just using <em>pV</em>=<em>NT</em>, instead of calculating the exact position and momentum of every elementary particle in our system. Because, by the way, that “system” is the entire universe. It’s super cool that we can just pretend planets are single points in space, with a mass and no size, only feeling the gravity of the sun and not each other’s, and <em>still</em> predict their orbits with great accuracy. Planets aren’t spheres, their orbits aren’t circles, Kepler’s Laws of Planetary Motion aren’t woven in the fabric of the universe, and yet, pretending all this is true will <em>get us to Mars</em>.</p> <blockquote> <p>Since all models are wrong the scientist cannot obtain a “correct” one by excessive elaboration. On the contrary following William of Occam he should seek an economical description of natural phenomena. Just as the ability to devise simple but evocative models is the signature of the great scientist so overelaboration and overparameterization is often the mark of mediocrity. — <a href="https://en.wikiquote.org/wiki/George_E._P._Box" title="Wikipedia: George E. P. Box">George E. P. Box</a></p> </blockquote> <p>The goal here is not “understanding”. The goal is making good predictions. I see my fellow students understanding that ideal gases don’t exist in nature, but I don’t see them make the jump to “Van der Waals Gases don’t exist any more than ideal ones do”. I don’t see them understanding that “quantum wave functions” are a mathematical function instead of a thing, out there in the universe. The problem is that physics ventures so deep into the hidden parts of reality, that it’s no longer intuitively clear that there is a distinction between the map and the territory. They tell you about the paradox of the double slit experiment and you conclude, “electrons aren’t just particles”. They show you Schrödinger’s equation and solve it to get the wave function. “That explains it!” you think, and you conclude that electrons <em>are</em> wave functions.</p> <p>But <a href="http://www.smbc-comics.com/index.php?id=3805" title="Saturday Morning Breakfast Cereal">the universe</a> does not <a href="http://hpmor.com/chapter/64" title="Scroll all the way down to the last story.">run on math</a>. The reason the universe looks so much like it’s made of math when you apply science to it is because math is <em>really really versatile.</em> But this doesn’t mean our Laws of Physics are <a href="http://ninoan.com/just-the-way-things-are" title="1/3: Just The Way Things Are | ❀✿❀ SuperLaserNino ✿❀✿">more than</a> summaries of our observations. It’s not the universe that is good at being modeled by math – it’s the math that is good at modeling <em>anything</em>, be it our universe or universes with <a href="https://4gravitons.wordpress.com/2012/11/26/why-i-study-a-theory-that-isnt-true/" title="Why I Study a Theory That Isn’t “True”">different rules</a>.</p> <p>I’ve heard someone say, after reading a mechanics textbook, that they finally understand why perpetual motion is impossible. It’s because something something holonomic constraints can’t do any work because something dot product. This can’t possibly be true because that’s not the order in which things happened. First the perpetual motion machine didn’t work, then the theory was written and it was written in such a way that perpetual motion machines don’t work, and that’s why something something holonomic constraints forbids them. If the textbook had explained, in detail, why perpetual motion machines <em>do</em> work, that wouldn’t have made it true.</p> <p>We once had a homework exercise where we were supposed to say why a particle behaved in a certain way. The obviously “correct” answer – the <a href="http://lesswrong.com/lw/iq/guessing_the_teachers_password/" title="Guessing the Teacher&#x27;s Password - LessWrong">teacher’s password</a> – was “because of Heisenberg’s Uncertainty Principle”. But the Uncertainty Principle just follows from Schrödinger’s equation, and we’re using that to solve all our quantum mechanics problems. So by that logic, basically everything happens because of the Heisenberg Uncertainty Principle. That can’t be right.</p> <blockquote> <p>For example, when a pen falls off a desk, that seems to be proof that gravity exists, because gravity made it fall. But what is “gravity”? In 1500, “gravity” was the pen’s desire to go to the center of the earth; in 1700 “gravity” was a force that acted at a distance according to mathematical laws; in the 1900s “gravity” was an effect of curved space-time; and today physicists theorize that “gravity” may be a force carried by subatomic particles called “gravitons”. Gendlin views “gravity” as a concept and points out that concepts can’t make anything fall. Instead of saying that gravity causes things to fall, it would be more accurate to say that things falling cause [the different concepts of] gravity. Interaction with the world is prior to concepts about the world. (<a href="https://en.wikipedia.org/wiki/Eugene_Gendlin#Philosophy" title="Wikipedia: Eugene Gendlin">source</a>)</p> </blockquote> <p>It’s not the laws we have written down that tell reality what to do. It’s reality that tells us what laws to write. Writing down the law will not make reality obey it. But reality doing something unexpected will make <em>us</em> write a new law.</p> <p>The point I’m trying to make here is, when you have electrodynamics homework to do, and taking a few shortcuts by pretending stuff doesn’t interact as much as the theory says will allow you to finish in 6 pages instead of 47, maybe you should do that. Because there is no “correct” model. You’ll never know what matter is “really” made of. All you can ask for is a good prediction.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-qmrel"> <p>Y’know, disregarding the fact that we still haven’t found a way to combine the two to make black holes work. <a href="#user-content-fnref-qmrel" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Sat, 30 Jan 2016 16:33:00 GMT https://ninoan.com/models/ https://ninoan.com/models/ Victory! <p>People tell me I should go to a CFAR workshop and they may well be right, so it’s time to figure out how to prevent what is inevitably going to happen there from happening.</p> <!--more--> <blockquote> <p>each of the workshop’s sessions invariably finished with participants chanting, ‘‘3-2-1 Victory!’’ — a ritual I assumed would quickly turn halfhearted. Instead, as the weekend progressed, it was performed with increasing enthusiasm. By the time CoZE rolled around, late on the second day, the group was nearly vibrating. When Smith gave the cue, everyone cheered wildly, some ecstatically thrusting both fists in the air. (<a href="http://www.nytimes.com/2016/01/17/magazine/the-happiness-code.html?_r=0" title="The Happiness Code, Article in the NYT Magazine">source</a>)</p> </blockquote> <p>Group enthusiasm is not for me. I’ve been to the <a href="http://ninoan.com/lwcw2015">LessWrong Community Weekend</a>, and I’ve been to <a href="http://eaglobal.org">EA Global</a>, and each time, everyone was excited and there was always the stupid cheer at the end. I do like that this is a thing – enthusiasm is good! Group cheers increase the feeling of togetherness and community. I don’t want to suggest dropping this custom. Yet, every time I’m part of this custom, I cringe and I can’t cheer or shout or wave my fists around and, instead, I start feeling anxious, sad, and <em>not</em> part of the group. And if I’m not <em>really</em> careful, I always end up in a sadness/depression spiral. I want to change that.</p> <p>I was wondering why exactly it is that I get anxious and sad when the people around me are extremely happy. This seems contradictory. When people around me are sad, I get sad; when people around me are happy – but within reason – I get happy. It’s only when we get into the extremely happy territory that my happiness drops. So it looks like this:</p> <p><img src="/images/happiness-actual.png" alt=""></p> <p>when it should look like this:</p> <p><img src="/images/happiness-ideal.png" alt=""></p> <p>Let’s isolate the problem:</p> <ul> <li>I can be around small groups of extremely excited, happy, loud people and enjoy myself. I’ll laugh and feel part of the group, but I won’t participate in being loud and visibly enthusiastic.</li> <li>At the Community Weekend, where were situations where I was feeling sad and anxious, and this feeling was made worse when we were gathered as a big group, and people calmly explained how happy they were about the event. I did not feel part of the group.</li> <li>At the end of the first meeting of my productivity-/accountability-group, it was decided that we would do a group cheer at the end. It was a group of roughly five people and I had felt very integrated into the group up until that point. When it was time for the group cheer, I felt like an outsider and got anxious and experienced a sadness spiral for the rest of the night.</li> <li>I was once at a concert I liked. At concerts, everyone shouts along with the band (this was a metal concert). I tried – and I couldn’t. I knew nobody would really hear me, or pay much attention to me. It was really loud. But still, I was completely unable to shout, and it wasn’t a physiological problem – the issue was in my head.</li> <li>Relatedly: I would never even dream of screaming on a roller coaster. Not just because I couldn’t, but because it never even occurred to me to do that. I was always confused why people screamed – were they afraid? Didn’t they know roller coasters are safe? I’m not a person who screams.</li> <li>In my life, there have been approximately three times where I got so angry that I actually did shout at someone.</li> <li>Sometimes I get stressed out (mostly because of homework) and want to scream in frustration. Even if I’m the only person in the building, I can’t, and when I try, I feel trapped, because I can’t find a release for my emotions.</li> <li>I’ve tried acting in the past, and I experienced the same mental block whenever I tried to play a role that wasn’t me.</li> </ul> <p>The interpretation of this that currently feels most right to me has two parts. One, being loud, excited, enthusiastic, isn’t <em>me</em>, therefore, trying to pretend that I am these things feels inauthentic and wrong. Two, not being able to participate in group behavior when (a) it is expected, and (b) I want to, makes me feel excluded. So the feeling is, <em>group cheers is not something Nino does; group cheers are something members of this group do; therefore, I do not belong to this group</em>.</p> <p>I remember different situations where I deliberately played a specific role in order to nudge my identity in a certain direction. For example, before I started my TA job, I was Not A Person Whose Job Involves Leading A Group Of People. Deciding to change that was uncomfortable and anxiety-inducing. A person who could do a job like that was not who I was, but it was who I wanted to be. So I forced myself into the role and, knowing that I would be easier not to do this alone, I had someone sit beside me as I sent out the email asking for the job. Once I’d done that, I’d become a person who can, at least, ask for such a job. Once I’d experienced doing a thing a person like that would do, actually showing up to sign the contract and then going to the classes was much easier because I could just let subconscious consistency effects play out. “Well, I did ask for this job. If I’m the kind of person who asks for a job like this, that must be because I think I can do it, and <em>that</em> must be because I probably actually can do this.”</p> <p>I didn’t used to be the kind of person who enjoys dancing badly at parties. I’m still not 100% comfortable doing it, but ever since I put myself in a situation where I was forced to participate and was in a good mindset to accept that I was actually doing it instead of “I’m forcing myself to do something that is not Something I Do,” dancing has become much easier for me – so much that it can even be enjoyable.</p> <p>So: I <a href="https://wiki.lesswrong.com/wiki/Alief" title="LessWrong Wiki: Alief">alieve</a> that I’m not a person who can shout, or cheer, or be loud and excited about things. Therefore, getting into situations where this behavior is expected of me, will make me anxious. Knowing that, the solution seems relatively simple. I need to practice shouting, and cheering, and being loud and excited about things. I need to do this as long as it takes to become less painful and aversive. For this to be successful, I need to be in an environment that feels safe to me. My best guess for what that environment would look like is: a group of 2, 3, at most 4 people, including me, in a place where no strangers can easily hear loud noises. Being inside a regular apartment with neighbors above and below would make this considerably harder. Doing this on my own won’t work because I can’t make all the noise myself. Turning on loud music or sounds from the internet won’t work because the sounds need to be human made. As I mentioned, concerts won’t work because I don’t feel safe enough around the other audience members. Open spaces, outside, far away from any buildings would work well because you could start out by standing far apart and shouting things at the other person. Since, in that case, shouting would be necessary to transfer information, it wouldn’t feel as aversive. From there, you could slowly move closer together while keeping the volume high.</p> <p>Once I’m more comfortable with shouting, we could move on to loudly displaying enthusiasm by saying, “Yay!” and “Woo!” and “Yes!” and “Victory!” really loudly, and waving your fists around and whatever people do.</p> <p>I predict that, if I do this a few times, group enthusiasm will be significantly more bearable for me in the future, which would make lots of social interactions easier; and <em>that</em> would be extremely useful for my life in general.</p> <p>I also predict that I’ll feel really really silly doing all of this. (Even more silly than I felt writing it.)</p> <p>(Comment or <a href="mailto:n.annighoefer@gmail.com">email</a> me if you want to be my shouting partner. This could be lots of fun.)</p> Mon, 25 Jan 2016 20:11:00 GMT https://ninoan.com/victory/ https://ninoan.com/victory/ 1/3: Just The Way Things Are <p><small>[<em>Part 1 is about a feeling about the world. Epistemic state: Maybe I shouldn’t commit to writing blog posts about every thought that occurs to me while browsing Wikipedia. <a href="http://ninoan.com/models/" title="2/3: Models | ❀✿❀ SuperLaserNino ✿❀✿">Part 2</a>, <a href="http://ninoan.com/notation/" title="3/3: Mathematical notation | ❀✿❀ SuperLaserNino ✿❀✿">part 3</a>.</em>]</small></p> <p>I decided I don’t like the term “laws of physics” to describe the way reality behaves. Calling them laws makes them sound optional<sup><a href="#user-content-fn-authority" id="user-content-fnref-authority" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup>. Like, it would be really good if you didn’t break them because they are being enforced by the space police, but if you’re <em>really clever</em>, you can outrun the space police and break them anyway. But you can’t.</p> <!--more--> <p>When you put two marbles down, and then you add two more, the fact that there are now four marbles isn’t a law you can break. It’s not something where some universal authority decides that this should happen by calculating 2+2. It’s just the way things are.</p> <p>And so, when you hit the accelerator, there is nothing <em>deciding</em> to stop you from going past the speed of light. It’s just not going to happen. Look, for example, at <a href="https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life" title="Wikipedia: Conway&#x27;s Game of Life">Conway’s Game of Life</a>. Because of the way the game is structured, there is an absolute speed limit and there is nothing you can do to go <a href="https://en.wikipedia.org/wiki/Speed_of_light_(cellular_automaton)" title="There are phenomena that look like things are going FTL, but there&#x27;s no information moving FTL.">faster than that maximum speed</a>. And still, if you program a simulation of the Game of Life, you don’t need to add a rule preventing things from exceeding the maximum speed. Like two marbles plus two marbles being four marbles, the speed limit is just a consequence of the structure of the universe.</p> <p>But! For the people <em>in</em> the Game of Life, it won’t be that obvious, because they don’t see the game board. They see the contents of the cells, but not the cells themselves. So they might wonder why the speed limit exists and they might think they can somehow circumvent it. It’s only when you see the game board that you get an intuitive understanding about why these laws exist and why it’s not <em>forbidden</em> to break them, but a logical impossibility.</p> <p>This transfers to the real world, too. There have been people who tried to build perpetual motion machines and made plans to go faster than the speed of light and theorized about superluminal neutrinos. Thinking about the laws of the universe as something that logically follows from the stuff the universe runs on, rather than the laws being rules that exist explicitly and are somehow enforced, makes impossible things feel more impossible  – you won’t trick the universe into giving you energy by building a perpetual motion machine that is so complicated that the space police doesn’t notice you’re stealing energy.</p> <p>I thought that was an interesting intuition.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-authority"> <p>Weellll, this is arguably <a href="http://sandymaguire.me/blog/authority-and-momentum" title="Authority and Momentum ← We Can Solve This">inaccurate</a>, but the point is less about the terminology and more about the intuition, so whatev. <a href="#user-content-fnref-authority" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Mon, 28 Dec 2015 00:00:00 GMT https://ninoan.com/just-the-way-things-are/ https://ninoan.com/just-the-way-things-are/ Waves of confidence <p>There seems to be a distinct and relatively predictable pattern to my confidence/comfort levels when I’m meeting new people and I’m wondering whether this is a common experience.</p> <!--more--> <p>Usually, before I get to know someone (except when they’re known for doing something really interesting), it’s hard to <a href="http://agentyduck.blogspot.de/2015/05/tortoise-report-3-empathy_16.html" title="Brienne Yudkowsky on building curiosity directed at another person.">build an interest</a> in them. Like, I can feel completely lonely and desperately want friends and still, when I think about who to talk to, just <em>everyone</em> new will seem like the dullest person in the world. So, if someone happens to talk to me, the stakes are low and I’m not anxious. After one or two conversations, I manage to internalize that I’m talking to an actual sentient being and I start becoming really excited about talking to them.</p> <p>If it turns out they like me, and we stay in touch for a few days, there comes a point where my brain is like, “oh wow, this is turning into a thing. Are we friends now?” And then I notice I’ve told most of my backstory and I start running out of things to say. So I’m trying frantically to find things to say and it’s <em>just not working</em> and it’s like, “oh gods, do I have nothing interesting to say? How can I keep the other person from losing interest?” And I get anxiety attacks and the only thing that can help is them talking to me, but they don’t because they don’t have time to talk to me like <em>all day</em> which is what I’d need to feel safe, and I don’t know what to do.</p> <p>Eventually – if contact doesn’t stop, that is – I realize it’s okay that I sometimes don’t have anything profound to say and I get into a groove of just speaking whenever I do have something to say. I feel more or less certain that the other person cares about me as a human being, and that I won’t mess that up by saying one wrong thing, so I manage to relax and I get less anxious.</p> <p>But <em>then</em> I realize – wait, I’m much more confident now than I was in the beginning! Maybe they only liked the shy me, or they only liked me because they didn’t get the full picture because in the beginning I was all quiet and agreeable. So I get more anxious again, and I get quieter. But then I feel like I’m holding myself back and I’m boring because I never say anything so I still try to be confident and say things and be courageous and settle into kind of a back-and-forth of being more vocal vs being more agreeable.</p> <p><img src="https://i.imgur.com/HDa7gNn.png" alt="" title="Look, I made a graph to make this post more interesting!"></p> <p>And after a while I get used to that and I feel better saying things. And eventually, after years and years and more sudden dips in my courage, the connection turns into a stable friendship and I don’t need to be so scared of sending them cute cat pictures anymore.</p> <p>Does anyone else have a similar experience, or is it more common for confidence levels to rise linearly with time, or something else?</p> Sun, 04 Oct 2015 18:10:00 GMT https://ninoan.com/waves/ https://ninoan.com/waves/ LessWrong Community Weekend 2015 <p><small>[<em>Kinda sappy and emotional in parts. Being posted sort of a long time after the event. Not totally happy with the way this post turned out, but, you know, better finished and mediocre than perfect and imaginary, or something. Epistemic state: I deleted a lot of “as far as I can tell”s. Just pretend like every sentence ends with those words, and please do tell me if I’m wrong about anything.</em>]</small></p> <p>I attended this year’s European LessWrong Community Weekend. The initial draft of this post began thus:</p> <blockquote> <p>This is the event report I did not want to write and you do not want to read.</p> </blockquote> <p>I decided I didn’t like this approach. During the Weekend, people always said, “make it your own.” So let’s do <em>that</em> instead.</p> <p>This is a collection of things I learned while I was in Berlin.</p> <!--more--> <h2 id="contents">Contents</h2> <ul> <li><a href="#noticing-gratitude">Noticing gratitude</a></li> <li><a href="#create-opportunities-not-conversations">Create opportunities, not conversations</a></li> <li><a href="#cuddling">Cuddling</a></li> <li><a href="#blanket-forts-are-awesome">Blanket forts are awesome</a></li> <li><a href="#people-know-i-exist">People <em>know I exist</em></a></li> <li><a href="#purpose-authority-and-confidence">Purpose, authority, and confidence</a></li> <li><a href="#you-can-meditate-lying-down">You can meditate lying down</a></li> <li><a href="#conclusion">Conclusion</a></li> </ul> <h2 id="noticing-gratitude">Noticing gratitude</h2> <!-- FINISHED --> <p>In the weeks leading up to the Weekend, I was really excited. This was going to be awesome. I would meet new people and have fun talking to them, and maybe even make a few friends. I thought, “I enjoy being in the Study Hall most of the time, how hard could meeting people in the real world possibly be?”</p> <p>Quite hard, as it turns out. Being around so many people in the real world was completely overwhelming for me and I spent large chunks of the Weekend feeling anxious, depressed, and worthless. I <em>wanted</em> to talk to people, I wanted to socialize, I wanted to have a nice time, but the more I tried, the more I felt like I was failing. I thought I would quite possibly never be able to make any new friends because I was just no good at it.</p> <p>That was how I felt on the way back from Berlin. But the fact was that everyone at the event had been incredibly friendly and welcoming and the only reason I felt like I hadn’t connected with anyone was because I was being all scared. I decided it would be incredibly unfair to the other participants to let sadness, self-loathing, and resignation be the bottom line I’d draw from this experience.</p> <p>I needed a mindset-shift. I needed to get into a more positive reference frame. Partly inspired by Robert’s lightning talk on gratitude journaling, I began by making a list of everyone I remembered having a comfortable conversation with. It took me only a few minutes to gather about 20 names, which I thought was pretty good for an event with less than 80 people – especially considering I spent a lot of the time hiding from everyone.</p> <p>As a result of this exercise, it became much easier to contemplate all the positive aspects of the Weekend and feel a lot better about having attended.</p> <h2 id="create-opportunities-not-conversations">Create opportunities, not conversations</h2> <!-- FINISHED --> <p>So the plan was to meet new people and form new relationships and socialize and all that business, right? Yeah. But there’s a problem: I don’t actually know how to do that. I know I try, and I know that <em>sometimes</em> I manage to have a good time talking to people. But – and I really should have noticed this earlier – I’m always <em>surprised</em> whenever I have an enjoyable social interaction. So I knew I wasn’t actually incapable of having nice conversations – because they’ve happened before – but I was clearly doing something wrong; somehow, my model of how successful social interactions work must be flawed. Ironically, I could never remember what I’d done when conversations did go well. Whenever I really made an effort and thought about what I was doing, things were awkward and uncomfortable. How would I ever make progress like that?</p> <p>And it took me this long to notice it. Maybe that is not a coincidence. Maybe <em>trying</em> to socialize just won’t work because socializing <a href="/reaching-the-goal-is-not-an-action">is not an action</a> and “trying to socialize” actually does nothing but distract me from doing the actions that lead to everyone having a nice time. Assuming this is true, what <em>are</em> the actions I can perform?</p> <p>Whenever I find someone interesting, I tend to assume they are somehow “objectively” interesting, so talking to them must be a bad idea because everyone is probably already talking to them all the time and I’ll just be an annoyance. Lesson One: This is not true. In most cases, your interest in someone is primarily a fact about <em>you</em>, and not the interesting person. If you don’t know how to start a conversation, just look for a group of interesting-looking people and <em>stand close to them</em>. What do you do then? You wait. Wait and <em>listen</em>. Don’t think about what to say. Trying to think of something to say is pretty much the last thing you ever want to do when you’re trying to have an interesting conversation (unless you have something specific you want to tell the other person, that is). Thinking about what you might say next will only distract you from listening to what the <em>other</em> person is saying.</p> <p>So you wait, and you listen, and you try to get a feel for the situation. When you’re not desperately trying to “socialize” or “talk to people”, your brain won’t tell you you’re failing when you don’t say anything for a while. This will give you the time to get comfortable which, in turn, will tell your brain it’s okay to relax. And <em>that</em> is the point where you start talking, because once you feel relaxed and comfortable and you’re listening, you will inevitably find relevant things to say. (If you do find something to say earlier, you don’t need to hold back, of course. This is just supposed to help you think when you can’t.)</p> <p>When I’m with a group of people I don’t know well, and the group moves from one place to another, I tend to get insecure and not know whether they still want me there, so I often quietly disappear. Lesson Two: The event is called “Community Weekend” for a reason. The others are there to talk to people, too. It will probably be fine to stay with a group and take part in their conversations even when they change locations. If you’re worried about being annoying, keep in mind that it is actually quite difficult to be so annoying that people will want you to go away. And if that doesn’t help, just have some faith that people will tell you to leave if they <em>really</em> don’t like you.</p> <p>I have some ideas for one-on-one conversations with a specific person, but it’ll take a bit more practice until I can turn them into something useful.</p> <h2 id="cuddling">Cuddling</h2> <!-- FINISHED --> <p>Scott Alexander <a href="http://slatestarcodex.com/2014/09/27/cuddle-culture/">writes</a>:</p> <blockquote> <p>I go into social encounters viewing most people as a combination of scary and boring. I can sometimes overcome that most of the way by spending months getting to know them and appreciate their unique perspective. Or I can cuddle with them for ten minutes. Either one works.</p> </blockquote> <p>Ever since I read this, it has been part of my identity. Now I’m not so sure. I still think cuddling is awesome and it can calm me when I’m stressed out, but it did not really make me feel more comfortable around people I didn’t know and was scared of. Apparently, for me, to feel good about cuddles, I need some kind of relationship to be already present, or it will feel uncomfortable for me. Fortunately though, depending on the person, it doesn’t take more than a few minutes of contact to get to point where I feel comfortable cuddling someone. (I’m referring here to the stuff that’s been going on in the Blanket Fort. Regular everyday hugs work all the time with everyone, and I got quite a few of those at the Weekend for which I am very grateful.)</p> <h2 id="blanket-forts-are-awesome">Blanket forts are awesome</h2> <!-- FINISHED --> <p>Seriously, it’s like a blend between engineering and cuddles.</p> <h2 id="people-know-i-exist">People <em>know I exist</em></h2> <!-- FINISHED --> <p>I once had a conversation with a friend from university. She is the person who (I assume) knows the names of (almost) every other physics student two semesters up and down at my university. To me, she said, “until well into the second semester, I didn’t even know you existed.” And the thing is: That did not surprise me. I’m not a very conspicuous person. Being mostly quiet and if not, uncontroversial, it’s understandable if people don’t notice me much.<sup><a href="#user-content-fn-pity" id="user-content-fnref-pity" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></p> <p>In the Study Hall, as far as I could tell, I’ve mostly been quiet, too, so I figured regulars of the Study Hall who were also attendants at the Community Weekend would be vaguely aware of my existence, but nothing more. It surprised me how much I felt like the other people from the Study Hall felt like they knew me. And then later in the Weekend, a few people even told me they liked talking to me and want to do more of that! Whaaat.</p> <p>After thinking about this for a while, I concluded that this realization can be generalized to “people seem to feel more connected to other people (including me) than I feel to them”. Knowing that my perception of closeness is apparently different from most other people’s is useful, because (a) now I have something more specific to work on (I can probably worry less about <em>making people</em> like me and spend more time building trust that they already <em>do</em>), and (b) I can be slightly more confident in friendly interactions because I can assume that people probably dislike me significantly less than I might intuitively feel they do.</p> <p>Someone suggested that this asymmetry may be caused by the fact that I tend to be very open and sharing about my feelings and insecurities and vulnerabilities, which makes people feel more connected to me, while I’m not as good at getting people to open up to me, which makes me feel less connected to them. I have observed that I do tend to sacrifice asking people about themselves in favor of oversharing my own experiences, so this is something else I want to work on.</p> <h2 id="purpose-authority-and-confidence">Purpose, authority, and confidence</h2> <!-- FINISHED --> <p>As I mentioned, one of my goals for the Weekend was meeting new people and, as I mentioned, I was having a lot of difficulty with that. This made me feel out of place and really useless a lot of the time. Then I saw people who were very distinctly not useless: the organizers were running around, doing important organizing. They didn’t need to worry about fuzzily defined personal goals because they had a clear purpose to fulfill. I imagine that having a purpose like that would have made me feel better. Toward the end of the Weekend, for example, I helped a bit with the clean-up, and that was significantly more comfortable (and confident) than sitting around, not knowing what to do. I decided that, if I’m going to attend the next Community Weekend, I would like to help organize the event. (I haven’t talked about this with this year’s organizers yet, and unfortunately I currently don’t actually know whether I can attend next year.)</p> <h2 id="you-can-meditate-lying-down">You can meditate lying down</h2> <!-- FINISHED --> <p>During the awesome amazing fantastic incredible <a href="http://sevensecularsermons.org/">Games Of Entropy</a> reading, Daniel mentioned he likes to meditate lying down. I’d been struggling with keeping up my (theoretically) daily meditation because often I was tired and just wanted to take a nap instead. If I’m lying down, I realized, it’s like the perfect blend between a nap and meditation. Afterwards I am both physically rested and emotionally more stable, <em>and</em> the odds that I will actually <em>do</em> the meditation on a given day are significantly higher now.</p> <h2 id="conclusion">Conclusion</h2> <!-- FINISHED --> <p>I may be overly optimistic here, but I get the impression that, with the right approach, there is a lot of low-hanging fruit for increasing my comfort levels in social settings, and I even feel motivated to talk to more people to practice. I have already had a few interesting conversations with people I met at the Weekend and it seems likely that there will be more of those in the future. So, while my happiness-value spent a sizeable portion of the event below zero, I don’t regret having attended and I’m extremely grateful to Anne for suggesting it.<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-pity"> <p>This sounds so much like self-pity, but I don’t mean it that way, I promise! I’m just trying to describe a perfectly factual situation that consists of nothing but true facts. <a href="#user-content-fnref-pity" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> <li id="user-content-fn-1"> <p>Before, my plan had been to see how my life develops and then possibly attend the 2016 LWCW. <a href="#user-content-fnref-1" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Mon, 29 Jun 2015 21:59:00 GMT https://ninoan.com/lwcw2015/ https://ninoan.com/lwcw2015/ LaTeX <p>I have helped typeset three theses and many shorter documents in LaTeX and I realized that I find myself googling the same things over and over again. Therefore I decided to collect all the problems I have solved so far on this page. At the bottom there is a list of unsolved problems. The reader is invited to give me advice in the comments.</p> <!--more--> <p>I will update this page when I learn new things.</p> <p>This page is meant mostly as a reference for myself or others, for <em>how</em> to solve certain problems, technically. There won’t be much discussion of <em>why</em> you should do something a particular way. If you want to know more about that, I suggest you start with <a href="http://practicaltypography.com">Practical Typography</a> and if you’re still interested in typography after that, you can move on to <a href="http://www.amazon.de/Elements-Typographic-Style-Version-Anniversary/dp/0881792128/ref=sr_1_1?ie=UTF8&#x26;qid=1432924031&#x26;sr=8-1&#x26;keywords=the+elements+of+typographic+style">The Elements of Typographic Style</a> or something.</p> <h2 id="contents">Contents</h2> <ul> <li><a href="#standard-packages-for-every-document">Standard packages for every document</a></li> <li><a href="#microtype">Microtype</a></li> <li><a href="#fonts">Fonts</a> <ul> <li><a href="#palatino">Palatino</a></li> <li><a href="#the-johannes-kepler-project">The Johannes Kepler Project</a></li> <li><a href="#a-note-on-numerals">A note on numerals</a></li> </ul> </li> <li><a href="#spacing">Spacing</a></li> <li><a href="#colors">Colors</a></li> <li><a href="#tables">Tables</a> <ul> <li><a href="#colored-cells">Colored cells</a></li> </ul> </li> <li><a href="#prettier-unordered-lists">Prettier unordered lists</a></li> <li><a href="#prettier-ordered-lists">Prettier ordered lists</a></li> <li><a href="#headers-and-footers">Headers and footers</a></li> <li><a href="#chapter-and-section-headings--spacing">Chapter and section headings + spacing</a></li> <li><a href="#custom-table-of-contents">Custom table of contents</a></li> <li><a href="#title-page">Title page</a></li> <li><a href="#figures">Figures</a> <ul> <li><a href="#regular-floating-figures">Regular floating figures</a></li> <li><a href="#margin-figures">Margin figures</a></li> </ul> </li> <li><a href="#footnotes-as-margin-notes">Footnotes as margin notes</a></li> <li><a href="#some-symbols">Some symbols</a></li> <li><a href="#kerning">Kerning</a></li> <li><a href="#colored-boxes">Colored boxes</a></li> <li><a href="#prettier-ellipsis">Prettier ellipsis</a></li> <li><a href="#only-numbering-certain-lines-of-an-align-environment">Only numbering certain lines of an <code>align</code> environment</a></li> <li><a href="#what-i-havent-figured-out-yet">What I haven’t figured out yet</a></li> </ul> <h1 id="standard-packages-for-every-document">Standard packages for every document</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">a4paper, left=4.5cm, right=4.5cm, top=3cm, bottom=4.5cm, marginparwidth=4cm</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">geometry</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">utf8</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">inputenc</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">amsmath,amssymb</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">hidelinks=true</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">hyperref</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">T1</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">fontenc</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>You probably know what most of these do. The <code>geometry</code> settings used here work well for symmetrical layouts. For asymmetrical layouts I like to use 2cm/6cm for <code>inner</code>/<code>outer</code>. That way I can put <a href="#footnotes-as-margin-notes">footnotes</a> and <a href="#margin-figures">pictures</a> in the margins.</p> <h1 id="microtype">Microtype</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">activate={true,nocompatibility},final=true,kerning=true,spacing=true,tracking=true,shrink=30,stretch=30,factor=0</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">microtype</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\microtypecontext</span><span style="color:var(--astro-code-foreground)">{spacing=french}</span></span></code></pre> <p>Apart from the standard packages above, the <code>microtype</code> package is the single most important package in existence and should be included in every document. It does a number of things:</p> <ul> <li>Glyph reshaping. Characters are stretched or shrunk by up to 3% (adjustable with <code>shrink</code> and <code>stretch</code>) to improve justification. This will save you many overfull hboxes and even get rid of a lot of hyphenation without producing overlarge spaces.</li> <li><code>kerning</code> and <code>spacing</code> probably fixes some kerning and spacing issues. <code>tracking</code> adds some letter spacing for small caps.<sup><a href="#user-content-fn-butterick" id="user-content-fnref-butterick" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup></li> <li><code>nocompatibility</code> means you get the best possible result instead of <code>microtype</code> trying to keep the page breaks and such the same as without the package.</li> <li><code>factor</code> controls how much punctuation protrudes past the end of the line. Some people, for example, like having hyphens at the ends of lines sticking out into the margin. Personally, I don’t like that. You get 100% protrusion with <code>factor=1000</code>.</li> <li><code>final=true</code> means <code>microtype</code> is activated even when you use the <code>draft</code> option in the <code>documentclass</code> declaration. This doesn’t have any effect on the final document.</li> <li><code>spacing=french</code> is the same as calling <code>\frenchspacing</code> in the document body and prevents spaces between sentences from stretching wider than a normal word space. You might like that, but french spacing is the standard for most printed material nowadays.</li> </ul> <h1 id="fonts">Fonts</h1> <p>I don’t have a huge problem with Computer Modern, but (1) it is overused, and (2) since it’s the default, most typographic sins are committed with Computer Modern, so I sometimes get a bad feeling about it (like with Times).</p> <p>These are some acceptable fonts:</p> <h2 id="palatino">Palatino</h2> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">osf,sc</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">mathpazo</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>Palatino is like the Times New Roman of pretty fonts. It’s like everyone who’s unsatisfied with Times goes through their system fonts and says, “oh, that looks fancy!” and chooses Palatino. This means it comes close to being overused, but it still looks good enough that you can use it without feeling bad. Also, the <code>mathpazo</code> package offers real small caps (<code>sc</code>), oldstyle numerals (<code>osf</code>), and most of the mathematical symbols you will ever need.</p> <p>It also works well with Euler math if you’re into that kind of thing.</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">euler</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <h2 id="the-johannes-kepler-project">The Johannes Kepler Project</h2> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">oldstylenums</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">kpfonts</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>I’ve not used this font yet but, apart from the capital T, I like the look of it. Like Palatino, Kepler offers real oldstyle figures, real small caps, and extensive math support. There is also a sans serif version of Kepler that you might want to use in combination with the serif version, but I haven’t looked at that, so it might suck.</p> <p>If you’re inclined to save ink, Kepler also has a <code>light</code> option.<sup><a href="#user-content-fn-kp-light" id="user-content-fnref-kp-light" data-footnote-ref="" aria-describedby="footnote-label">2</a></sup></p> <h2 id="a-note-on-numerals">A note on numerals</h2> <p>In normal text, you want to use oldstyle figures<sup><a href="#user-content-fn-numerals" id="user-content-fnref-numerals" data-footnote-ref="" aria-describedby="footnote-label">3</a></sup> (lowercase numbers). You only want to use lining figures (uppercase numbers) in combination with all caps, in mathematical expressions, or in tables. With the settings I’ve described above, Palatino and Kepler will automatically switch to lining figures in math mode. If you want to set all the numbers in a block as lining figures, you can place</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\fontfamily</span><span style="color:var(--astro-code-foreground)">{pplx}</span><span style="color:var(--astro-code-token-function)">\selectfont</span></span></code></pre> <p>for Palatino, and</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\fontfamily</span><span style="color:var(--astro-code-foreground)">{jkpx}</span><span style="color:var(--astro-code-token-function)">\selectfont</span></span></code></pre> <p>for Kepler at the beginning of the block.</p> <h1 id="spacing">Spacing</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">setspace</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\setstretch</span><span style="color:var(--astro-code-foreground)">{1.1}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\setlength</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\parskip</span><span style="color:var(--astro-code-foreground)">}{0pt}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\setlength</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\parindent</span><span style="color:var(--astro-code-foreground)">}{1.4em}</span></span></code></pre> <p>The default line spacing (<code>\setstretch</code>) is usually too narrow. For most texts, a setting of <code>1.1</code> looks good, for very math-heavy or German texts I go up to <code>1.14</code> to avoid collisions between ascenders, descenders, accented mathematical symbols, etc.</p> <p>I prefer indented paragraphs to vertically spaced paragraphs. If you like vertical space between your paragraphs, set <code>\parindent</code> to 0; if you like indented paragraphs, set <code>\parskip</code> to 0. Otherwise LaTeX may add spacing between paragraphs, which will look hideous if the paragraphs are indented.</p> <h1 id="colors">Colors</h1> <p>To define colors:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">color</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\definecolor</span><span style="color:var(--astro-code-foreground)">{color-name}{gray}{0.8}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\definecolor</span><span style="color:var(--astro-code-foreground)">{other-color}{rgb}{0.8, 0.9, 1}</span></span></code></pre> <p>To use colors:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\color</span><span style="color:var(--astro-code-foreground)">{color-name}</span></span></code></pre> <h1 id="tables">Tables</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">booktabs,suinitx</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">table</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">[htb]</span><span style="color:var(--astro-code-token-function)">\fontfamily</span><span style="color:var(--astro-code-foreground)">{pplx}</span><span style="color:var(--astro-code-token-function)">\selectfont</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">tabular</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">{lrcS[table-format=1.1]}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \toprule</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> left </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-foreground)"> right </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-foreground)"> centered </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-token-function)"> \multicolumn</span><span style="color:var(--astro-code-foreground)">{1}{c}{aligned numbers}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-token-function)">\midrule</span><span style="color:var(--astro-code-foreground)">{}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> 1 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-foreground)"> 2 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-foreground)"> 3 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-foreground)"> 4.5 </span><span style="color:var(--astro-code-token-keyword)">\\</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \bottomrule</span><span style="color:var(--astro-code-foreground)">{}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">tabular</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \caption</span><span style="color:var(--astro-code-foreground)">{Description}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> \label</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-foreground)">tab:label</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">table</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>The <code>S</code> alignment option aligns numbers by their decimal point. Because the column title isn’t a number, it needs to be wrapped inside the weird <code>\multicolumn</code> command. The <code>[table-format=x.y]</code> aligns the column in a way that numbers with <code>x</code> digits to the left and <code>y</code> digits to the right of the decimal point are centered. You can omit this option if everything looks fine, but it’s useful as soon as you have different numbers of digits in each row.</p> <p>If you use <code>S</code>, the numbers will be set in math-mode, so they will automatically be lining figures. If you use <code>l</code>, <code>r</code>, or <code>c</code>, you will have to declare the <code>\fontfamily</code> at the top of the table to get them to look right.</p> <h2 id="colored-cells">Colored cells</h2> <p>Include the package</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">colortbl</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>and call</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\cellcolor</span><span style="color:var(--astro-code-foreground)">{color-name}</span></span></code></pre> <p>inside your table-cell. The cell coloring doesn’t go all the way to horizontal rules, making the coloring discontinuous. That looks weird when you want to have entire columns in one color. I haven’t figured out how to prevent that.</p> <p><img src="https://i.imgur.com/Q8BWhBS.png" alt="Table with colored cells."></p> <h1 id="prettier-unordered-lists">Prettier unordered lists</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\newcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\sbt</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\,\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">picture</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">(-1,1)(-1,-3)</span><span style="color:var(--astro-code-token-function)">\circle</span><span style="color:var(--astro-code-foreground)">*{2.2}</span><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">picture</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">\ }</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\labelitemi</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\sbt</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\labelitemii</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\sbt</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>The bullet character (•) is too large. To get better looking bulleted lists, this snipped works wonders. You can manipulate the size of the circle by changing the <code>2.2</code> above to something else. If you need more than two levels in your lists, you can duplicate the last line and change <code>\labelitemii</code> to <code>\labelitemiii</code>.</p> <h1 id="prettier-ordered-lists">Prettier ordered lists</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">enumerate</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">enumerate</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">[1]</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\item</span><span style="color:var(--astro-code-foreground)"> Item One</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\item</span><span style="color:var(--astro-code-foreground)"> Item Two</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">enumerate</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>Make numbered lists less cluttered.</p> <p><img src="https://i.imgur.com/Fjjl4ei.png" alt="Better lists"></p> <h1 id="headers-and-footers">Headers and footers</h1> <p>If you’re using the <code>book</code> document class, <em>never ever</em> use the default headers. I don’t know whose idea it was to make the headers <em>ITALIC ALL CAPS</em>, but trust me, it was a terrible idea. This setting was surprisingly difficult to change, too.</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\newcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\spacedlowsmallcaps</span><span style="color:var(--astro-code-foreground)">}[1]{</span><span style="color:var(--astro-code-token-function)">\lowercase</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\textsc</span><span style="color:var(--astro-code-foreground)">{#1}}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">automark</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">scrpage2</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\clearscrheadings</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\chaptermark</span><span style="color:var(--astro-code-foreground)">}[1]{</span><span style="color:var(--astro-code-token-function)">\markboth</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\spacedlowsmallcaps</span><span style="color:var(--astro-code-foreground)">{#1}}{</span><span style="color:var(--astro-code-token-function)">\spacedlowsmallcaps</span><span style="color:var(--astro-code-foreground)">{#1}}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> \renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\sectionmark</span><span style="color:var(--astro-code-foreground)">}[1]{</span><span style="color:var(--astro-code-token-function)">\markright</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\thesection\enspace\spacedlowsmallcaps</span><span style="color:var(--astro-code-foreground)">{#1}}}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\lehead</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\mbox</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\llap</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\small\thepage\kern</span><span style="color:var(--astro-code-foreground)">2em}</span><span style="color:var(--astro-code-token-function)">\hfil</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\headmark</span><span style="color:var(--astro-code-foreground)">}}}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\rohead</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\mbox</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\hfil</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\headmark</span><span style="color:var(--astro-code-foreground)">}</span><span style="color:var(--astro-code-token-function)">\rlap</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\small\kern</span><span style="color:var(--astro-code-foreground)">2em</span><span style="color:var(--astro-code-token-function)">\thepage</span><span style="color:var(--astro-code-foreground)">}}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\headfont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\small</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>I don’t even want to look at those settings.</p> <p><img src="https://i.imgur.com/cmAyiwd.png" alt="Example headers"></p> <p>You can take this as inspiration and go from there.</p> <h1 id="chapter-and-section-headings--spacing">Chapter and section headings + spacing</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">titlesec</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\newfont</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\chapterNumber</span><span style="color:var(--astro-code-foreground)">}{eurb10 scaled 7000}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titleformat</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\chapter</span><span style="color:var(--astro-code-foreground)">}[display]</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\relax</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\mbox</span><span style="color:var(--astro-code-foreground)">{}</span><span style="color:var(--astro-code-token-function)">\marginpar</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\vspace</span><span style="color:var(--astro-code-foreground)">*{-\baselineskip}</span><span style="color:var(--astro-code-token-function)">\color</span><span style="color:var(--astro-code-foreground)">{chapternumbergray}</span><span style="color:var(--astro-code-token-function)">\chapterNumber\thechapter</span><span style="color:var(--astro-code-foreground)">}}{0pt}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-foreground)"> {</span><span style="color:var(--astro-code-token-function)">\LARGE\itshape</span><span style="color:var(--astro-code-foreground)">}[</span><span style="color:var(--astro-code-token-function)">\normalsize\vspace</span><span style="color:var(--astro-code-foreground)">*{.8</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}</span><span style="color:var(--astro-code-token-function)">\titlerule</span><span style="color:var(--astro-code-foreground)">]</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titlespacing</span><span style="color:var(--astro-code-foreground)">*{</span><span style="color:var(--astro-code-token-function)">\chapter</span><span style="color:var(--astro-code-foreground)">}{0pt}{0cm}{1cm}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titleformat</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\section</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\Large</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\makebox</span><span style="color:var(--astro-code-foreground)">[0cm][r]{</span><span style="color:var(--astro-code-token-function)">\thesection\hspace</span><span style="color:var(--astro-code-foreground)">{1em}}}{0em}{</span><span style="color:var(--astro-code-token-function)">\scshape\lowercase</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titlespacing</span><span style="color:var(--astro-code-foreground)">*{</span><span style="color:var(--astro-code-token-function)">\section</span><span style="color:var(--astro-code-foreground)">}{0pt}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titleformat</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\subsection</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\large</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\thesubsection</span><span style="color:var(--astro-code-foreground)">}{.6em}{</span><span style="color:var(--astro-code-token-function)">\itshape</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titlespacing</span><span style="color:var(--astro-code-foreground)">*{</span><span style="color:var(--astro-code-token-function)">\subsection</span><span style="color:var(--astro-code-foreground)">}{0pt}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titleformat</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\subsubsection</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\bfseries</span><span style="color:var(--astro-code-foreground)">}{}{}{}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\titlespacing</span><span style="color:var(--astro-code-foreground)">*{</span><span style="color:var(--astro-code-token-function)">\subsubsection</span><span style="color:var(--astro-code-foreground)">}{0pt}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\baselineskip</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p><img src="https://i.imgur.com/iaELHja.png" alt="Headings"></p> <p>These settings are strongly inspired by Robert Bringhurst’s <a href="http://www.amazon.de/Elements-Typographic-Style-Version-Anniversary/dp/0881792128/ref=sr_1_1?ie=UTF8&#x26;qid=1432924031&#x26;sr=8-1&#x26;keywords=the+elements+of+typographic+style">The Elements of Typographic Style</a>. The chapter numbers are set in the Euler font.</p> <h1 id="custom-table-of-contents">Custom table of contents</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">tocloft</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">textcase</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\setcounter</span><span style="color:var(--astro-code-foreground)">{tocdepth}{2}</span></span></code></pre> <p>Chapters:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftchappresnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\bfseries</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftchapfont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftchappagefont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\color</span><span style="color:var(--astro-code-foreground)">{pagenumbergray}</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftchapleader</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{1.5em}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftchapafterpnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\cftparfillskip</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>Sections:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsecpresnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\scshape</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsecfont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsecpagefont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\color</span><span style="color:var(--astro-code-foreground)">{pagenumbergray}</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsecleader</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{1.5em}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsecafterpnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\cftparfillskip</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>Subsections:</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsubsecpresnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\scshape</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsubsecfont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsubsecpagefont</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\color</span><span style="color:var(--astro-code-foreground)">{pagenumbergray}</span><span style="color:var(--astro-code-token-function)">\normalfont</span><span style="color:var(--astro-code-foreground)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsubsecleader</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{1.5em}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\cftsubsecafterpnum</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\cftparfillskip</span><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>This is in part influenced by Bringhurst and in part by common sense. Most tables of content are typeset terribly.</p> <h1 id="title-page">Title page</h1> <p>An example for a title page. The contents of this will depend very strongly on the specific document you’re making.</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">titlepage</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\LARGE</span><span style="color:var(--astro-code-foreground)"> University Name}</span><span style="color:var(--astro-code-token-keyword)">\\</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">figure</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">[h]</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\hbox</span><span style="color:var(--astro-code-foreground)">{}</span><span style="color:var(--astro-code-token-function)">\hfill</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">minipage</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">[t]{10cm}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \includegraphics</span><span style="color:var(--astro-code-foreground)">[width=5cm]{university-logo}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">minipage</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\hfill\hbox</span><span style="color:var(--astro-code-foreground)">{}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">figure</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\large</span><span style="color:var(--astro-code-foreground)"> Department or something</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[2cm]}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\huge</span><span style="color:var(--astro-code-foreground)"> Bachelor's Thesis</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[1cm]}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\Large\bf</span><span style="color:var(--astro-code-foreground)"> Title</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[1.0cm]}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\small</span><span style="color:var(--astro-code-foreground)"> Author:}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[0.2cm] {</span><span style="color:var(--astro-code-token-function)">\large</span><span style="color:var(--astro-code-foreground)"> Author}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[0.2cm]</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\small</span><span style="color:var(--astro-code-foreground)"> date}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[0.8cm] {</span><span style="color:var(--astro-code-token-function)">\small</span><span style="color:var(--astro-code-foreground)"> Advisor:}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[0.2cm]</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\large</span><span style="color:var(--astro-code-foreground)"> Advisor name}</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[0.2cm]</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">Advisor's employer</span><span style="color:var(--astro-code-token-keyword)">\\</span><span style="color:var(--astro-code-foreground)">[2.2cm]</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\small</span><span style="color:var(--astro-code-foreground)"> Address}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">center</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">titlepage</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <h1 id="figures">Figures</h1> <h2 id="regular-floating-figures">Regular floating figures</h2> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">figure</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-foreground)">[tbh]</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\centering</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\includegraphics</span><span style="color:var(--astro-code-foreground)">[width=8cm]{bunnies.jpg}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\caption</span><span style="color:var(--astro-code-foreground)">{A normal figure.}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\label</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-foreground)">fig:normal</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">figure</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p>Sometimes you want to put a <code>p</code> in the position options, too.</p> <h2 id="margin-figures">Margin figures</h2> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\marginpar</span><span style="color:var(--astro-code-foreground)">{ </span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \includegraphics</span><span style="color:var(--astro-code-foreground)">[width=</span><span style="color:var(--astro-code-token-function)">\marginparwidth</span><span style="color:var(--astro-code-foreground)">]{picture}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \captionof</span><span style="color:var(--astro-code-foreground)">{figure}{A margin figure.}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)"> \label</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-foreground)">fig:marginfig</span><span style="color:var(--astro-code-token-punctuation)">}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>For best results, use <a href="#footnotes-as-margin-notes"><code>\raggedright</code> or <code>\RaggedRight</code></a>.</p> <h1 id="footnotes-as-margin-notes">Footnotes as margin notes</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-constant)">ragged2e</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-function)">\newcounter</span><span style="color:var(--astro-code-foreground)">{mnote}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\renewcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\footnote</span><span style="color:var(--astro-code-foreground)">}[1]{ </span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \refstepcounter</span><span style="color:var(--astro-code-foreground)">{mnote}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \mbox</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\textsuperscript</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\themnote</span><span style="color:var(--astro-code-foreground)">}}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-token-function)"> \marginpar</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\footnotesize\RaggedRight\mbox</span><span style="color:var(--astro-code-foreground)">{\themnote}</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{5pt}#1}</span><span style="color:var(--astro-code-token-comment)">%</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">}</span></span></code></pre> <p>You can call these with <code>\footnote</code>. If you need to move the content of the footnote up along the margin, use</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\newcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\fnhere</span><span style="color:var(--astro-code-foreground)">}[1]{</span><span style="color:var(--astro-code-token-function)">\refstepcounter</span><span style="color:var(--astro-code-foreground)">{mnote}</span><span style="color:var(--astro-code-token-function)">\marginpar</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\footnotesize\RaggedRight\mbox</span><span style="color:var(--astro-code-foreground)">{\themnote}</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{5pt}#1}}</span></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\newcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\fnref</span><span style="color:var(--astro-code-foreground)">}{</span><span style="color:var(--astro-code-token-function)">\mbox</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\textsuperscript</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\themnote</span><span style="color:var(--astro-code-foreground)">}}}</span></span></code></pre> <p>Then you can call <code>\fnhere{Footnote content}</code> where you want the note to appear in the margin and <code>\fnref{}</code> where you want the reference to appear in the text. This is only for moving footnotes <em>up</em>. They should move <em>down</em> automatically, if there are other <code>\marginpar</code>s in the way.</p> <p><code>\raggedright</code> makes the text left-aligned, which looks better because margins are usually too narrow for proper justified text. <code>\RaggedRight</code> requires the <code>ragged2e</code> package and will re-enable hyphenation for the left-aligned text.</p> <h1 id="some-symbols">Some symbols</h1> <p>Some symbols I sometimes forget.</p> <ul> <li><code>\textperiodcentered</code> becomes the mid-dot (·). You should use this more.</li> </ul> <h1 id="kerning">Kerning</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-foreground)">a</span><span style="color:var(--astro-code-token-function)">\kern</span><span style="color:var(--astro-code-foreground)">+1ptb</span></span></code></pre> <p>This adds 1pt of separation between the letters a and b. When I have the time, I use this extensively for adding space to the insides of paretheses since they’re set too tight in most fonts. Also works in math mode.</p> <h1 id="colored-boxes">Colored boxes</h1> <p>I rarely use these because I always run into problems. But it can be kinda pretty and you can probably fix the issues if your document isn’t too complex.</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\definecolor</span><span style="color:var(--astro-code-foreground)">{boxblue}{rgb}{0.8, 0.9, 1}</span></span> <span class="line"></span> <span class="line"><span style="color:var(--astro-code-token-keyword)">\usepackage</span><span style="color:var(--astro-code-token-punctuation)">[</span><span style="color:var(--astro-code-token-parameter)">framemethod=tikz</span><span style="color:var(--astro-code-token-punctuation)">]{</span><span style="color:var(--astro-code-token-constant)">mdframed</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\newmdenv</span><span style="color:var(--astro-code-foreground)">[innerlinewidth=0.5pt,roundcorner=2pt,backgroundcolor=boxblue, linecolor=boxblue,innerleftmargin=6mm,innerrightmargin=6mm,innertopmargin=6pt,innerbottommargin=6pt,skipabove=1ex,skipbelow=1ex]{mybox}</span></span></code></pre> <p>You use this with</p> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">mybox</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-foreground)">Content</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">mybox</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p><img src="https://i.imgur.com/oVrY7eB.png" alt="Colored boxes"></p> <h1 id="prettier-ellipsis">Prettier ellipsis</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-keyword)">\newcommand</span><span style="color:var(--astro-code-foreground)">{</span><span style="color:var(--astro-code-token-function)">\dotdot</span><span style="color:var(--astro-code-foreground)">}{.</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{.6pt}.</span><span style="color:var(--astro-code-token-function)">\hspace</span><span style="color:var(--astro-code-foreground)">{.6pt}.}</span></span></code></pre> <p>The normal <code>\ldots{}</code> command creates too much space between the dots and, even with french spacing turned on, the amounts of space to the left and right of the ellipsis aren’t the same, so it looks uneven. You may need to adjust the amount of <code>\hspace</code>, depending on the font.</p> <p>Comparison:</p> <p><img src="https://i.imgur.com/GDuFDyF.png" alt="Comparison between \ldots and \dotdot"></p> <h1 id="only-numbering-certain-lines-of-an-align-environment">Only numbering certain lines of an <code>align</code> environment</h1> <pre class="astro-code css-variables" style="background-color:var(--astro-code-background);color:var(--astro-code-foreground); overflow-x: auto;" tabindex="0" data-language="latex"><code><span class="line"><span style="color:var(--astro-code-token-function)">\begin</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">align</span><span style="color:var(--astro-code-token-punctuation)">}</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> 1 + 2 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-token-constant)">= a\nonumber</span><span style="color:var(--astro-code-token-keyword)">\\</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> 3 + 4 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-token-constant)">= b \cdot e^{2\tau}\nonumber</span><span style="color:var(--astro-code-token-keyword)">\\</span></span> <span class="line"><span style="color:var(--astro-code-token-constant)"> 6 + 1 </span><span style="color:var(--astro-code-token-keyword)">&#x26;</span><span style="color:var(--astro-code-token-constant)">= c</span></span> <span class="line"><span style="color:var(--astro-code-token-function)">\end</span><span style="color:var(--astro-code-token-punctuation)">{</span><span style="color:var(--astro-code-token-parameter)">align</span><span style="color:var(--astro-code-token-punctuation)">}</span></span></code></pre> <p><img src="https://i.imgur.com/Gyxnnvw.png" alt="Only the third line has a number"></p> <h1 id="what-i-havent-figured-out-yet">What I haven’t figured out yet</h1> <ul> <li>Outdented lists, such that the bullet symbol or number is placed in the margin. Those are pretty.</li> <li>Global kerning pairs without using LuaLaTeX. Alternatively: Get <code>microtype</code> to run in LuaLaTeX. Kerning parentheses manually takes a lot of time and search-and-replace is messy.</li> <li>Figures that take up the whole width of the text and have their description as a <code>\marginpar</code>.</li> <li>Figures that take up a fraction (e.g. half) of the text-width and have the description in the remaining space next to them.</li> <li>Full width figures that are as wide as the text plus the width of <code>\marginpar</code>s and have their description below.</li> </ul> <!-- Stuff I haven't really looked at but that I thought to put in here for some reason. <http://tex.stackexchange.com/questions/7008/change-hanging-indent-in-description-list> <http://www.latex-community.org/forum/viewtopic.php?f=5&t=1400&p=5152> <http://i.stack.imgur.com/VMDpn.png> --> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-butterick"> <p>From <a href="http://practicaltypography.com/letterspacing.html">Practical Typography</a>:</p> <blockquote> <p>Lowercase letters don’t ordinarily need letterspacing. Nor do capital letters when they appear at the beginning of a word or sentence, because they’re designed to fit correctly next to lowercase letters. But when you use capital letters together, that spacing looks too tight.</p> <p>That’s why you always add 5–12% extra letterspacing to text in all caps or small caps, particularly at small sizes.</p> </blockquote> <a href="#user-content-fnref-butterick" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a> </li> <li id="user-content-fn-kp-light"> <p>From the <a href="ftp://ftp.fu-berlin.de/tex/CTAN/fonts/kpfonts/doc/kpfonts.pdf">documentation</a>:</p> <blockquote> <p>Save up your toner and the environment, use the “light” option, it’s 20% toner less!</p> </blockquote> <blockquote> <p>The metrics are the same. The display is not very good, but the print is fine if you like light fonts.</p> </blockquote> <a href="#user-content-fnref-kp-light" data-footnote-backref="" aria-label="Back to reference 2" class="data-footnote-backref">↩</a> </li> <li id="user-content-fn-numerals"> <p>I never know which word to use. “Numerals”? “Figures”? “Numbers”? And then I just end up using them all interchangeably and it’s terrible. <a href="#user-content-fnref-numerals" data-footnote-backref="" aria-label="Back to reference 3" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Tue, 02 Jun 2015 14:40:00 GMT https://ninoan.com/latex/ https://ninoan.com/latex/ Observations <p>Observations:</p> <!--more--> <ul> <li>I don’t work well when tired.</li> <li>I don’t work well when scared.</li> <li>“<a href="http://en.wikipedia.org/wiki/Opipramol">Opipramol</a> … is an antidepressant and anxiolytic used in Germany and other European countries.”</li> <li>I’ve been taking 100mg of Opipramol (almost) every day for the last ~2 years.</li> <li>I’ve been feeling (almost) constantly tired for ~3–4 years.</li> <li>I have severe concentration issues. <ul> <li>Akrasia is not as big a problem as it once was. I can sit down and decide to work. Being able to think / pay attention for extended periods of time seems to be a big issue.</li> </ul> </li> <li>My psychiatrist told me the Opipramol might be hindering my concentration and decreasing the dose might help me focus.</li> <li>I forgot to take my Opipramol a few times in the morning (I take 50mg in the morning and 50mg in the evening) and only noticed this when I was feeling anxious during the afternoon / early evening.</li> <li>I tried reducing the dose by taking only one 50mg pill some time around noon but felt anxious throughout the day, so I went back up to two pills.</li> <li>About a week ago I started taking splittable 50mg pills, so I received a dose of 25mg in the morning and 25mg in the evening. I didn’t feel more anxious than usual – perhaps even less.</li> <li>About half a week later I noticed I had forgotten to take the 25mg in the morning but didn’t feel any unusual anxiety. I decided to try sticking to 25mg per day.</li> <li>My anxiety has not increased.</li> <li>Yesterday I felt extremely dizzy, like I was about to pass out, in combination with headaches. Headaches are common for me, this kind of dizziness is not.</li> <li>Yesterday I also felt unusually awake. I normally start feeling very tired around 1100–1200, but yesterday I didn’t. I took a nap anyway. The headache improved, the dizziness didn’t.</li> <li>I didn’t take Opipramol today.</li> <li>Today the dizziness and headache are still there, but less so than yesterday.</li> <li>I am optimistic that I will be able to live without depending on Opipramol.</li> <li>I am optimistic that I will be more productive without taking Opipramol.</li> <li>I tend to get super excited about anything that looks like it’s going to improve my situation and thus may have skewed the facts to point to the conclusion that everything is going to be awesome and I will never have any problems anymore, like, by the end of this week, even though I do not find that probable.</li> </ul> <p>I’m curious to see how this develops.</p> Wed, 27 May 2015 00:00:00 GMT https://ninoan.com/observations/ https://ninoan.com/observations/ I have an excellent awkwardness memory <p> People always tell me not to worry so much about seeming awkward in social situations. Like, “oh, nobody is ever going to remember you being weird or stuttery or that time where you didn’t know what to say, or said something wrong, or mispronounced something. They’re all just as caught up with thinking about their own awkwardness that they don’t even notice <em>you’re</em> being weird as well.” </p> <p> And then I think, that makes sense, because I <em>do</em> spend a lot of time worrying about how I myself come across. And it’s good to keep in mind that other people probably do the same, because I tend to forget that other people are human as well and have emotions and issues themselves. (I think this is like a reverse typical mind fallacy. Does that already exist? If it doesn’t, we could call it the <em>a</em>typical mind fallacy.) </p> <p> But when I think about it more, I realize that I am exceedingly good at detecting when other people might feel awkward – or, rather, when other people are in situations where I would feel awkward. And I always remember that. You know, that time when you were asked something by the teacher and you didn’t know the answer and looked really shameful and started blushing furiously and tried to force some words out, but you just didn’t know which ones and you were probably thinking, “Fuck, I should know this!” Or that time you were talking to a person at a party and you heard something wrong and replied something weird; chances are, I’ll obsess about your situations just as much as I would if it’d been me in the situation. And I’ll spend hours thinking <em>what could you have done differently to avoid this?</em> </p> <p> So now I’m wondering: Is this whole “nobody notices/remembers how awkward you are”-thing all a big lie that therapists tell to calm me down, or do I just have an especially good awkwardness memory? </p> Sun, 22 Mar 2015 00:00:00 GMT https://ninoan.com/awkwardness-memory/ https://ninoan.com/awkwardness-memory/ Joylent <p>Last Friday I received my first batch of <a href="http://joylent.eu">Joylent</a>, which is like Soylent, only the <em>J</em> stands for “Europe.” I’d ordered the “variety pack” with 15 meals, which means 5 bags with differently flavored powder: vanilla, banana, chocolate, and strawberry.</p> <p>I was one of the people who fell in love with Soylent when it was still a Kickstarter and you couldn’t order it yet, not even in America. I can enjoy food in a social setting, and there are some things that taste pleasant, but generally, I’m not a big fan of food. Some people find cooking relaxing — I find it emotionally draining. There are too many things going on, you have to be careful not to touch anything or you’ll burn your fingers, and the food will get horribly burned, too, if you stop stirring for half a second. Hence I just end up eating toast with cheese or Nutella or something, 99% of the time, and then I keep biting the inside of my mouth instead of the food, so everything tastes like blood anyway.</p> <p>If drinking three glasses of gray liquid every day could make all that go away and the only price was that it didn’t taste as exciting? That would be fantastic.</p> <p>So I opened the first package, vanilla, and took in the kind of un-vanilla-y smell of the enormously large quantity of powder. If you’re used to two spoons of protein powder in ≈450ml of milk or water, this will be a bit of a shock. And it doesn’t just <em>look</em> like a lot of powder, you can tell while you’re drinking it, too, because there’s not enough water to dissolve it all. I’m not going to lie: the first mouthful of that stuff was <em>really</em> disgusting. But I didn’t let that stop me.</p> <p>While I continued to drink and did my best not to throw up all over the kitchen table, my hunger did start to fade, though I did eat other stuff as well because let’s be serious, 2100 calories for a full day? I haven’t tracked this with great accuracy, but I’m pretty sure I can eat at least 2500 calories and still lose weight.</p> <p>Trying the next flavor, banana, on the second day, I realized my initial disgust may have been due, in part, to the fact that vanilla flavored Joylent tastes infinitely worse than any of the other kinds. Banana is better, chocolate is better still, and strawberry is about the same as chocolate. Of course it still feels like mud, but I got used to that surprisingly quickly.</p> <p>My digestion wasn’t super excited about this whole experiment, but as long as I ate <em>some</em> solid food at some point during the day (which I was doing anyway, lest I starve) it seemed to work out fine. Also, it’s not like my digestion is super excited about <em>anything</em>. Maybe I should see a doctor about that. Okay, before everyone starts shouting “TMI, TMI!”, let’s move on to something more fun.</p> <h1 id="things-you-can-do-to-put-more-joy-in-joylent">Things you can do to put more joy in Joylent</h1> <ul> <li>Mix it with orange juice. Seriously, this is amazing. (I tried this with vanilla or banana, if I remember correctly.)</li> <li>Put the protein powder you still have lying around in so you get more protein, better taste, <em>and</em> more calories at the same time. This way, after the gym, instead of drinking a protein shake and eating dinner, you can combine both into one!</li> <li>Put the Joylent in the fridge for an hour before you drink it. I feel like this helps dissolve the powder better, or masks the powdery texture more, but this may be a placebo. In any case, it’s much more pleasant to drink it cold than lukewarm.</li> <li>Mix in some flavored soy milk. I like to put chocolate soy milk into chocolate Joylent.</li> </ul> <p>These were just the things I tried in the short time where this experiment went on. I’m sure there are a million other things you can do.</p> <h1 id="so-am-i-going-to-buy-more">So, am I going to buy more?</h1> <p>At first it looked very much like I wasn’t even going to finish the 5 bags I had bought, but as soon as I went back to normal food, I started craving Joylent because the whole process just sucks so much less. First of all it’s faster to make and consume, and second of all, you know how after lunch you just want to sleep for an hour? That doesn’t seem to happen with Joylent.<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref="" aria-describedby="footnote-label">1</a></sup> The hunger just goes away quietly after some time, while I’m still able to stay awake and think.</p> <p>In conclusion, nutrition is not a solved problem, but at least I don’t have to use the toaster so often anymore.</p> <section data-footnotes="" class="footnotes"><h2 class="sr-only" id="footnote-label">Footnotes</h2> <ol> <li id="user-content-fn-1"> <p><strong>Update:</strong> After further experimentation, I have to report that, actually, it does. <a href="#user-content-fnref-1" data-footnote-backref="" aria-label="Back to reference 1" class="data-footnote-backref">↩</a></p> </li> </ol> </section> Wed, 04 Feb 2015 00:00:00 GMT https://ninoan.com/joylent/ https://ninoan.com/joylent/ The Power of Dimensions <p> I suspect the majority of people who have any use for this already know about it and use it daily, but I have only recently realized how cool this is. </p> <p> You know how you always forget what the relationship between <em>c</em>, <em>λ</em>, and <em>ν</em> is? Like, they give you the energy of a photon and you’re supposed to calculate the wavelength? You know <em>E</em> = <nobr><em>h ν</em></nobr>, but now you have to figure out how to convert the frequency to a wavelength. Now, instead of looking the formula up on Wikipedia, how about using dimensional analysis? You write down the unit of <em>λ</em>, which is m, and then you only need to figure out how to construct that unit with a speed and a frequency. Speed is <nobr>m s<sup>–1</sup></nobr> and frequency is <nobr>s<sup>–1</sup></nobr>, so to cancel the seconds out, you divide the speed by the frequency and get <nobr>m s<sup>–1</sup> s</nobr> = m, from which you can easily see that <em>λ</em> must be <nobr><em>c</em> / <em>ν</em></nobr>. And you’re done. </p> <p> Another good example is when you have an exponential function or a sine or cosine. You know the argument for these functions must be dimensionless, so if you’re not sure what factors you have to put into the argument, you can just keep throwing stuff in there until all the units cancel and it’ll probably be right. </p> <p> Or if you want to sanity check your calculations you need only look at your dimensions. When you see a sum of, say, a length and an area, you know you’ve done something wrong. </p> <p> The same applies of course to the other kind of dimension — the one in vectors. When you try to put a three dimensional vector in an exponential function, you have a problem. You’re probably missing another vector to form a dot product with. Or if you’re trying to add a vector and a scalar, again, you know you’re missing something. </p> <p> It seems pretty simple, but I was surprised how useful this is once you get the hang of it. </p> Tue, 27 Jan 2015 00:00:00 GMT https://ninoan.com/dimensions/ https://ninoan.com/dimensions/ 2014. Progress <p> <small>[<em>I’m posting this a bit late, so if you’re confused by things like “this year” and “next year,” imagine I posted this on Dec 31, 2014, 23:59:59.</em>]</small> </p> <p> At the beginning of this year, the mere thought of speaking in front of a group of people literally scared me to death. I can now present a homework problem I have not spent a huge amount of thought on in the most sloppy way possible, be told in front of everyone that I did everything wrong, trip over something on the way back to my seat, and take it all without a sweat. </p> <p>Finally, we’re making progress. Nino: 1, his brain: 0.</p> <figure> <a href="https://f001.backblazeb2.com/file/NinoPublic/images/2014-in-review_full.png"><img src="https://f001.backblazeb2.com/file/NinoPublic/images/2014-in-review_thumb.png" alt="2014-in-review"></a> <figcaption> Apparently Facebook thinks my year was all about the celebration of grumpy potatoes. </figcaption> </figure> <p> The year is coming to a close and everyone is doing yearly reviews, so I decided to create my own. I used the <a href="http://alexvermeer.com/8760hours/">8760 hours template</a> and ended up with a text that is around 6,000 words long<sup><a id="ffn1" href="#fn1" class="footnote">1</a></sup> and contains pretty much everything that happened this past year, including many unpublishable details. This is a much shorter version that doesn’t have that problem and is hopefully less boring than the original for everyone who isn’t me. </p> <h2>The past</h2> <p> While 2014 was certainly not a <em>good</em> year, I think I can safely say it was the best one I’ve had, so far. </p> <p> I learned a lot of new things, both about my field of study and about life in general, and, as I described above, I made a lot of progress on improving my mental health and confidence. I’ve managed to keep my depressive episodes to a minimum and, in an attempt to be a bit more agenty, I even moved out of my parents’ house and into a small place close to my university. On top of all that, financially, I’m in as good a position as someone without an income can hope to be. </p> <p> The “not good” part of the year mostly revolved around school: In 2013 I’d discovered for the first time, that I am able to pass exams if I study enough. So, in 2014, I thought, I would just keep doing that and have the best grades in the world and everything would be amazing. After four exams I barely passed and one I postponed for another year because I was too distracted to focus, that optimism quickly vanished. </p> <p> Over the course of the year I tried several techniques I read about on the internet to increase my productivity, and some worked for a while, which led me to announce numerous times to my friends and family, that I’d finally solved my productivity issues and it would all be smooth sailing from now on. Sadly, I kept being wrong. The fact that I always tried so many new things made my therapist very happy, but it was still frustrating that no lasting benefit ever came from the attempts. </p> <h2>The present and future</h2> <p> Over the last few weeks, things have been getting better again. To maintain some of that momentum, I sat down and had a good think about what I wanted to do with my life, since, maybe, having long-term goals would help motivate me to be more effective <em>now</em>. These are the main goals I came up with for 2015: </p> <h3>Studying</h3> <p> Wherever I choose to go after I finish my bachelor’s degree, better grades would probably increase my chances, since many schools, surprisingly, won’t accept students with bad grades. Therefore I commit to only producing grades that start with a “1,” starting next semester (that’s like an A(±), for all my millions of international readers). I’m not sure how hard this will be but I feel like my brain should be capable enough to make this reasonably possible, with some preparation. </p> <p> Additionally, I will finish 10 textbooks. I don’t think I’ve ever actually read a textbook from start to finish, but this seems like a reasonable number to learn some new things. Also I think I read a similar number somewhere else so I’m sure this is a good idea. </p> <h3>Writing</h3> <p> I’m not a fantastic writer, and since it seems like writing would be a good skill to have, I’ll try to write at least 60,000 words this year and get into a habit of doing at least one pomo of writing per day. If this works well enough, I might even post more stuff on this site. </p> <h3>Miscellaneous</h3> <p> A few months ago I started doing mindfulness meditation and that was kind of fun, so I’ll try to keep doing a 10 –20 minute session every day. </p> <p> In addition to that, I’ll go back to writing journals / daily reviews, and weekly reviews. I did the daily reviews for a while last year and it helped my brain stay sane, but I stopped when I figured out how to do the same without writing. Now that I’m having a more goal-oriented year, I’d like to have more content to base my next yearly review on, so I’ll start again. The weekly reviews are intended to give me more of a big-picture view and track my overall progress toward my goals. We’ll see how that goes. </p> <p> Lastly, I have an extremely embarrassing habit, that I desperately need to get rid of. It looks a bit similar to <a href="http://en.wikipedia.org/wiki/Excoriation_disorder#mediaviewer/File:Fingers-dermatillomania.jpg">this</a> (maybe don’t click that link if you’re eating), and if I still haven’t stopped that shit by next December, I’ll give out 100 €. I’ll do a big raffle and everything. It’ll be amazing. But seriously. Why is this so hard. </p> <hr> <p>And that’s it. Let’s make 2015 the best year yet.</p> <ol id="footnotes"> <li id="fn1"> Fun fact: My review of 2014 is the longest document I have ever written in my entire life, with the second place being a school report for a 2-week internship, which was around 2,200 words. Also, the school report took me about 2 months and help from my mother to complete, while the review took me like 5 days. This is also the reason why I need to point out the enormous length of the yearly review every time I talk about it. <a href="#ffn1">↩</a> </li> </ol> Thu, 08 Jan 2015 00:00:00 GMT https://ninoan.com/2014/ https://ninoan.com/2014/ The Last Old Man’s Ghost Colony War Brigades <p>My fanfiction/review-type-thing of the first 3 <a href="http://en.wikipedia.org/wiki/Old_Man%27s_War">Old Man’s War</a> books.</p> <p>Spoilers.</p> <h1 id="old-mans-war">Old Man’s War</h1> <p>In the beginning there was that annoying guy, but then he died, and the rest was just lots of explosions and it was really exciting.</p> <h1 id="the-ghost-brigades">The Ghost Brigades</h1> <blockquote> <p>“But it’s not what Jared wanted, is it?” Sagan said. “He knew his consciousness had been recorded. He could have asked me to try to save it. He didn’t.”</p> </blockquote> <p>Then they decide to do it anyway, and Jared says, “Thank goodness you revived me. Between all the exploding things and people dying I totally forgot that my consciousness had been recorded. I thought I would have to sacrifice myself, but this is so much better!”</p> <h1 id="the-last-colony">The Last Colony</h1> <p>So John talks to General Rybicki, and he’s like,</p> <blockquote> <p>“And because you didn’t survey this planet well enough to know it has its own goddamned intelligent species, seven of my colonists have died in the last three days.”</p> </blockquote> <p>And then the General should have said, “Oh, yea, we noticed they were here, but then we kinda forgot about them; that’s why we didn’t tell you.”</p> <p>And then John should have said, “Oh, well, we’ll just forget about them, too, then,” because after that the only other occasion this comes up is when John asks Gau what he’s going to do with them and Gau says, “Meh, dunno,” and then forgets about it as well.</p> <hr> <p>Other than that the books were pretty entertaining, though.</p> Mon, 18 Aug 2014 00:00:00 GMT https://ninoan.com/omw-review/ https://ninoan.com/omw-review/