How to change the formula in Word online and then convert it back to LaTeX
Explain how to move the formulas in the Word document to the web editor for modification, and then convert them into LaTeX code. It includes judgments before taking action, operation steps, verification methods after exporting, and solutions to common problems.
Key points of this article
- First confirm whether the formula is a Word native formula or an image. Only native formulas can be edited structurally and exported to LaTeX.
- Upload the docx in the UniDoc web editor, modify the formula and choose to export it in LaTeX format, keeping the original file for comparison.
- After exporting, check superscripts and subscripts, fractions, Greek letters and formula numbers one by one. The machine conversion results need to be checked manually.
- Put the LaTeX fragment into the project and compile it locally to find problems such as missing macro packages and mismatched parentheses.
Many people search for "word formula online recognition", but what they really want to solve is often another thing: the formula has been written in Word and revised several times, and now the journal requires LaTeX source code, or they want to put a section of the formula into their own LaTeX project. Manually retyping one by one is slow and error-prone, especially formulas with upper and lower integral limits, matrices and multi-level fractions.
This article is written for people who already have Word documents and need to modify formulas online and convert the results to LaTeX. After reading, you will know how to judge whether the formula can be transferred directly, how to complete the modification and export on the web page, and what method to use to check after exporting to prevent the symbols from quietly changing.
What is discussed here is the direction from Word to LaTeX: first make changes to the formulas in the Word document, and then get the code that can be put into LaTeX.
How to modify formulas in Word online and convert them to LaTeX? One sentence conclusion
It can be done, provided that the formula is a native formula object of Word. Modifications can be made in the UniDoc web editor and then exported in LaTeX format. If the formula is just a screenshot or picture, the result of direct conversion is usually unreliable and should be re-entered according to the structure first.
| your situation | Recommended practices | reason |
|---|---|---|
| After clicking on the formula in Word, you can see the structure, and the fractions, superscripts and subscripts can be changed directly. | Upload docx to UniDoc web editor, modify it and export it to LaTeX | The original formula retains the structure and has sufficient basis for conversion. |
| The formula is a screenshot or picture pasted from elsewhere | Re-enter according to the structure in the editor, and then export | Symbols in images cannot be reliably restored to LaTeX code |
| Only one or two formulas are needed | After exporting, copy the corresponding LaTeX fragment and paste it into your own document | No need to process the entire document |
| There are dozens of formulas in the entire paper | Export as a whole, and then check the numbers and references one by one. | The overall processing reduces repeated operations, and verification cannot be saved. |
| I only have the PDF version of the paper on hand | First use the PDF editor on the desktop client to do OCR, export it to Word, and then process it according to the above method. | Formulas in PDF need to be recognized as editable content first |
Before you start: Confirm these points first
- The formula is not a native object. Click on the formula in Word. If you can see structures such as fractions, superscripts and subscripts and can edit them one by one, it is a native formula; if it can only be moved and zoomed as a whole, like a picture, it is a picture. Images cannot be directly converted to LaTeX and need to be retyped.
- Whether the file is in docx format. For files in old doc format or other sources, try to save them as docx before uploading to reduce the possibility of format loss.
- Are there any special fonts or custom symbols in the formula? Customized symbols and special fonts in Word may appear as ordinary characters after conversion, and need to be specifically checked in the export results.
- What is the target LaTeX environment. Journal templates and macro packages are different, and the same formula writing method may need to be adjusted. Before you start, check the template requirements, such as whether math fonts are specified.
- Keep original files. Modifications are made on the web page, and the original docx should not be overwritten. When problems arise, you can refer back to the original formula.
Steps to modify formulas in UniDoc web editor and export to LaTeX
- Open app.unidoc.top and upload the Word document (.docx) to be modified. Note: Use original files, not copies that have been formatted.
- Find the formula that needs to be modified and enter the editing state. Note: Native formulas will be presented as editable objects, and symbols, fractions, superscripts and subscripts can be directly changed.
- Modify the formula content one by one. Note: Only change the parts that need to be changed, such as replacing a certain variable, or filling in the missing upper limit of the sum, and keep the rest as it is.
- Check the location, numbering and text citation of the formula. Note: Confirm that there is no misalignment in the typesetting after the revision, and the numbers correspond to the references in the text.
- Select LaTeX format to export. Note: The export result is LaTeX source code, and each formula is saved in the file in the corresponding writing method.
- Open the exported LaTeX file and copy the required formula fragments. Instructions: Paste the snippet into your LaTeX project and place it in the corresponding mathematical environment, such as inline formula or independent formula environment.
- Compile once in your local LaTeX environment. Note: Compilation can find problems such as missing macro packages and mismatched brackets, which is more reliable than just looking at the source code.
After completion, check each item one by one
The results of machine conversion require manual verification, and it cannot be assumed that every symbol is flawless. You can go through the following check-up items one by one.
| Inspection items | How to see it | What should you do if there's a problem? |
|---|---|---|
| Superscripts and subscripts and subscripts | Compare with the original Word formula to check each indice, subscript, and numerator denominator one by one | Go back to the editor to modify the formula and export again |
| Greek letters and special symbols | Find the Greek letters, summation sign, integrs, and partial derivative symbols in the text, and check if LaTeX has corresponding commands | Use standard commands instead, such as \alpha, \sum, \partial |
| Parentheses and boundary marks | During compilation, check for errors and whether the left and right parentheses are paired | Complete the parentheses; the curly brackets should be written as \{ and \} |
| Formula numbering and references | Compare (1)(2) in the main text with \label and \ref in LaTeX | Correct label names to ensure consistent references |
| Custom symbols and fonts | Check if there are any special fonts or custom symbols in Word | Use standard commands instead, or add definitions in the introduction |
| The compiled layout | Open the generated PDF to see if the formula overflows or is misaligned | Adjust line breaks for long formulas and switch multi-line formulas to align environments |
🎯 Which method suits you?
- Only change one or two formulas: Just complete the changes in the web editor and copy the corresponding LaTeX clip; there's no need to export the whole article.
- To convert the formula for the entire paper: After exporting the whole paper, check each chapter and paragraph by paragraph, with numbering and cross-references placed at the end for unified checks.
- Only PDF Version of the Thesis: First, perform OCR in the PDF editor on the desktop client, export it to Word, and then follow the steps above.
❓ Frequently Asked Questions (FAQ)
1. If the formula is an image, can it be directly converted to LaTeX?
Generally, it cannot be reliably converted directly. It is recommended to re-enter the formula in the editor according to the structure, then export LaTeX and compare it item by item with the original image.
2. What should I do if the exported LaTeX compilation error occurs?
First, look at the bank number where the error occurred. Most cases involve mismatched parentheses, missing macropackages, or using unrecognized commands. Modify each item in the checklist above before recompiling.
3. Which is more suitable: changing formulas in Word or in LaTeX?
If the final draft needs to be submitted in LaTeX, it is recommended to make final modifications in the LaTeX source code; Changes in Word are suitable for quick adjustments during the writing phase. No matter which side changes, make sure both sides have the same final version.
4. Why did the font of the formula change after conversion?
LaTeX uses its own math font by default, which is different from Word's font, which is normal. If the journal template specifies a font, just follow the template settings.
📝 Summary
Whether a Word formula can be converted into LaTeX depends on whether it is a native formula object. First, confirm the type, then modify and export in the web editor, and finally use local compilation and item-by-item verification for approval. Following this sequence allows you to identify Word formulas online and obtain usable LaTeX formulas, allowing errors to be detected early.


