text editor winedt - joaomlourenco/novathesis GitHub Wiki

WinEdt (v11/12)

WinEdt is a powerful, highly customizable Windows-native editor. To get the most out of it, we shift from the old "TeXify" method to the modern Latexmk workflow, which handles all the intermediate steps (like BibTeX and indexing) in a single pass.

Requirements

  • LaTeX Distribution: MiKTeX is the traditional partner for WinEdt, though TeX Live is fully supported.
  • Perl: Required for latexmk. Install Strawberry Perl if you don't have it.
  • SumatraPDF (Recommended): While WinEdt has a built-in viewer, SumatraPDF is superior for "Inverse Search" (double-clicking the PDF to return to the code).

Configuring Latexmk

WinEdt usually includes a "Latexmk" button by default, but we need to ensure it's the primary engine.

  1. Open Options > Execution Modes.
  2. On the Console Applications tab, find Latexmk in the list.
  3. Check the Path: Ensure the "Executable" points to latexmk.exe. WinEdt usually finds this automatically if your TeX distribution is in the system PATH.
  4. Set as Default: Go to the Diagnosis tab and click "Refreshed" to ensure WinEdt sees your Perl and TeX installations.
  5. Switches: Under the Latexmk command, ensure the switches include -pdf and -synctex=1.

Usage

1. One-Click Compile

Instead of clicking "LaTeX," "BibTeX," and "LaTeX" again, look for the Latexmk icon (often a "recycle" or "gears" icon) on the toolbar or press the shortcut (typically defined in your setup, or accessible via the TeX menu).

2. Project Management (Master Files)

For large projects:

  • Right-click your main file tab and select "Set as Main File." * A small "L" (for Local) or "G" (for Global) will appear. Now, no matter which chapter file you are editing, hitting Compile will always run latexmk on your main file.

3. Forward & Inverse Search

  • Forward: Press the PDF Search button in WinEdt to jump to the current line in the PDF.
  • Inverse: In SumatraPDF, double-click any text to jump back to the exact line in WinEdt.

Pro Features

Feature How to Use
The Tree View Click the Tree tab on the left. It provides a clickable map of your sections, labels, and citations.
Error Handling If a build fails, WinEdt opens the .log file at the bottom. Click an error line to jump directly to the mistake in your code.
Gather Press Ctrl + G to open the "Gather" interface—this allows you to search for citations and labels across your entire project instantly.

Spell Check & Dictionaries

WinEdt has an excellent built-in spell checker that is "LaTeX-aware."

  • Auto-check: It should be enabled by default. Misspelled words are underlined in red.
  • Dictionary Manager: Go to Options > Dictionary Manager. You can download and install Unicode dictionaries for almost any language.
  • Right-Click: Right-clicking a red-underlined word gives you suggestions and the option to "Add to Dictionary."

Tip for MiKTeX Users: If latexmk hangs, it’s often because MiKTeX is trying to show a "Install Missing Package" popup in the background. Open the MiKTeX Console and set "Task -> Install missing packages" to "Always" to avoid these interruptions during a WinEdt build.