amsmathパッケージに依存しない oversetおよび undersetの代わりに非数学モードを作成する
Creating Non Math Mode Substitutes
解決:
実装する方法 textundersetマクロとそのコンパニオン
textoversetは、実際の必需品によって異なります。これは、アセンダントとディセンダントの間の衝突を避けながら、メインテキストとサブスクリプトを互いに整列させようとするものです。
documentclass {article} makeatletter newcommand { dynscriptsize} { [email protected] fontsize { [email protected]} { [email protected]} selectfont} makeatother newcommand textunderset [2] {% Leavevmode vtop { offinterlineskip halign {% hfil ## hfil cr%center strut#2 cr noalign { kern-.3ex} dynscriptsize strut#1 cr}%}%} newcommand textoverset [2] {% Leavevmode vbox { offinterlineskip halign {% hfil ## hfil cr%center dynscriptsize strut#1 cr noalign { kern-.3ex} strut#2 cr}%}%} begin {document} Abc textunderset {du} {axy} textunderset {ud} {axy} def bigskip Abc textoverset {du} {axy} textoverset {ud} {axy} def bigskip Abc textoverset {du} {axy} textunderset {ud} {axy} def end {document}
limitsは、数学演算子の上付き文字と下付き文字の指定に使用されるTeXプリミティブです。
数学モードを使用することもできますが、元の操作を使用して、引数をテキストモードで植字するように強制するだけです。オーバーセットとアンダーセットの定義:
documentclass {article} usepackage {amsmath}%http://ctan.org/pkg/amsmath begin {document} mbox {} phantom {Without} llap {With} verb | amsmath |:$ overset { text {x}} { text {a}}〜 quad〜 underset { text {x}} { text {a}} $ makeatletter renewcommand { overset} [2] { suremath { mathop { kern [メール保護] mbox {#2}} limits ^ { mbox { scriptsize#1}}}} renewcommand { underset} [2] { suremath { mathop { kern [メール保護] mbox {#2}} limits _ { mbox { scriptsize#1}}}} makeatother mbox {} verb | amsmath |なし|: overset {x} {a}〜 quad 〜 underset {x} {a} end {document}上記の最小限の例では、オーバーセットと underset styleは、明示的に指定する必要はありませんが、数学モードで2つの引数を設定します。さらに、数学モードのアプリケーションに興味がないため、バイナリ関係の間隔は削除されました。