[texhax] typesetting algorithms in computer science

Susan Dittmar Susan.Dittmar at gmx.de
Fri Jun 2 09:34:43 CEST 2017

Hi folks,

I need advice on how to typeset algorithms in computer science papers 
(not a specific journal yet).

In short, algorithms consist of some keywords (usually typeset bold, 
though I personally dislike the very strong emphasis this gives), some 
prosa (usually typeset like the surrounding text), and some variables 
and named constants in mathematical or pseudo-mathematical expressions. 
It's those variables and constants I have problems with.

In mathematics, variables usually are one-glyph things (sometimes 
distinguished further by indizes and/or accents). In computer science, 
word-like variables and constants are very common, something TeX's math 
mode does not expect. How should I typeset those? Here's an example of 
what I have and what I don't like:

Here $pi$ is typeset as if it were meant as $p$ times $i$, and $euler$ 
is typeset as if it were meant as $e$ times $u$ times $l$ times $e$ 
times $r$.

Any ideas on how to solve that?

Thanks in advance,

Susan Dittmar

More information about the texhax mailing list