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
或一些其他的工具?