3
我想从使用bash脚本一个LaTeX文档过滤掉脚注。它外观可能为这些例子:匹配括号多行(使用awk?)
Some text with a short footnote.\footnote{Some \textbf{explanation}.}
Some text with a longer footnote.%
\footnote{Lorem ipsum dolor
sit amet, etc. etc. etc. \emph{along \emph{multiple} lines}
but all lines increased indent from the start.}
遗骸应该是:
Some text with a short footnote.
Some text with a longer footnote.%
我不关心多余的空白。
由于匹配的括号不能使用正则表达式来完成,我相信我不能使用sed
这一点。是否有可能与awk
或一些其他的工具?