0

I need to add text to a pdf, but the largest \Huge is not big enough, so I change the font size according to question's answer, but I found that this command does not work for math fonts. You can see that only the text is successful. , and I need a command that works on mathematical symbols

\documentclass[border=2pt,tikz]{standalone}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{siunitx} 
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\node[draw=none,fill=none] at (0,0){\includegraphics{one-inc.pdf}};
\node[font=\fontsize{80}{200}\selectfont] at (25cm,3.5cm) {K};%
\node[font=\fontsize{80}{200}\selectfont] at (24cm,3.5cm) {$K_x$};%
\node[font=\fontsize{80}{200}\selectfont] at (23cm,3.5cm) {$\omega$};%

\end{tikzpicture}

\end{document}

node1

what should I do

  • you are asking about math fonts so don't make an example that does \includegraphics{one-inc.pdf} so that no one can run the example. – David Carlisle Nov 19 '23 at 11:24
  • The second argument in \fontsize{80}{200} seems needlessly large. Do consider using \fontsize{80}{96}. (It's common to set the second argument of \fontsize about 20% larger than the first.) – Mico Nov 19 '23 at 11:31

1 Answers1

3

A more reasonable example would be

\documentclass{article}

\begin{document}

\fontsize{80}{200}\selectfont

K $K_x$

\end{document}

which produces

enter image description here

with lualatex and

enter image description here

with pdflatex.

In both cases giving multiple warnings such as

LaTeX Font Warning: Font shape `OMS/cmsy/m/n' in size <55.99976> not available
(Font)              size <24.88> substituted on input line 7.

Use any font family other than computer modern math, or for cm, add the fix-cm package to allow arbitrary sizes.

\RequirePackage{fix-cm}
\documentclass{article}

\begin{document}

\fontsize{80}{200}\selectfont

K $K_x$

\end{document}

Produces

enter image description here

in lualatex

enter image description here

in pdflatex

David Carlisle
  • 757,742