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.
MinionPro
andMyriadPro
together! Use theonlytext
option ofMyriadPro
, which is default in a recent version. – sebschub Aug 7 '13 at 16:45