1

I have a weird bug in my text editor that causes it to incorrectly indent any lines that start with special characters, such as greek letters.

 % My editor will indent the leading spaces in this line incorrectly.
     Γ ⊢ ...

One workaround I found was to add a {} at the start of the line. My editor indents things correctly if the first character in the line is an ASCII character and adding a {} doesn't change any formatting

 % My workaround
     {} Γ ⊢ ...

Is there a less noisy alternative to the {}? I tried ~ and \ but both of add an extra space that modifies the formatting of the generated document.

  • 8
    It seems like a problem with the visual display of indentation would better be solved through the editor (or by changing editors) than by adding TeX commands that have no typesetting function. – musarithmia Jul 25 '15 at 1:26
  • 6
    Your use of {} here might in fact add extra space... – Werner Jul 25 '15 at 1:28
  • @Werner: Why? I couldn't notice any changes in the resulting pdf once I added the {} – hugomg Jul 25 '15 at 1:47
  • You can use \relax instead of {}. – Andrew Jul 25 '15 at 3:17
  • 3
    The question is not very clear but certainly {} does not expand to nothing and typically will affect spacing. Compare one two and one {} two – David Carlisle Jul 25 '15 at 10:08
5

The question is not very clear but certainly {} does not expand to nothing and typically will affect spacing.

Compare

one two and one {} two

Plain TeX and LaTeX do have a command \empty defined (effectively) as

\def\empty{}

which does expand to nothing so you could use \empty, but it would seem better to fix the configuration in the editor rather than add weird stuff to the TeX file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.