# How can I use another non-esoteric font/font style in equations?

Usually when we write equations, we tend to use:

• Italicized roman font, for symbols: $a, b, c$.
• Non-italicized roman font, for text $a_\text{in}, \mathrm{hello}$
• Boldface symbols for, well, emphasis (sometimes also for matrices or vectors: $\mathbf{P} \subseteq \mathbf{NP}$
• Sans-serif text $\mathsf{}$
• Calligraphic $\mathcal{}$
• Small-caps $\mathsf{}$
• Fixed-width/monospace $\mathtt{}$

So, in this paper I'm writing, regular text is taken up by, well, the text of the paper; I don't want to use boldface since I'm not emphasizing, and there are two kinds of constructs for which I use sans-serif and small-caps respectively. I also use $\texttt$ for typesetting fragments of computer program code (and these sometimes go in equations/formulas).

Since $\mathcal$ and $\mathfrak$ are good mostly for single-letter symbols rather than for complete words, I find myself in need of another style.

I want to be able to write The quick brown fox jumped over $\magichere{dogs} \cap \magichere{lazy}$ and for "dogs" to be "text-ish", but not look like a continuation of the sentence. \magichere is what I'm missing of course.

I've been wondering - is there some other font style, or even a different font, I could use for a third kind of constructs in my paper? Perhaps another roman fonts which is different than the paper body, on one hand, but does not seem out-of-place on the other?

• hard to say (and design is more or less off topic) . \mathtt is one possibility or you could choose a script font more designed for complete words any handwriting font for example or \mathfrak or ... – David Carlisle Sep 5 '17 at 13:03
• @DavidCarlisle: Is there nothing like an "alternative roman" or "second roman"? Perhaps something baseed on one of these? – einpoklum Sep 5 '17 at 13:20
• sure there are thousands of roman fonts and you can use pretty much any of them, but I didn't suggest it as I don't think your readers would like having to squint at individual words to see if they are in computer modern or times or palatino or .... – David Carlisle Sep 5 '17 at 13:22
• Aside: \mathsf definitely doesn't produce small-caps; instead, it produces math-mode sans-serif output. – Mico Sep 5 '17 at 13:53
• (off-topic) where you specify non-italicized roman font, you've got the usages of \text and \mathrm reversed. "hello" is logically \text, and \mathrm' should be used for things like subscript indicators that aren't variables. – barbara beeton Sep 5 '17 at 13:54

if you are willing to use computer modern fonts, there is a slanted alternative, accessed with \textsl. in this style, the letters have a roman shape (see the difference particularly in letters like "a" and "g") but are inclined to an angle of (i think) 15 degrees. some other font families have a style sometimes called "oblique" that is equivalent.

\documentclass{article}
\begin{document}
The quick brown fox jumped over the \textsl{lazy} dog.

\textsl{The quick brown fox jumped over the \textit{lazy} dog.}

\textit{The quick brown fox jumped over the \textsl{lazy} dog.}

$The quick brown fox jumped over the \textsl{ lazy } dog.$
\end{document}


by the way, the italic form used for single-letter variables in computer modern is quite different from the text italic -- it is wider, and letters do not kern as they do in text. also observe that explicit spaces were needed (in the \textsl example within the math string) to avoid everything being run together.

also note (though not shown here) that \mathit is not the same as "math italic" (as used for variables). \mathit is actually the text italic shape, and supports spaces as any other text font; the name is knuth's assignment, based on the fact that it can be used only in math environments.

\magichere... Sorry about this. And I'm only a beginner at producing pixie dust.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations,decorations.pathreplacing,decorations.shapes}
\newcommand\magicpixiedust[1]{%%
\begin{tikzpicture}[baseline=(word.base)]
\node[inner sep=0pt]  (word) {#1};
\begin{pgfinterruptboundingbox}
\node[draw=black!30,fill=yellow,ellipse,decorate,
decoration={shape backgrounds,shape=star,shape size=1mm}
] at (word) {\phantom{\tiny #1}};
\end{pgfinterruptboundingbox}
\end{tikzpicture}}
\pagestyle{empty}
\begin{document}
The quick brown fox jumped over $\magicpixiedust{dogs} \cap \magicpixiedust{lazy}$
\end{document}
`