I am working on a document in LaTeX that I am copy/pasting from my original Word working file or an OCR-ed PDF file. The Word file has lots of math blocks, which are also copy/pasted, and the PDF has math symbols as well.
Occasionally upon copying I miss a stray math symbol within a paragraph. For example, the character ρ (rho) may show up in the middle of nowhere and I'll miss it since it looks like a "p." This causes an error while compiling that can be rather time consuming to find.
Is there a way to highlight these sorts of stray symbols? I am using TeXstudio when editing my .tex
files. I can't seem to find any option to do so.
For example, in the MWE below, the editor would highlight the "Δ_1 ρ" in the second line of the body. Again, I do not want it highlighted in the output PDF, just highlighted in the editor window so it is easy to find for debugging.
\documentclass[letterpage,12pt]{book}
\usepackage{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[hyphenation,parindent,lastparline]{impnattypo}
\usepackage[all]{nowidow}
\raggedbottom
\usepackage{verbatim}
\usepackage{amsmath,amsthm,amssymb}
\usepackage[frenchb]{babel}
\begin{document}
This is an inline equation that says $\Delta_1\rho = 123$. This will compile correctly.
This is an inline equation that says Δ_1 ρ = 123. This will cause an error while compiling.
\end{document}
Edit: I am not solely copy/pasting from Word, for which @AboAmmar was kind enough to point me at a Word->TeX conversion Question previously asked. His suggestion will work for the Word case, but not necessarily for other cases where this error could occur.
Δ
andρ
throughout the document, and not just the ones that occur in text mode, work for you? – Mico Jul 22 '15 at 13:44Δ
andρ
but not\delta
or\rho
), then yes. – grfrazee Jul 22 '15 at 13:45