1

To remove the warnings,

Font shape `OT1/cmss/m/n' in size <4> not available(Font) size <5> substituted Size substitutions with differences(Font) up to 1.0pt have occurred.

I used the package lmodern, as stated here. However, it does create some problems in figure and sub-figure captions.

MWE:

\documentclass{article}

\usepackage{lmodern, subfigure}

\begin{document}
\begin{figure}

\subfigure[$A$-−$B$-−$C$-−$D$-−$A$-−$C$]{
}
\caption{$A$-−$B$-−$C$-−$D$-−$A$-−$C$}
\end{figure}
\end{document}

Screenshot:

How to fix that?

hola
  • 4,026
  • 3
  • 35
  • 72

1 Answers1

2

You hae an unicode character at -−. The second one is an ndash. This works:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern, subfigure}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{figure}
\subfigure[$A$---$B$---$C$---$D$---$A$---$C$]{foo}
\caption{$A$---$B$---$C$---$D$---$A$---$C$}
\end{figure}
\end{document}

Alternetively define a new unicode char:

\documentclass{article}
\usepackage{lmodern, subfigure}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}
\newunicodechar{−}{--}% First one is an n-dash not a hyphen!
\begin{document}
\begin{figure}

\subfigure[$A$-−$B$-−$C$-−$D$-−$A$-−$C$]{}
\caption{$A$-−$B$-−$C$-−$D$-−$A$-−$C$}
\end{figure}
\end{document}
  • This works for this MWE, but not for my original code. :-( – hola Jun 10 '14 at 05:52
  • In your example the second is not a hyphen, it is a n-dash which is in TeX notation --. Delete all those -− and replace them with --- –  Jun 10 '14 at 06:21