
ドキュメントの先頭に、最終論文には必要のない (ただし、トピックを再検討する必要がある場合は便利な) 説明メモや作業行をすべてシームレスに含めたり除外したりするコマンドまたはスイッチを定義したいと思います。これは、数式環境内のテキストと行の両方で機能するはずです (理想的にはキャプションや、概念を拡張したいその他の場所でも)。1 つのコマンドでこれを実現できない場合は、さまざまな数式環境 (multline、split、eqnarray) を具体的に処理する新しいコマンドを定義することもできます。
環境を変更する前にコマンドを閉じる必要があるという考えには同意しますが、もちろん、テキストから数式へ、またはその逆へコマンドが存続する方が使いやすくなります。
ジャーナルのテンプレートがこれらのコマンドを再定義/排除しているため、\comment または \note は使用できません。
(に従って色付きテキストと非表示テキストの両方を制御する 1 つのコマンド)、 これ:
% define an environment for verbose notes
\newcommand{\verbose}[1]{\textcolor{blue}{#1}}
% and then when it’s time for the paper, you replace this with
%\newcommand{\verbose}[1]{}
&
一般的なテキストでは問題なく動作しますが、配置を越えて使用したり、\\
分割された環境で使用すると、正しくコンパイルされません。
コマンドを に変更すると\newcommand{\verbose}[1]{\textcolor{blue}{#1}\\}
(および\verbose{...}\\
に変更すると\verbose...}
)、中間の数式行が非表示の場合に余分な改行が回避されますが、コメントの後に続くテキスト段落の流れが中断され\verbose{...}
、配置マークをまたぐ問題が依然として残ります&
。
M(N)WE
\documentclass{report}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{color}
% define an environment for verbose notes
%\newcommand{\verbose}[1]{\textcolor{blue}{#1}}
% and then when it’s time for the paper, you replace this with
\newcommand{\verbose}[1]{}
\begin{document}
Lorem ipsum... \verbose{LOREM IPSUM.} This text should follow on in the same paragraph.
\begin{equation}
\begin{split}
a&=b\\
b&=c\\
\therefore a&=c\\
&\verbose{by~some~logic}\\
c&=d\\
&\verbose{=d}
\end{split}
\end{equation}
continuing text; also
\begin{equation}
\begin{split}
a&=b\\
\verbose{c&=d}\\
e&=f
\end{split}
\end{equation}
final text; note the vertical separation above this compared to previous text.
\end{document}