I want to remove the spaces in the titlemark, such as "H O W", I want it show like "HOW", but I do not know how to do this?

  • Does the command \Let\String\Spacechar\Relax work?
    – Peter Yang
    Apr 16, 2022 at 17:48
  • 3
    Post a minimal working example. Without knowing your document class or other settings, I don't see how we could tell how it got like that in the first place.
    – frabjous
    Apr 16, 2022 at 18:37
  • @frabjous Ok, let me give you an example, givan any string, say "H O W", we need to remove all the space in the string, namely, we want to obtain the straing "HOW", how should we do?
    – Peter Yang
    Apr 16, 2022 at 18:53
  • {\catcode32=9\relax\catcode`\ =9\relax H O W} might work. But I'm not sure that's the right strategy because I don't understand the use case.
    – frabjous
    Apr 16, 2022 at 19:03
  • @frabjous Thank you very much Fraabjous, what is meaning of {\catcode32=9\relax\catcode`\ =9\relax } ? could you explain?and how can test it?
    – Peter Yang
    Apr 16, 2022 at 19:20

2 Answers 2


You can set the value to the \spaceskip primitive register:

H O W                         % default spaces between letters H,O,W

{\spaceskip=1em\relax H O W}  % bigger spaces between letters H,O,W

{\spaceskip=1sp\relax H O W}  % no spaces between H,O,W, kerning disabled

{\catcode`\ =9\relax H O W}   % no spaces between H,O,W, kerning enabled

Note, that value 1sp is "almost zero" but it isn't exactly zero because zero value means: use default space, no \spaceskip value. But this solution doesn't allow kerning.

If you want to have kerning activated then use the example from the last line. The spaces are completely ignored here.


I have found out a very simple way to solve this problem by writing one command


here command \yourspaceChar is defined as follows

\def\yourspaceChar{\hskip \f@size \p@}

Then use the command \newdelespace anywhere you want to remove all its space! it works, for example:

\def\yourspaceChar{\hskip \f@size \p@}

H\yourspaceChar O \yourspaceChar W

{\newdelespace H\yourspaceChar O\yourspaceChar W}

enter image description here

Not the answer you're looking for? Browse other questions tagged .