"글로벌" 마인드맵에서 노드의 글꼴 크기를 설정하는 방법

"글로벌" 마인드맵에서 노드의 글꼴 크기를 설정하는 방법

여기 tex.stackexchange.com에서 글꼴 크기(모든 글꼴 크기 포함)에 대한 설정을 정의하려고 시도하는 문제를 찾지 못했습니다. "중복"되는 문제를 게시할 가능성이 있지만 어쨌든 게시하겠습니다. 내 질문은 "전역" 방식으로 마인드맵 노드의 글꼴 크기를 설정하는 방법입니다. 단순한 문제지만 그 안에는 미묘한 부분이 있는 것 같아요.

여기 내 예가 있습니다

여기 내 MWE가 있습니다.

\documentclass{article}
\usepackage{anyfontsize}
\usepackage{tikz}
\usepackage[paperwidth=5cm,paperheight=5cm]{geometry}
\usetikzlibrary{mindmap}
\begin{document}
\centering\begin{tikzpicture}[mindmap]
    \tikzstyle{every node}=[text width=1cm,align=flush center,minimum size=1cm]
         \node [concept, text=white] at (0,0) 
      {any other text}
    child [concept color=blue!50, grow=0,level distance=80]
    {node [concept] (text) {Text}}; 
\end{tikzpicture}
\end{document}

답변1

여기에 \fontselect{X-size-unitdimen}{X-size-unitdimen}\selectfont. 효과를 얻으려면 다음을 사용해야 한다고 생각합니다 \selectfont.

\documentclass{article}
\usepackage{anyfontsize}
\usepackage{tikz}
\usepackage[paperwidth=5cm,paperheight=5cm]{geometry}
\usetikzlibrary{mindmap}
\begin{document}
\centering\begin{tikzpicture}[mindmap]
    \tikzstyle{every node}=[font=\fontsize{2mm}{3mm}\selectfont,text width=1cm,align=flush center,minimum size=1cm]
         \node [concept, text=white] at (0,0) 
      {any other text}
    child [concept color=blue!50, grow=0,level distance=80]
    {node [concept] (text) {Text}}; 
\end{tikzpicture}
\end{document}

내 모습은 스스로 대답하면서

답변2

OpenType 글꼴(이전 TeX Type 1 글꼴이 아님) 로 컴파일 lualatex하고 사용하려는 경우 정수가 아닌 값이라도 원하는 크기와 간격을 얻을 수 있습니다. 같은 패키지를 사용하면 textpos텍스트를 어디에나 배치할 수 있지만 여기서는 코딩하지 않겠습니다. MWE:

\documentclass{article} % Default font size. Process with lualatex.
\usepackage{fontspec}
\makeatletter
\renewcommand\normalsize{\@setfontsize\normalsize{11.43pt}{15.824pt}}
\normalsize
\makeatother
\begin{document}
\setlength\parindent{0pt}
Hello World.\\
Hello World\\
Hello World\par
\makeatletter
\renewcommand\normalsize{\@setfontsize\normalsize{13.723bp}{17.448bp}}
\normalsize
\makeatother
Hello Again\\
Hello Again\\
Hello Again\par
\end{document}
\\\
Compile that with `lualatex` and look at the resulting PDF.

관련 정보