我在文档中定义了自己的标题格式。它工作正常,正如预期的那样。但是,有一个图的行距看起来不太好,因为公式将线条推得不均匀。我该如何修复这个标题而不影响其他标题?
\documentclass[a4paper,10pt]{article}
\usepackage{fullpage}
\usepackage{parskip}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{array}
\usepackage{amssymb}
\usepackage[ruled,vlined,linesnumbered]{algorithm2e}
\usepackage{mathrsfs}
\usepackage{bm}
\SetAlFnt{\footnotesize}
\usepackage{adjustbox}
\graphicspath{ {images/} }
\usepackage{color}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{subfiles}
\newcommand{\argmin}{\operatornamewithlimits{arg\ min}}
\DeclareCaptionFormat{myformat}{\fontsize{8}{0}\selectfont#1#2#3}
\captionsetup{format=myformat}
\begin{document}
\begin{figure}[t!]
\centering
\includegraphics[scale=0.45]{A.pdf}
\caption{The parameters in $p_{\theta}(x_i|z) \sim \mathcal{N}(\bm{\mu}_{x_i|z}^{},
\mathbf{\sigma}_{x_i|z}^2 \mathbf{I})$.
The reconstruction is given by $\tilde{x}=\bm{\mu}_{x|z}$. For readability
purposes we do not specify the parameters $\phi,\theta$ in the networks.
However, these parameters are represented by the lines joining the nodes in
the networks plus a bias term attached to each node. In the particular case
of the AEVB algorithm $\phi^{} \equiv \theta^{}$.}
\end{figure}
\end{document}
答案1
您的常规设置强制使用不均匀的基线跳过(任何带有降部或大写字母的行都会比带有小写字母的行具有更多的空间,例如axc
)。一旦修复了这个问题,您可以(在这种情况下)隐藏第一行的数学深度,\smash
但您需要目视检查它是否与下面一行中的任何高字母发生冲突。
\documentclass{article}
\usepackage{bm}
\usepackage[demo]{graphicx}
\usepackage{caption}
\showoutput
%no!!!!\DeclareCaptionFormat{myformat}{\fontsize{8}{0}\selectfont#1#2#3}
% \footnotesize is 8pt and you do not want 0pt baselineskip
\DeclareCaptionFormat{myformat}{\footnotesize#1#2#3}
\captionsetup{format=myformat}
\begin{document}
\begin{figure}[t!]
\centering
\includegraphics[scale=0.45]{A.pdf}
\caption{The parameters in \smash{$p_{\theta}(x_i|z) \sim \mathcal{N}(\bm{\mu}_{x_i|z}^{},
\mathbf{\sigma}_{x_i|z}^2 \mathbf{I})$}.
The reconstruction is given by $\tilde{x}=\bm{\mu}_{x|z}$. For readability
purposes we do not specify the parameters $\phi,\theta$ in the networks.
However, these parameters are represented by the lines joining the nodes in
the networks plus a bias term attached to each node. In the particular case
of the AEVB algorithm $\phi^{} \equiv \theta^{}$.}
\end{figure}
\end{document}