When translating a paper, the $ and symbols in LaTeX formulas must not be changed.
Explain clearly the meaning of $ in LaTeX, and which formulas, references and comments are easily changed when translating the source code of the paper. The operation steps for OmniDoc translation of LaTeX source code packages are given, along with the checking methods for compilation and verification.
Key points of this article
- The $ in LaTeX is the delimiter in math mode, appearing in pairs, and the content in the middle is formatted according to formulas, not ordinary text.
- What should be protected during translation are formulas, commands such as \cite and \ref, comments and escape symbols, and only the text sentences should be translated.
- It is easy to lose the formula structure when directly translating PDF. Priority is given to providing .tex source code package so that the formulas can be retained in source code form.
- After the translation is retrieved, it must be recompiled and page by page checked to see if the formula numbers, reference numbers and symbols are consistent with the original text.
If you have a paper written in LaTeX and want to translate the text into Chinese or other languages, the common problem is not mistranslation of sentences, but broken formulas: one $ sign is missing, \alpha becomes "alpha", and the chart numbers and references do not match. Readers who search "What does $ mean in latex" usually encounter this kind of problem. They need to first understand the role of $ before they know what to protect during translation.
This article is written for readers who need to translate LaTeX papers, dissertations or technical reports, and is also suitable for people who want to change the source code of the translated text. After reading, you will be able to distinguish which content must be kept intact, know how to use OmniDoc to translate the LaTeX source code package, and be able to use the compilation results to check whether the translation has changed the formulas.
What does $ in LaTeX mean? How to protect? One sentence conclusion
$ is the mathematical mode delimiter of LaTeX, which appears in pairs, and the content in the middle is typeset according to mathematical formulas; when translating, these delimiters and formula content should be retained in the entire paragraph, and only the natural language outside the formulas should be translated.
| your situation | Recommended practices | reason |
|---|---|---|
| I just want to understand the paper, no need to change the source code | Upload the source code package and select bilingual output | The original formula and the translation are side by side for easy comparison and reading. |
| To contribute or submit the Chinese version source code | Upload the .tex source code package, select only the translation output, and then compile and check | The translation needs to be able to be recompiled, and the formulas must remain in source code form. |
| I only have PDF, no source code | First confirm whether text can be selected in the PDF, and then decide on the translation method | Without source code, the formula structure is difficult to retain completely and requires manual review. |
| There are a large number of custom macros in the paper | First check whether the macro definition is completely preserved before translating | If the macro name is changed, an error or exception will be reported during compilation. |
| Need to revise the layout or formula of the translation | After downloading the results continue processing in the UniDoc web editor (app.unidoc.top) | Web editor supports LaTeX round-trip editing |
In LaTeX, $ has two common uses. Inline formula is written as $E=mc^2$, with the formula embedded in the middle of the sentence. Interline formula is often written as $$...$$, or the equation environment is used, and the formula occupies a separate line. In addition, \(...\) and \[...\] are also separation methods for mathematical modes. If you want to express the dollar sign in text, you need to write it as \$. If you write $ directly, it will be regarded as the starting symbol of the formula.
Before you start: Confirm these points first
Before you start, first determine the following things, which determine whether the translation can be compiled normally.
- Confirm whether the source file is .tex source code. LaTeX’s $, \cite, and \ref are all text in the source code. If you only have PDF, the formula has been formatted into graphics or characters, and the original $ structure no longer exists, and the goal of translation becomes "preserving the layout" rather than "preserving the source code".
- Distinguish which are formulas and which are text. Text sentences can be translated, but commands such as variable names, superscripts and subscripts, and \mathbf{} in $...$ cannot be moved. For example, if you change x in $x_i$ to another letter, the meaning of the entire formula will change.
- Check references and tags. The key names in \cite{key}, \ref{eq:loss}, \label{...} should remain as they are in English. When key names are translated, references and cross-references become invalid.
- Pay attention to the comment lines and escape symbols. Lines starting with % are comments and do not participate in typesetting, but sometimes contain important instructions. \% and \$ are escape expressions, changing them to % or $ will destroy the compilation.
- Reserve the compilation environment. After the translation is retrieved, it needs to be recompiled to check whether the page number, formula number and references are normal. When there is no local compilation environment, you must at least open and check the output file content.
Steps to translate LaTeX source code packages in OmniDoc
- Organize the source code package. Put all .tex files, images, and Place the bib reference file and custom macro file in the same folder, package them into a compressed package, and ensure the main file can be found.
- Open the omnidoc.top. Find the document translation portal on the webpage, which supports LaTeX source package format. If there are many files or you need to handle them frequently, you can also use the desktop client (download.omnidoc.top).
- Upload the source code package. Select your LaTeX source code package and confirm that the file type is recognized as LaTeX, not plain text.
- Choose the scope and style of the translation. If the paper is academic, choose the appropriate academic style to ensure consistency in terminology throughout the text.
- Choose the output method. If you want to read by comparison, choose bilingual reading; If you want to submit or continue editing, select Translation only.
- Start translating and wait for it to finish. After translation is complete, the page will provide the result file; download it as prompted.
- Extract and check the structure. Make sure the $, \cite, \ref, \label, and image paths in the translation source code are still present, and the file structure is basically consistent with the original package.
- Compile and translate texts using LaTeX. Recompile the translation source code locally to generate PDF. If the compilation fails, return to the corresponding .tex file based on the error location to modify it.
After completion, check each item one by one
After receiving the translation, do not submit it immediately. The table below lists the checklists that are prone to problems.
| Inspection items | How to see it | What should you do if there's a problem? |
|---|---|---|
| Inline formulas and interline formulas | Search for $ and $$ in the translation; the quantity should match the original text | Missing or extra separators should be supplemented or removed according to the original text |
| Official Content | Compare each key formula to see if the variables, subscripts, and Greek letters remain unchanged | The content within the formula should be restored to the original text, retaining only the full translation |
| Quotes and tags | Check whether the keys \cite, \ref, and \label are in their original English format | Change the translated part of the key name back to the original text and recompile it |
| Numbers and page numbers | Compare formula numbers, chart numbers, and total page counts | Misalignment of numbers usually occurs when an environment is destroyed, and you look back at nearby \begin and \end |
| Escape symbols and annotations | Check the comment lines starting with \$, \% and %. | Revert to the original text style to avoid annotations being treated as the main text |
| References | After compilation, check whether the references are fully displayed at the end of the text | Check whether the .bib file is provided with the package and whether the keynames match |
Both machine translation and OCR may contain errors; important content, such as theorem statements, experimental parameters, and formula derivations, must be checked verbatim against the original text.
🎯 Which method suits you?
If you want to understand the paper, you can directly output in a bilingual comparison for convenience. You can compare the formula and the original text side by side, and if you have questions, then review the original text. If you want to use the translation for submission, defense, or subsequent modifications, you must output it as a translation only and recompile it locally. If your source code package structure is complex and has many macro definitions, it is recommended to first use a small number of chapters for trial translation, and only process the entire article after confirming the compilation passes.
❓ Frequently Asked Questions (FAQ)
1. What does $ mean in Latex? Why can't you just change it when translating?
$ is the delimiter for mathematical patterns, appearing in pairs, with the content in between formatted according to the formula. If you modify or delete $ as a regular symbol during translation, the compilation error will occur or the formula may disappear immediately.
2. If you only have PDF and no LaTeX source code, can you still preserve the formula?
It can be translated, but the formula structure is usually not as complete as the source code can be preserved. Formulas in PDFs mostly exist as formatted characters or graphics. It is recommended to check each formula individually against the original text, and key formulas should be manually verified.
3. What is the difference between Latex Mathematical Symbol Translator and directly translating entire papers?
Translating only formula symbols alone cannot solve the translation problem because the main text, citations, and numbering must be consistent. During the entire translation, OmniDoc retains formulas as structure in the translation; what you need to do is check whether these formulas are intact.
4. Where should you start investigating translation errors?
First, check the .tex file and line number the error message points to. Usually, a formula environment lacks the corresponding $ or \end, or the \cite key name has been changed. Find the original text's corresponding location, modify it accordingly, and recompile.
5. Should the text in formulas, such as variable descriptions, be translated?
Symbols and commands inside formulas are not translated, but the explanatory text below or above the formula belongs to the main text and can be translated. For example, sentences like "where x represents the sample" should be translated into Chinese, while the x in the formula remains unchanged.
📝 Summary
When translating LaTeX papers, the $, formula content, citation keys, and escape symbols must be preserved as they are, and only the main sentence is translated. Hand the source code package over to OmniDoc, choose the output method, retrieve the translation, recompile it with LaTeX, and check the formulas and numbers item by item to minimize the risk of being altered.
Open OmniDoc to edit, convert, or translate your LaTeX documents


