有没有办法标准化字体的外观,因为它们在文本中以一种方式出现,即
并以另一种方式在图表上显示,即
?
以下是代码:
%** MainS.tex**
\documentclass{article}
\usepackage[italian]{babel}
\usepackage{lmodern}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{bm}
\usepackage{mathrsfs}
\usepackage{bbm}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{arrows.meta,spy,positioning,patterns}
\usepackage{anyfontsize}
\begin{document}
Let's consider the vector $\bm{\hat{x}}$ of the following figure
\begin{figure}[h]
\begin{tikzpicture}[spy using outlines={circle, magnification=8, size=5.75cm, connect spies}]
\draw [line width=.005pt,-{Latex[width=.25pt, length=.55pt]}] (9.83,6.67) -- ++(.22,.015)
node[pos=0.7,inner
sep=.25pt,above]{\fontsize{.75}{20}\selectfont $\bm{\hat{x}}$}; %X
\spy [red] on (10.095,6.725) in node at (15,2.7);
\end{tikzpicture}
\caption{The vector $\bm{\hat{x}}$.}
\label{fig:vectx}
\end{figure}
\end{document}
有什么建议么?
答案1
改变字体大小和缩放不一样。如果你想要缩放,你可以\scalebox
这样使用:
\documentclass[tikz, border=1 cm]{standalone}
\usepackage{bm}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
/node{$\bm{\hat{x}}$};
/node{\scalebox{0.5}{$\bm{\hat{x}}$}};
/node{\fontsize{.75}{20}\selectfont $\bm{\hat{x}}$};
\end{tikzpicture}
\end{document}