How to Fix the LaTeX “Not allowed in LR mode” Error When Highlighting Revisions

If you highlight changes in a LaTeX manuscript using commands such as \change{...}, \rev{...}, or \hl{...}, you may eventually run into this error:

LaTeX Error: Not allowed in LR mode.

This often confuses authors, especially during journal revisions. Fortunately, the cause is simple: you placed a command inside the highlight block that LaTeX does not allow in LR mode.


🔍 Why This Error Happens

Highlight macros like \change{} put LaTeX into a restricted text-only mode called LR mode. Inside LR mode, LaTeX only accepts basic text.

The following commands cannot appear inside a highlight block:

  • Section commands: \section, \subsection, \subsubsection
  • Figures and tables
  • List environments (itemize, enumerate)
  • Math environments (equation, align)
  • Captions and labels (\caption, \label)
  • Any \begin{...} / \end{...} environment

If even one of these appears inside \change{...}, LaTeX stops and produces the LR‑mode error.


❌ Example That Causes the Error

\change{
\section{New Section Title}
Here is the updated text.
}

The section command is structural, so LaTeX cannot process it inside the highlight block.


✅ Correct Fix

Move the structural command outside the highlight, and keep only normal text inside:

New Section Title

\change{
Here is the revised paragraph text that should be highlighted.
}

This compiles with zero errors because:

  • the heading is processed normally
  • the highlight block contains only plain text

🧠 What You Can Safely Put Inside a Highlight Block

  • Normal sentences
  • Paragraphs
  • Inline math ($x+y$)
  • Emphasis (\textbf{}, \emph{})
  • Citations (\cite{})

🚫 What You Should Never Put Inside

  • Section titles
  • Figures, tables, or captions
  • Math environments
  • Any begin/end environment
  • Labels or references

🎯 Final Tip

Highlight only the text that changed, and always keep structural LaTeX commands outside the highlight block. This prevents LR‑mode errors and keeps your revised manuscript clean and professional.

If you’d like a post on how to highlight revisions for IEEE journals or how to structure revision submissions, feel free to ask!

Comments

Popular posts from this blog

From DSRC to 5G NR-V2X: The Road Ahead for Connected Vehicles

CTE 125 - COMPUTER WORKSHOP PRACTICE: WEEK ONE

CTE 311: ENGINEER IN SOCIETY: CURRICULUM (20/21 SESSION)