I'm working on a latex document


% to use the tag
% \usepackage{catchfilebetweentags}
% \ExecuteMetaData[file.tex]{tag}



  \question What is the first sentence of \emph{Moby Dick}?
    \emph{Call me Ishmael.}




As the document grows, I find myself often issuing C-x h TAB to fix my formatting.

The problem is that this key sequence takes the two strings


and places a space after the % character:

% <*afterclass>
% </afterclass>

This causes problems in another script. Is it possible to "protect" these two lines from this formatting?


The simple way is to set comment-padding to 0 in a buffer-local variable. However, that has the effect of removing spaces after the percent sign on every comment line. If that is problematic, you may have to patch (or better: advice) the function LaTeX-indent-line.

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.