latex - Spacing issues with xspace -


let's macro \newcommand{\k}{king\xspace}. spacings in "... said \k." fine. do if want no spacing in middle of \k\k.? want "kingking." not "king king."

is there way this?

the whole point of \xspace add space between words , not add space before punctuation. so, if don't want spaces between 2 uses of macro don't use \xspace. but, of course require you use {} @ end:

\documentclass{article} \newcommand{\k}{king}%  \begin{document} @ end of sentence \k.\par in between \k\k{} want 1 long word. \end{document} 

Comments

Popular posts from this blog

mysql - How to insert just year and month into date field? -

c# - Detect changes in ObjectSet in Entity Framework 4.0? -