How to open .TEX files on Mac

To open .TEX files on Mac, to view or edit: Control-click the .tex file → Open With → choose a text editor (it is plain text).

Step-by-step instructions

  1. To view or edit: Control-click the .tex file → Open With → choose a text editor (it is plain text).
  2. To typeset/compile: Use a TeX distribution and run TeX on the .tex source to generate the formatted result.
  3. If you need a quick read-only look: Open it in any text viewer to inspect the source (you will still need TeX to produce final typeset output).

Common issues

Double-clicking opens a blank page or the wrong program

.tex is plain text; if your system associates it with an unsuitable app, it may appear blank or open in a viewer that does not display text properly.

  1. Use “Open with” and choose a plain text editor.
  2. Change the default app association for .tex to a text editor.
  3. If you expected a formatted document, compile the .tex source with a TeX distribution instead of trying to “open” it like a PDF.

TeX cannot find the input file when compiling

TeX often appends “.tex” if you omit the extension; compilation can fail if you run it from the wrong directory or the file name/path is incorrect.

  1. Run the compile command from the folder that contains the .tex file, or provide the full path.
  2. Verify the file name exactly matches (including case on case-sensitive systems).
  3. If you omitted the extension, try specifying the full filename including .tex.

Output is missing content because referenced files are not included

.tex sources often reference additional files (for example, other input files). If those files are not present, compilation may fail or produce incomplete output.

  1. Ensure any referenced companion files are in the expected folders alongside the .tex file.
  2. If you received the file by email or download, ask the sender for the complete project folder rather than only a single .tex file.

Web server or email labels the file with an unexpected MIME type

Many systems use non-IANA “x-” MIME types or local mappings (for example via /etc/mime.types or shared-mime-info). This can affect downloads, previews, and default apps.

  1. If you administer the system, check its MIME mappings (for example /etc/mime.types) and desktop MIME database behavior.
  2. Treat the file as plain text for viewing/editing, regardless of how it is labeled.

Security note

.tex files are plain text, but compiling them invokes a TeX engine that parses and processes commands; only compile TeX sources you trust.

Back to .TEX extension page