How to open .TEX files (LaTeX documents) on Android, Windows and Linux
What a .tex file is and how to open and edit LaTeX source plus .bib, .sty and .cls files for free on Android, Windows and Linux, and how to turn it into a PDF.

A co-author sends paper.tex, a journal asks you to use its template, or you download the source of a paper from arXiv. You expected a document with headings and equations. What you get, if anything opens at all, is a page full of backslashes and curly brackets.
That’s because a .tex file is the source of a document, not the finished document. It’s plain text, so you can open, read and edit it anywhere, and Folders does that in its text editor on Android, Windows and Linux. To see the typeset pages, the file has to be compiled into a PDF, which is a separate step.
What is a .tex file?
TeX is a typesetting system created by Donald Knuth. LaTeX, written by Leslie Lamport, is the set of commands built on top of it that almost everyone uses today. A .tex file mixes your text with those commands: \documentclass{article} at the top, \section{Results} for a heading, \begin{equation} ... \end{equation} for maths, \cite{smith2020} for a reference. A program such as pdfLaTeX, XeLaTeX or LuaLaTeX reads the file and produces a PDF with proper typography. It’s the standard way to write in mathematics, physics and computer science, and common for theses, CVs and books.
A LaTeX project is rarely a single file:
| Extension | What it is | Where you meet it |
|---|---|---|
.tex |
LaTeX source: your text plus commands | Papers, theses, reports, CVs, arXiv sources |
.bib |
A BibTeX bibliography: one entry per source, like @article{smith2020, author = {...}, title = {...}, year = {2020}} |
Next to the .tex; exported from Zotero, JabRef, Google Scholar or a journal’s site |
.sty |
A package: extra commands, loaded with \usepackage{...} |
Journal and university templates |
.cls |
A document class: the overall layout, loaded with \documentclass{...} |
Templates from journals, conferences and universities |
Compiling leaves helper files behind (.aux, .toc, .bbl, .out) plus a .log with the full record of the run; they come back if you delete them. Visual Basic also uses .cls, for class modules, which are text too and open the same way.
How to open a .tex file with Folders
On Android:
- Install Folders from the download page and allow file access.
- Find the .tex file, or search for it by name.
- Tap it to open it in the text editor.
- From an email or a chat app, use Open with → Folders.
Sources often arrive packed. An arXiv source download is usually a .tar.gz archive, and Overleaf’s Download → Source gives you a ZIP. Folders opens both: tap the archive, then tap main.tex (or whatever the main file is called) inside it, or use Extract all to keep the whole project.
On Windows and Linux:
- Browse to the project in Folders.
- Double-click the .tex, .bib, .sty or .cls file.
- On Windows, the installer puts Folders in File Explorer’s Open with menu for these types: right-click → Open with → Folders.
What you can do with it in Folders
- Read the source with line numbers. Folders shows LaTeX as plain text, without colouring commands. LaTeX paragraphs are often single long lines, so turn on word wrap.
- Find a label, a citation key or a command, and Find and replace (with Match case) to change a term throughout.
- Go to line. LaTeX errors point at a line, shown as
l.142. Open the.login another tab, search for!(errors begin that way, as in! Undefined control sequence.), then go to that line in the .tex. - Check a .bib file: fix a misspelled author, add a missing year, or find two entries with the same key.
- Edit and Save, with undo and redo. Document info shows the encoding; recent LaTeX versions expect UTF-8.
- Open the PDF next to it, if there is one, in Folders’ PDF viewer.
Folders doesn’t compile LaTeX or preview the result. It’s for reading a source, fixing a typo or checking a reference.
Other ways to open .tex files
- Overleaf compiles and previews LaTeX in the browser, phones included, and has a free plan.
- TeX Live (Linux and Windows) or MiKTeX (Windows), with an editor such as TeXstudio or TeXworks, compile on your own computer.
- VS Code with the LaTeX Workshop extension edits, compiles and previews.
- Zotero or JabRef manage .bib files as a proper reference library.
Problems opening a .tex file?
- You only see code, but you wanted the paper. Compile it, or simply ask the sender for the PDF as well.
- **Compiling says “File
xyz.sty' not found".** A package is missing. Install it with your TeX distribution's package manager (tlmgr` in TeX Live, the MiKTeX console on Windows), or put the journal’s .sty and .cls files in the same folder as the .tex. - Citations come out as [?]. The bibliography hasn’t been processed. Run BibTeX or Biber, then LaTeX twice more. Overleaf and most editors do this for you.
- Accented letters look wrong. An old file may use a Western European encoding instead of UTF-8. Document info tells you which; saving keeps it, unless you add characters it can’t hold, when Folders offers to save as UTF-8.
Questions people ask
How do I convert a .tex file to PDF? Compile it with pdfLaTeX, XeLaTeX or LuaLaTeX, on Overleaf or with TeX Live or MiKTeX. Folders reads and edits the source but doesn’t compile it.
Can I open a .tex file in Word? Not directly. Pandoc can convert simple LaTeX to .docx, although complex macros and maths may need tidying afterwards. Folders then opens the result in its Word document viewer.
What is a .bib file and how do I open it? It’s the bibliography database for a LaTeX document, in plain text. Open it in Folders or any text editor to read or fix entries, or import it into Zotero or JabRef.
Can I edit LaTeX on Android? Yes. For quick fixes, open the .tex in Folders, edit and save. To compile and see the result, use Overleaf in your phone’s browser.
More on document sources: how to open RST, AsciiDoc and Org files and Markdown and code files, plus all 382 file types Folders opens.
Keep reading
How to open .C files (C and C++ source code) on Android, Windows and Linux
What .c, .h and .cpp files are and how to open, read and edit C, C++ and Objective-C source code for free on Android, Windows and Linux, with no IDE needed.
How to open .CS files (C# source code) on Android, Windows and Linux
What .cs, .csproj, .sln, .vcxproj and .xaml files are and how to open and edit C# code and Visual Studio projects for free on Android, Windows and Linux.
How to open .CSS files (style sheets) on Android, Windows and Linux
What CSS, SCSS, Sass and Less files are and how to open, read and edit style sheets for free on Android, Windows and Linux, with colours, search and replace.



