我想对一行添加更正,就像人们在翻阅纸质版时发现遗漏了一个单词时会写的那样。我手写了下面我想要的内容:
原线路应保持不变。
我猜想有一个简单的方法可以做到这一点(例如某些包),但我不知道该怎么做,而且我不确定要搜索什么。 (我也不确定如何标记这个问题。)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Output $(I_1) = D$
\end{document}
答案1
根据我上述评论,这是一个非常简单的解决方案。如果这些省略的单词等变成了整个子句和句子,那么您可能需要一个更强大的解决方案。事实上,我们会小心谨慎,以免影响段落的现有布局。
\documentclass{article}
\usepackage{amsmath}
\newcommand\correction[1]{%
\unskip
\begingroup \tiny
\makebox[0pt][c]{\raisebox{1\baselineskip}[0pt]{\bfseries [#1]}}%
\makebox[0pt][l]{\raisebox{-0.5\baselineskip}[0pt]{$\wedge$}}%
\endgroup
}
\begin{document}
Output \correction{from}
$(I_1) = D$
Output $(I_1) = D$ I want to add a correction to a line, as one would
write if they were going through a hard-copy of a paper and found that a
word
\correction{was}
omitted. I've drawn by hand specifically what I'm after below:
Output $(I_1) = D$ I want to add a correction to a line, as one would
write if they were going through a hard-copy of a paper and found that a
word omitted. I've drawn by hand specifically what I'm after below:
Output \correction{from}
$(I_1) = D$
\end{document}
答案2
我的方法是使用彩色标记以提高可读性。我认为在草稿版本中没有必要保留行间距,因此标记足够高,可以避免更正与文本的上升字符重叠(无论如何,如果也需要,缩短标记相当简单)。
\documentclass{article}
\usepackage{amsmath,xcolor}
\fboxsep.6pt
\def\Add#1{\rlap{\hskip-.15em\color{blue!70}\vrule\raisebox%
{.7\baselineskip}{\fcolorbox{blue!10}{blue!05}{\tiny#1}}}\ignorespaces}
\begin{document}
Put a litle \Add{flag} whenever \Add{you} need.\par
Output \Add{from} $(I_1) = D$
\end{document}