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?

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. :-( – pushpen.paul Jun 10 '14 at 5: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 --- – user2478 Jun 10 '14 at 6:21

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.