別ファイルの相互参照でページごとの行番号を表示する
http://oku.edu.mie-u.ac.jp/tex/mod/forum/discuss.php?d=138
と
lineno and amsmath compatibilityのupdate2
http://phaseportrait.blogspot.com/2007/08/lineno-and-amsmath-compatibility.html
を使って、数式の別ファイルの相互参照を使用としたのですけれど、align環境やgather環境で
最後の行が2重カウントされてしまいます。
また、theoremパッケージの\theoremstyle{break}を使うとそのtheorem環境の1行目がカウント
されません。
どなたか解決策をご存じないですか?