4

I'm using MinionPro for the body of a document and Myriad for figure/table captions. Because I can't load packages MinionPro and Myriad at the same time, I load the Myriad fonts for the sans-serif fonts using a \renewcommand{\sfdefault}{\Myriad-LF} call in the preamble. Then I set the figure/table captions to use the sans-serif font using package caption.

This works great, except that the en dashes (--) and em dashes (---) are not properly interpreted as long dashes; they're displayed as two or three hyphens. A minimal working example is below. Any ideas?

\documentclass[12pt]{article}

% Set fonts (Minion Pro, Myriad):
\usepackage[lf]{MinionPro} % 'lf' option to use full-height (lining) figures

% We can't use package Myriad here as it conflicts with MinionPro, so
% instead we declare the Myriad fonts manually.
% Set body sans serif (\textsf) text to Myriad with lining figures:
\renewcommand{\sfdefault}{Myriad-LF}

% Set math sans serif (\mathsf) alphabet to Myriad with lining figures:
\SetMathAlphabet{\mathsf}{normal}{OML}{Myriad-LF}{m}{n}
\SetMathAlphabet{\mathsf}{bold}{OML}{Myriad-LF}{b}{n}

\usepackage[margin=10pt,font={small,sf},labelfont={sf,bf},labelsep=endash]{caption}

\begin{document}
Some text.
\begin{figure}
  \centering
  \ldots
  \caption{The mass of the coal storage piles ranged from 8--20 megatonnes.}
  \label{fig:coal}
\end{figure}
\end{document}

This outputs the following, with the incorrect dash highlighted.

mwe image

  • You can use MinionPro and MyriadPro together! Use the onlytext option of MyriadPro, which is default in a recent version. – sebschub Aug 7 '13 at 16:45
  • 1
    @sebschub care to provide an answer to take this oldie off the unanswered list? – Paul Gessler Apr 19 '15 at 1:24
2

The packages MinionPro and MyriadPro from FontPro can be used together. By default, the math font is not changed by MyriadPro. With the sansmath option, the sans serif of \mathsf is adjusted and an additional math version is defined to allow two math fonts with matching math symbols in one document (see the documentation for that).

Thus, the code

\documentclass[12pt]{article}

% Set fonts (Minion Pro, Myriad Pro):
\usepackage[lf]{MinionPro} % 'lf' option to use full-height (lining) figures
\usepackage[lf, sansmath, scale=0.91]{MyriadPro}

\usepackage{caption}
\DeclareCaptionFont{sfmath}{\mathversion{sans}}
\captionsetup{margin=10pt,font={small,sf, sfmath},labelfont={sf,bf},labelsep=endash}

\begin{document}

Some text with $a \times \mathsf{b} = c / d$.

\begin{figure}[h]
  \centering
  \ldots
  \caption{The mass of the coal storage piles ranged from 8--20
    megatonnes and $a \times b = c / d$.}
  \label{fig:coal}
\end{figure}
\end{document}

produces the following output:

Minion and Myriad in one document

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.