You're reading: Posts Tagged: LaTeX

TeXnique: a LaTeX typesetting game

You know what’s fun? Typesetting mathematics! Glad you agree, because here’s a game that puts the fun in ‘underfilled hbox’.

Screenshot of TeXnique. A box showing the target formula above a box showing a rendering of code typed in the box below.

In TeXnique, you’re shown a typeset bit of mathematical notation, and have to frantically type LaTeX to reproduce it. You get three minutes, and you’re awarded points when you produce something that’s a pixel-perfect replica of the original. Think Typing of the Dead crossed with The Art of Computer Programming.

When I first saw this I rolled my eyes, but now my high score is 68 and I don’t know why I keep going back to it.

The formulas are largely well-known snippets of notation, so you might find some of them coming out through muscle memory, but if a symbol shows up that you can’t remember the macro for, there’s always the brilliant Detexify tool.

Play: texnique.xyz by Akshay Ravikumar.

realhats: Writing a $\LaTeX$ Package

A few months ago, Adam Townsend went to lunch and had a conversation. I wasn’t there, but I imagine the conversation went something like this:

Adam: Hello.
Smitha: Hello.
Adam: How are you?
Smitha: Not bad. I’ve had a funny idea, actually.
Adam: Yes?
Smitha: You know how the \hat command in LaTeΧ puts a caret above a letter?… Well I was thinking it would be funny if someone made a package that made the \hat command put a picture of an actual hat on the symbol instead?
Adam: (After a few hours of laughter.) I’ll see what my flatmate is up to this weekend…
Jeff: What on Earth are you two talking about?!

As anyone who has been anywhere near maths at a university in the last ∞ years will be able to tell you, LaTeΧ (or $\LaTeX$) is a piece of maths typesetting software. It’s a bit like a version of Word that runs in terminal and makes PDFs with really pretty equations.

By default, LaTeΧ can’t do very much, but features can easily added by importing packages: importing the graphicsx package allows you to put images in your PDF; importing geometry allows you to easily change the page margins; and importing realhats makes the \hat command put real hats above symbols.

LaTeX/TikZ to draw a star graph $K_{1,n}$

For a diagram for a class this week, I’ve written a LaTeX command to draw star graphs using TikZ. A star graph $K_{1,n}$ is a graph with a single central node, $n$ radial nodes, and $n$ edges connecting the central node to each radial node. I am sharing this here in case it is useful to anyone else.

LaTeX for typesetting a multi-pile Nim game

I am preparing to teach our new final year module ‘Game Theory and Recreational Mathematics’. So I’m thinking about game typesetting in LaTeX (texlive-games is useful in this regard). I was looking for an easy way to display multi-pile Nim games. Usually, I find searching “latex thing” finds numerous options for typesetting “thing” in LaTeX, but here I was struggling.

Nim objects could be anything, of course, but conventionally sticks or stones are used. There are various types of dot in LaTeX that might look like stones, but somehow a line of dots didn’t seem satisfactory. There are various ways to draw a line (not least simply typing ‘|’), including some tally markers (e.g. in hhcount). My problem with these (call me picky) is that they are all identical lines, and a ‘heap’ of them just looks very organised. Really, I want a set of lines that looks like someone just threw them into heaps (though probably without crossings for the avoidance of ambiguity). So I wrote my own.

You can finally use TeX for maths in Microsoft Office… just about

As of next month, you’ll be able to type TeX maths into Office 365 apps and it’ll work.

See the announcement on the Microsoft Developer blog for more details. Warning: it’s a bit complicated.

ShareLaTeX and Overleaf are merging

Overleaf and ShareTeX logos

Once upon a time (2011), there launched an online LaTeX editor called ShareLaTeX. The very next year, there launched an online LaTeX editor called writeLaTeX. In 2015, writeLaTeX rebranded as Overleaf. Both Overleaf and ShareLaTeX offer browser-based LaTeX editing. Think of it like Google Docs for LaTeX. Both operate under a freemium model. If you use one of them, know that the other is fairly similar. If (like me) you were vaguely aware that there was an online LaTeX editor out there without using it, it was probably one of these or the other (or, I’m pretty sure, both at different times). Though note that these are not the only browser-based LaTeX editors – a native operating system ‘B’ means browser-based in this Wikipedia list of TeX editors and there are currently ten Bs in the list.

Recently, Overleaf fully acquired ShareLaTeX (Scribtex Limited) and plans to integrate the two products into one. The announcement says everyone from both teams will continue to be involved. The announcement contains more detail, a FAQ list and the following explanation.

What does this mean for you as an Overleaf or ShareLaTeX user? No worries! You won’t see any big change in the near future. Both services you know and love will continue to serve you as you have come to expect and be supported by the combined Overleaf and ShareLaTeX team. Over the coming months, we will be working on merging Overleaf and ShareLaTeX together into a single service. We aim to make the transition as smooth as possible. As we develop the combined service, we are actively seeking your feedback and input, starting with this survey. Ideally the only differences you will notice are the improvements to the editor you are currently using.

More information

Exciting News — ShareLaTeX is joining Overleaf on the Overleaf Blog.

Also: ShareLaTeX Joins Overleaf on the ShareLaTeX Blog, which appears to be the same text.

Via Emma Cliffe on Twitter.

Google+