0

The following two lines give me different results with respect to spacing:

\noindent\makebox[\parindent]{?} Blabla

\noindent\makebox[\parindent]{?}Blabla

The second case is what I want: no space is added between the end of the box and the next letter. However, this piece of code is part of a customized command of mine (to give a simplified example: \newcommand{\myBox}{\noindent\makebox[\parindent]{?}}) and I cannot seem to avoid this extra space after using my customized command.

Does anyone have a solution to this problem?

Thanks in advance!

AYK
  • 285
  • 2
    Please provide a full usage example demonstrating your issue. For example, there is a syntax error in \newcommand{myBox}{...} as myBox is not a macro name. – Steven B. Segletes Jan 27 '19 at 23:12
  • Copy and past the two lines in a latex file, that should be it! (I corrected myBox into \myBox, thanks.) – AYK Jan 27 '19 at 23:23
  • 2
    The 2 lines of code are not the macro. Your problem is with a macro. So, please provide code beginning with \documentclass and ending with \end{documemt} in which you define your macro and use it in a way that shows the problem. – Steven B. Segletes Jan 27 '19 at 23:28
  • There must be something else: I have no problem with your simplified macro. – Bernard Jan 27 '19 at 23:40
  • If \myBox is defined like that, then \myBox Blabla will be equivalent to the second construction at the top of your question. – egreg Jan 28 '19 at 00:14
  • Sorry guys, you are right. I have found the problem in the end: it was a missing '%' after the \makebox[]{} command. I was not aware of the importance of the % symbol... – AYK Jan 28 '19 at 00:52

0 Answers0