我在tabbing
环境中输入了一个段落。我使用\=
放置制表符,然后\>
移动到制表符位置。短行没问题。但长行时,它超出了行宽。我不知道如何修复错误。请帮助我,这是我的代码和结果:
\documentclass[12pt]{extbook}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\begin{tabbing}
where \hspace{5mm}\= is the index for a typical neuron in the hidden layer \\
\> i is the index for a typical neuron in the input layer \\
\> $v_{ji}$ is the typical weight connecting $j^{th}$ neuron in hidden layer to $i^{th}$ neuron in the input layer //
% \> n is the number of outputs
% \> $b_j$ is the bias and f is the output\\
\end{tabbing}
\end{document}
答案1
tabbing
单元格不能跨行拆分;您需要采用不同的方法:
\documentclass{article}
\usepackage[pass,showframe]{geometry} % just to show the margins
\usepackage{enumitem}
\newlength{\wherelen}
\newcommand{\where}[1]{%
\settowidth{\wherelen}{where\quad}%
\begin{itemize}[
leftmargin=\wherelen,
labelwidth=\wherelen,
labelsep=0pt,
align=left,
nosep]
\item[where] #1
\end{itemize}}
\begin{document}
\where{
$j$ is the index for a typical neuron in the hidden layer \\
$i$ is the index for a typical neuron in the input layer \\
$v_{ji}$ is the typical weight connecting $j$-th neuron in hidden layer
to $i$-th neuron in the input layer \\
$n$ is the number of outputs \\
$b_j$ is the bias and $f$ is the output
}
\end{document}
不要忘记以正确的方式括住数学变量;不要使用$i^{th}$
,而要使用$i$-th
。维多利亚时代的上标“th”在印刷界是不受欢迎的。我应该承认,一个著名的文字处理器将它强加给用户,但是……