![将整个森林环境中的字体大小更改为脚注大小](https://linux22.com/image/465927/%E5%B0%86%E6%95%B4%E4%B8%AA%E6%A3%AE%E6%9E%97%E7%8E%AF%E5%A2%83%E4%B8%AD%E7%9A%84%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F%E6%9B%B4%E6%94%B9%E4%B8%BA%E8%84%9A%E6%B3%A8%E5%A4%A7%E5%B0%8F.png)
我一直试图将整个森林环境中的字体大小更改为脚注大小,但似乎不起作用。我读过之前的相关文章,但那里提供的答案也不起作用,比如用 \fontsize 封装整个树、声明新的字体大小+系列,或者为每个节点单独更改它。这是我的代码 >>>
\begin{figure}[H] % Set the entire figure in footnote size
\centering
\footnotesize
\begin{forest}
for tree={
align=left, % Aligns all nodes to the left
edge+={thick, -{Stealth[]}},
l sep'+=10pt,
fork sep'=10pt,
% Set the font size of the nodes to footnote size
},
forked edges,
if level=0{
inner xsep=0pt,
tikz={\draw [thick] (.children first) -- (.children last);}
}{},
before typesetting nodes={
if level=3{
content={
\begin{description}[labelindent=1em, labelwidth=0pt, leftmargin=1em, itemsep=0pt, parsep=0pt, font=\footnotesize] % Set the level 3 nodes' content in footnote size
\item[\textbullet] #1
\end{description}
}
}{}
}
[Types of relations
[Expansion
[Elaboration
[- Explanation\\- Exemplification\\- Specification\\- Identification]
]
[Extension
[- Collection\\- Variation\\- Sequence\\- Response\\- Alternation]
]
[Enhancement
[- Spatio-temporal\\- Manner\\- Cause\\- Effect\\- Condition\\- Means\\- Purpose\\- Justification\\- Concession\\- Motivation\\- Enablement\\- Restatements\\- Summary]
]
]
[Projection
[Speech]
[Thought]
]
[Decoration
[Various forms\\and types]
]
]
\end{forest}
\caption{Logico-semantic relations between words and images according to \textcite{kong2006taxonomy}}
\label{fig:Figures}
\end{figure}
已加载的包>
\documentclass[12pt]{report}
\usepackage[a4paper,left=2cm,right=2cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage{pdfpages}
\usepackage{hyperref}
%------LAYOUT--------------------------------------------------------------------
\geometry{
left=25mm,
right=25mm,
top=35mm,
bottom=35mm
}
\usepackage{float}
%------PARAGRAPHS---------------------------------------------------------------
\usepackage{parskip}
\usepackage{blindtext}
%------GRAPHICS-----------------------------------------------------------------
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage[percent]{overpic}
%------ENUMERATION--------------------------------------------------------------
\usepackage{enumitem}
\newlist{researchquestions}{enumerate}{1}
\setlist[researchquestions]{label*={RQ\arabic*}}
\setlist{nosep}
%------SPACING-----------------------------------------------------------------
\usepackage{setspace}
\singlespacing
%------FOOT_HEAD---------------------------------------------------------------
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE]{\small\upshape\color{gray!70}\nouppercase{\leftmark}}
\fancyhead[LO]{\small\upshape\color{gray!70}\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ / #1}{}}
\renewcommand{\headrule}{}
%------TABLES_FIGURES-------------------------------------------------------------------
\usepackage{threeparttable}
\usepackage{tabularx}
\usepackage{caption}
\captionsetup{font=footnotesize}
\usepackage{etoolbox}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage[edges]{forest}
\usepackage{forest}
\usetikzlibrary{arrows.meta}
%------COLOR-------------------------------------------------------------------
\definecolor{lightgray}{RGB}{100, 220, 220}
\definecolor{kuleuven}{RGB}{29,141,176}
\definecolor{kuleuven1}{RGB}{82,189,236}
\definecolor{mygray}{gray}{0.6}
%------REFERENCES---------------------------------------------------------------
\usepackage{url}
\usepackage[style=apa, backend=biber]{biblatex}
\usepackage{csquotes}
\addbibresource{references.bib}
\hypersetup{
colorlinks,
linkcolor={black},
citecolor={blue!50!black},
urlcolor={black}
}
答案1
我不确定这个答案,但请尝试一下。我觉得这个问题可能以前有人问过。正常的答案是再次运行 LaTeX。请告诉我这是否有效,以及您是否能提醒我为什么这样做有效。谢谢,GOM
答案2
你似乎是视觉错觉的受害者。树标签中的文本可能出现比标题中的文字稍大一些,但这是由于缺少上下文造成的。
视觉实验:
\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
{\centering\footnotesize Expansion\par}
\bigskip
\footnotesize\noindent
Logico-semantic relations between words and images according to
some article that I don't know about.
\end{document}
如果你将目光锁定在“扩展”上,它会显得比标题中的文字更大。但它们完全相同。进一步的例子
\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
{\centering\footnotesize \fontname\font\par}
\bigskip
\footnotesize\noindent
Logico-semantic relations between words and images according to
some article that I don't know about. \fontname\font
\end{document}
您会看到\fontname\font
打印结果完全相同。尝试使用您的代码,\fontname\font
在标题末尾添加其中一个标签和。您将在两个实例中看到“ec-lmr10”。
如果您希望树的字体明显较小,您可以声明\scriptsize
。
我借此机会建议对您的序言进行一些修改,将包加载与设置分开。
\documentclass[12pt,a4paper]{report}
\usepackage{geometry}
\usepackage{lmodern}
%\usepackage{textcomp} % <--- no longer needed
\usepackage[T1]{fontenc}
\usepackage{pdfpages}
%\usepackage{float} % don't
%------PARAGRAPHS---------------------------------------------------------------
\usepackage{parskip}
\usepackage{blindtext}
%------GRAPHICS-----------------------------------------------------------------
\usepackage{graphicx}
\usepackage[percent]{overpic}
%------ENUMERATION--------------------------------------------------------------
\usepackage{enumitem}
% spacing
\usepackage{setspace}
%------FOOT_HEAD---------------------------------------------------------------
\usepackage{fancyhdr}
%------TABLES_FIGURES-------------------------------------------------------------------
\usepackage{threeparttable}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{etoolbox}
\usepackage{colortbl}
\usepackage{xcolor}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}
% references
\usepackage[style=apa, backend=biber]{biblatex}
\usepackage{csquotes}
% hyperlinks
\usepackage{url}
\usepackage{hyperref}
%%% settings
% layout
\geometry{
left=25mm,
right=25mm,
top=35mm,
bottom=35mm,
headheight=13.6pt, % <--- as suggested by fancyhdr
}
% lists
\newlist{researchquestions}{enumerate}{1}
\setlist[researchquestions]{label*={RQ\arabic*}}
\setlist{nosep}
% spacing
\singlespacing
% header and footer
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RE]{\small\upshape\color{gray!70}\nouppercase{\leftmark}}
\fancyhead[LO]{\small\upshape\color{gray!70}\nouppercase{\leftmark}}
\fancyfoot[C]{\thepage}
\renewcommand{\chaptermark}[1]{\markboth{\thechapter\ / #1}{}}
\renewcommand{\headrule}{}
% captions
\captionsetup{font=footnotesize}
% hyperref
\hypersetup{
colorlinks,
linkcolor={black},
citecolor={blue!50!black},
urlcolor={black}
}
% colors
\definecolor{lightgray}{RGB}{100, 220, 220}
\definecolor{kuleuven}{RGB}{29,141,176}
\definecolor{kuleuven1}{RGB}{82,189,236}
\definecolor{mygray}{gray}{0.6}
% resources
\addbibresource{references.bib}
\graphicspath{{images/}}
\begin{document}
\begin{figure}[htp]
\centering
\scriptsize
\begin{forest}
for tree={
align=left, % Aligns all nodes to the left
edge+={thick, -{Stealth[]}},
l sep'+=10pt,
fork sep'=10pt,
% Set the font size of the nodes to footnote size
},
forked edges,
if level=0{
inner xsep=0pt,
tikz={\draw [thick] (.children first) -- (.children last);}
}{},
before typesetting nodes={
if level=3{
content={
\begin{description}[labelindent=1em, labelwidth=0pt, leftmargin=1em, itemsep=0pt, parsep=0pt, font=\footnotesize] % Set the level 3 nodes' content in footnote size
\item[\textbullet] #1
\end{description}
}
}{}
}
[Types of relations
[Expansion
[Elaboration
[- Explanation\\- Exemplification\\- Specification\\- Identification]
]
[Extension
[- Collection\\- Variation\\- Sequence\\- Response\\- Alternation]
]
[Enhancement
[- Spatio-temporal\\- Manner\\- Cause\\- Effect\\- Condition\\- Means\\- Purpose\\- Justification\\- Concession\\- Motivation\\- Enablement\\- Restatements\\- Summary]
]
]
[Projection
[Speech]
[Thought]
]
[Decoration
[Various forms\\and types]
]
]
\end{forest}
\caption{Logico-semantic relations between words and images according
to \textcite{kong2006taxonomy}}
\label{fig:Figures}
\end{figure}
\end{document}