# Minion Pro and Monospace Font

This is more a typography question than a TeX one, but can anyone recommend me a good monospaced font that blends well with Minion Pro?

-
As you say yourself, this is not a question about TeX (and hence off-topic). I don't know about their current rules, but this might be on-topic at graphicdesign.stackexchange.com. –  Caramdir Aug 14 '11 at 1:50
We've answered such questions before: What best combination of fonts do you recommend?, which might be a duplicate. –  Alan Munn Aug 14 '11 at 4:06

I found this thread, because I had the same issue and I tested a huge bunch of teletype fonts and got stuck with cfr-lm. But loading the whole cfr-lm package would be overkill so I just did:

\renewcommand{\ttdefault}{clmjv}


Which is equivalent to

\usepackage[tt={oldstyle=true,variable=true}]{cfr-lm}


## Showcase

In the following example of a bibliography with biblatex the DOI is typeset with cfr-lm.

If you want to typeset source code it might be better to use the tabular version of cfr-lm as you usually want to align stuff in your code. Personally I think that lining figures also look better in code. Therefore I'd use

\renewcommand{\ttdefault}{clmt}


which is equivalent to

\usepackage[tt={oldstyle=false,variable=false}]{cfr-lm}


# Showcase

This piece of code is taken from another answer I once gave.

% arara: pdflatex: { shell: yes }
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage[T1]{fontenc}% cfr-lm is T1 only
\usepackage{minted,MinionPro,caption}
%\renewcommand{\ttdefault}{clmjv}% oldstyle, proportional
\renewcommand{\ttdefault}{clmt}% lining, tabular
\newcommand\code{\texttt}
\newcommand\param{\textit}
\DeclareCaptionFont{bfmath}{\boldmath\bfseries}
\DeclareCaptionFormat{ruled}{\hrulefill\par#1#2#3}
\captionsetup{format=ruled,font=bfmath}
\begin{document}
\begin{figure}
\centering
\begin{minted}{c}
const uint8_t *data     = /* buffer head */;
const uint8_t *data_end = /* buffer tail */;
int size = bytestream_get_be16(&data);
if (data + size >= data_end || data + size < data)
return -1;
data += size;
...
int len = ff_amf_tag_size(data, data_end);
if (len < 0 || data + len >= data_end
|| data + len < data)
return -1;
data += len;
/* continue to read data */
\end{minted}
\caption{Unstable bounds checks in the form $\code{data} + x < \code{data}$ from FFmpeg/Libav, which gcc optimizes into $x < 0$.}
\end{figure}
\end{document}


-
Very good choice! Can you also post an example with something larger, like code? –  Hugo S Ferreira Aug 14 '14 at 12:21

the LaTeX (Graphic) Companion uses Minion and

\renewcommand{\ttdefault}{emtt}


but

\usepackage[scaled=0.9]{luximono}


is another good choice

-
without wanting to be too pedantic, I've noticed that [scaled=0.86] is a better match between Minion Pro and LuxiMono. Was 0.9 a scaling value off the top of your head? Or are there good reasons for it? (+1) –  nnunes Dec 8 '12 at 0:06
@Herbert Which font is emtt? I can't manage to find it online. All I find is the source to the Graphics Companion. –  Henri Menke May 29 '14 at 18:58

Consolas is, I think, popular with Minion Pro but has licensing restrictions. The similarly-styled free font Inconsolata may be a better choice if you like this style. Inconsolata is licensed under the OFL and sponsored by the TeX Users Group Development Fund

The following two discussions on this site may be helpful:

Using Minion Pro for the main font

What best combination of fonts

Idris Samawi Hamid's 2005 paper for the NTG on Installing Expert Fonts: Minion Pro relates to ConTeXt but useful reading even if you are not using that and recommends Latin Modern for monospace and Euler for maths.

-

Consolas is available with installation of office.

Inconsolata is influenced by Consolas.

The best choice will be TheSansMono Cond by Lucas. He also designed Consolas for microsoft.

These three share the same style. TheSansMono Cond is the best but much more expansive than others. Inconsolata is free as free software. But it lack the subtle fine tuning of the other two. And it has less shapes which means you can not use it to typeset your code in different shapes or weights.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.6708207130432129, "perplexity": 6178.300872936461}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2015-22/segments/1432207932182.89/warc/CC-MAIN-20150521113212-00090-ip-10-180-206-219.ec2.internal.warc.gz"}