[問題] 常用字串用 new command 建立時的空白問題

看板LaTeX (論文排版)作者 (沒回應=掛站)時間11年前 (2013/11/12 02:44), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
若我想用 newcommand 為一個常用字串建立 macro,我可以用下面的方法: \newcommand{\mystr}{the original long string} 然而,實際上使用時,"the original long string" 後面不會出現空白。 因此,若我用: \mystr is inconvenient in typing. 會變成: the original long stringis inconvenient in typing. 我知道可以用 \mystr\ is inconvenient in typing 來強制空白。 然而,實際上使用時常常忘記加後面的反斜線。 有沒有辦法可以在一般的情況下讓 \mystr 的後面加空白,但若後面是句點則不加空白?謝謝! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 216.169.175.102

11/12 12:37, , 1F
\xspace
11/12 12:37, 1F
文章代碼(AID): #1IWIMR1z (LaTeX)
文章代碼(AID): #1IWIMR1z (LaTeX)