当我运行 Texworks 时,出现问题,提示标有黄色的段落中应该有太多括号。如果我在 overleaf 中运行它,我会得到同样的错误,但 Overleaf 仍然能够运行它。我还查看了此段落周围的段落(不在 MWE 中),但找不到任何东西。有人能帮我解决这个问题吗?
梅威瑟:
\documentclass{report}
\usepackage{xcolor}
\usepackage{soul}
\usepackage{marginnote}
\usepackage{setspace}
% margin settings for interview pages
\usepackage[left=1in,right=2.5in,marginparwidth=1.5in]{geometry}
\newcommand{\codedtext}[3]{%
\sethlcolor{#1}%
\marginnote{\setstretch{1}\hl{#3}}\hl{#2}%
}
\begin{document}
% margin settings for regular pages
\newgeometry{left=1in,right=1in,marginparwidth=1in}
This is a normal page with margins set by the \texttt{\textbackslash newgeometry} command.
This settings will be in effect until \texttt{\textbackslash restoregeometry} is
used. The following page shows a coded interview with adjusted margins.
\newpage
% restore to margin settings defined in preamble
\restoregeometry
\onehalfspacing
\noindent \textbf{Speaker: }
\codedtext{yellow}{They are now working on an overflow terminal, which specialists then say: 'Then it's in the wrong place and then? Then we shift the problem to the other side, it doesn't get cheaper on that,’ and then someone says to construct more cranes, but then someone responds 'that's really nice such a terminal, I have 15 cranes and the demand varies from 2 and 30 cranes. Do you know how much crane and quay costs? I'm not going to put down 30 cranes for the occasional peak, because an inland skipper has to wait. I'm not going to get paid for that.' So everyone's looking at each other a little bit, so that's also the question of looking at the system. Everyone's holding each other in a system that doesn't work well.}{\tiny Capacity issues \\ Obstacles to innovation: Money}\\
\newpage
\newgeometry{left=1in,right=1in,marginparwidth=1in}
This page has the same margins as the first page.
\end{document}
答案1
’
正如@Sebastiano 所指出的,编码文本参数中有一个: get cheaper on that,’ and then
。这会让一切都变得一团糟。
一般来说,TeX 使用反引号 ` (靠近esc
)来打开引号,使用撇号'
来关闭引号(并用作撇号)。