僅在 tikz 環境中變更字體屬性

僅在 tikz 環境中變更字體屬性

我經常在 tikz 環境中對圖形進行註釋。例如

\documentclass[12pt]{report}

\usepackage[T1]{fontenc}
\usepackage{Baskervaldx}
\usepackage[Baskervaldx,upint]{newtxmath}

\usepackage{tikz}
    \usetikzlibrary{arrows,arrows.meta,patterns,decorations,shapes.geometric}
    \usetikzlibrary{decorations.markings,decorations.pathmorphing,decorations.pathreplacing}    

\begin{document}

    \begin{figure}[h] 
       \centering        
       \begin{tikzpicture}
          \node[anchor=south west,inner sep=0] at (0,0) 
          {
            \includegraphics[width=1.0\textwidth]{Images/MyImage.pdf}
          };
          \begin{scope}
             \draw[decoration={brace,raise=0mm},decorate] (58.4mm,37mm)--(80.1mm,37mm)node[above,align=center,midway,sloped]{here is some text};
          \end{scope}
        \end{tikzpicture}
        \caption{Oh Caption, my Caption...}
        \label{MyFigure}
     \end{figure}

\end{document}

每當我呼叫環境時,我想減少字體大小tikzpicture,因為目前它似乎只是由文件全域字體設定設定的。

所以我想保留文檔字體設定的其餘部分(字體系列、字體大小等),因為我已經定義了它們,但將字體設定為tikzpicture環境內部

相關內容