Why LaTeX breaks AI detectors
Paste a .tex file into most detectors and you get a number. That number is mostly measuring your preamble.
Here is a thing you can test in about a minute. Take a paper you wrote, paste the .tex source into a detector, note the score. Then paste only the prose, no commands, no equations, no bibliography. The numbers will not match, and sometimes they are not even close.
The reason is that a large part of what you pasted the first time was not writing.
The detector is scoring your markup
A typical paper source is full of material no human reads as prose:
`` \documentclass[11pt]{article} \usepackage{amsmath,graphicx} \begin{equation}\label{eq:loss} \mathcal{L} = \frac{1}{N}\sum_{i=1}^{N} \ell(y_i, \hat{y}_i) \end{equation} \cite{smith2020,jones2019} ``
Feed that to something measuring how predictable each token is given the last few, and it will find markup extremely predictable. Command sequences repeat. Environments open and close in the same order every time. That profile is exactly what detectors associate with generated text.
Two things happen, and neither is useful:
The score inflates, because repetitive structure reads as machine-like.
The score gets diluted, because the prose you actually wanted measured is now a minority of the input.
Which parts of a detector survive it
Not all of them break equally, and the difference is instructive.
A model reading word choice and short phrases mostly shrugs. Its tokeniser takes word characters, so \begin{equation} contributes roughly nothing and quietly falls out of the representation.
A model reading raw predictability or character sequences gets hammered, because the markup is most of what it sees.
Our lexical expert is word-based partly for this reason. It is a large part of why our detector holds up on documents that are dressed differently from the text it was trained on. Not cleverness on our part, mostly a happy consequence of the tokeniser.
What to do with a .tex file
Score the prose, not the source. Abstract, introduction, discussion, and the parts of the methods that are actually sentences.
Leave out the preamble, equation environments, tables, figure environments, the bibliography, and any block that is mostly commands.
Do not score headings on their own. Too short to mean anything. Every detector is unreliable on short text.
Or compile it and use the PDF, which is closer to what a reader sees. Extraction has its own artefacts around equations and two-column layouts, but it beats scoring the preamble.
What we do about it
Our detector has a LaTeX mode. Tick it, upload the .tex, and it strips commands and maths before scoring, so the number describes your writing rather than your \usepackage lines.
Rewriting a .tex file is a different problem and we do not do it yet. To rewrite safely we would have to map new text back to exact positions in the source, and getting that wrong damages a paper rather than improving it. So we refuse and say why, instead of flattening your document and handing back something that no longer compiles.
Upload a .tex file and it will score the prose inside it. Free, no account.
The general version of this
A detector's output only means something on the kind of input its error rate was measured on. A tool measured on student essays has no established error rate on marked-up source, so the number it gives you there has no known reliability. It is not wrong exactly. It is unmeasured.
Same applies to markdown, HTML, and anything heavily formatted. Detectors track markup density as a feature precisely because it changes what every other signal means.