
我該怎麼做呢?使用\@ifnextchar^{command1}{command2}
失敗。我應該做什麼來檢測 ^?
更新。事實證明該命令沒有問題,只是我的巨集定義中其他地方的名稱衝突。感謝您的快速反應!
答案1
答案2
以下乳膠檔案產生的終端輸出為
yes
no
顯示\@ifnextchar
已測試 true^
和 false!
\makeatletter
\@ifnextchar^{\typeout{yes}\@gobble}{\typeout{no}\@gobble}^
\@ifnextchar^{\typeout{yes}\@gobble}{\typeout{no}\@gobble}!
\stop