2

I have a tex file in IEEEtran with its default font size, which is 8pt. I want to include an image PDF, generated by standalone with font size 12pt. I set the scaling to be scale=0.666667, which is 2/3, to change the font size of the image to match with the main text. However, what I see at the end is that the text in the image is much smaller than 8pt. Why? For example, the image is generated by

\documentclass[12pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [draw, align=center] {This is\\12 pt\\before scaling};
\end{tikzpicture}
\end{document}

and the main file is

\documentclass{IEEEtran}
\usepackage{tikz}
\begin{document}
This is a sample text to show the default font size
in IEEEtran document class, which is 8pt.

\includegraphics[scale=0.666667]{image.pdf}
\end{document}
1
  • 1
    Default fotn size of IEEEtran is 10pt. In standalone you define 12pt. Also you scale image ... on such a way is very difficult to obtain the same size of fonts. – Zarko May 12 '20 at 15:41
4

Note that scaling text is bad, as different font sizes might have different drawings and then do not look identical if scaled down.

Not sure if this is an option, but you can make standalone to use IEEEtran class internally which then uses the font defined there.

\documentclass[class={IEEEtran}]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node [draw, align=center] {This is\\the same pt\\before scaling};
\end{tikzpicture}
\end{document}
0

Thanks to @Zarko , the default size of IEEEtran is 10pt. Thus, by setting the sacling to scale=0.83333 it matches perfectly.

1
  • 3
    why not use the default font size of standalone which is the same as your main class, at 10pt, why use 12pt and scale (which produces different fonts) – David Carlisle May 12 '20 at 16:05

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.