TransWikia.com

Is there a command which is completely ignored by LaTeX?

TeX - LaTeX Asked on March 26, 2021

I’m using TeXiFy IDEA and it has autoformatting feature. However, in some cases I would like to preserve my own formatting. E.g.

Very
    long
    sentence.

after formatting becomes

Very
long
sentence.

, which I would like to avoid.

One solution (hack) I have in mind is to insert some character in the beginning of indented lines, e.g.:

Very
   long
   sentence.

However, it inserts an extra space in the resulting text. Similarly, {} has the same effect. Is there a character/command which is completely ignored by LaTeX, without affecting output in any way?

If there are cleaner solutions for the original problem, they are much appreciated. If there exists an option to achieve this in settings, I didn’t find it.

2 Answers

If you really want to do this, you could use relax, as long as it is normal text not verbatim and other special modes.

Correct answer by David Carlisle on March 26, 2021

If you want TeXiFy to stay away from a specific part of your tex file when formatting, you can enclose it with formatter comments (don't forget to enable them in the settings):

% @formatter:off
Very
   long
   sentence
% @formatter:on

Answered by Abby on March 26, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP