LyX is a document processor that acts as a graphical front end to LaTeX. Its design philosophy is WYSIWYM — “What You See Is What You Mean.” You edit a near-final visual view of the page while, underneath, LyX assembles LaTeX for you. It is a tool for people who want LaTeX’s output without writing the markup by hand. This page covers the WYSIWYM idea, how a .lyx document is exported to LaTeX or PDF, and — honestly — where it helps and where it gets in the way.
What LyX is
LyX is a free, open-source (GPL) document processor that the computer scientist Matthias Ettrich began building in 1995. It runs on Windows, macOS, and Linux; as of 2026 the current line is the 2.5 series. It supports many languages, including Japanese, and even right-to-left scripts such as Arabic and Hebrew. Its tagline: it is “for people who want their writing to look great, right out of the box.”
To place it precisely: LyX is not a LaTeX editor so much as a front end that drives LaTeX behind the scenes. It does no typesetting itself — it hands that off to a TeX distribution (TeX Live, MiKTeX, MacTeX, and so on). For that reason LyX does not bundle TeX; it calls a distribution you install separately. The installer detects something like TeX Live on your system, and if it finds none it warns that without LaTeX it cannot produce output. So the order is the TeX distribution first, LyX second.
Especially well regarded is its equation editor, which lets you build formulas by pointing, clicking, and typing. It keeps the quality of LaTeX’s math typesetting while letting you choose symbols from menus and palettes. LyX suits structured documents — technical documentation, doctoral theses, conference proceedings.
The WYSIWYM idea
WYSIWYM stands for “What You See Is What You Mean” — a play on the WYSIWYG (“What You See Is What You Get”) familiar from word processors. LyX was the first document processor to advertise WYSIWYM. The heart of the difference is that you specify the meaning (the role) of a thing, not its appearance directly. This “structure over appearance” stance is the very core of LaTeX, covered in depth on the page about [separating structure from appearance](/learn/getting-started/what-is).
Concretely, you mark a paragraph by its role — “section heading,” “footnote,” “theorem” — and leave the font size and the space around it to LyX (really, to LaTeX and its class file). For an equation, you place structures — a fraction, a matrix, a summation — in the built-in math editor. So hitting the space bar repeatedly does not widen the gaps; spacing is decided automatically from meaning. In effect it brings the mindset of writing raw LaTeX, but keeps a visual rendering of the page in front of you.
It sits squarely between a WYSIWYG word processor and raw LaTeX. In WYSIWYG you manipulate the look directly — “12pt, bold, centered.” In raw LaTeX you hand-write the markup — \section{...}. LyX avoids both: you assign the role visually and let the markup be generated.
| What you manipulate | On-screen look | |
|---|---|---|
WYSIWYG(ワープロ) | Appearance directly (fonts, indents) | Close to final |
LyX(WYSIWYM) | Meaning / role (headings, math structure) | A near-final approximation |
生の LaTeX | Hand-written commands (markup) | Unseen until you compile |
LaTeX export and TeX code
The document LyX saves is not a .tex file but its own **.lyx** format (LyX’s own text format, not raw LaTeX). To produce output, it converts that .lyx into LaTeX behind the scenes and then typesets it. You can choose the engine — LaTeX (via DVI), pdfLaTeX, XeTeX, or LuaTeX — and either get a PDF directly or export the .tex. It can also export to XHTML, DocBook, EPUB, and plain text.
To see a PDF, use File ▸ Export ▸ PDF (or “View document”); to get the LaTeX source, File ▸ Export ▸ LaTeX writes out the .tex. For those at home in raw LaTeX, LyX makes a point of “LaTeX transparency” — you can inspect the LaTeX it emits, and you can finish the exported .tex in another editor.
When you need something LyX has no UI for, you can embed raw LaTeX directly. The region inserted via Insert ▸ TeX Code is also called ERT (for “Evil Red Text,” after the red it is shown in), and whatever you write there passes through as LaTeX. Custom package commands, or fine adjustments with no matching menu entry, are conventionally handled through this TeX code.
\setlength{\parindent}{0pt}
\textcolor{red}{\rule{\linewidth}{0.4pt}}The reverse — **importing an existing .tex into LyX** — is possible but limited. The conversion uses a tool called tex2lyx, and intricate macros or unfamiliar packages may defeat it, ending up swallowed wholesale as TeX code (ERT) or needing manual cleanup. It is not a path for fully migrating a body of raw-LaTeX work into LyX.
Using it in Japanese
It handles Japanese too, but be aware it needs some configuration — the defaults are not enough. The basics: in Document ▸ Settings, pick a Japanese document class (for example “Japanese Article (jsarticle)”) and match the output to an engine suited to that document. For the character encoding, there is a family of pLaTeX-oriented Japanese encodings such as utf8-platex (mind the combinations: the CJK-package route versus the japanese-package route, which can clash with inputenc).
When in doubt, the reliable source is the LyX configuration pages on the Japanese community’s TeX Wiki, which gather the steps per operating system. Producing a Japanese PDF ultimately means driving a pLaTeX- or LuaLaTeX-based setup underneath — the same realities that apply when writing LaTeX by hand carry over unchanged.
Trade-offs
Honestly, LyX gives you less direct, fine-grained control than raw LaTeX. Many actions go through menus and dialogs, so when you want to nail every last detail of the final typesetting you will still end up writing raw LaTeX in TeX code (ERT). Its community and the volume of material around it are smaller than the culture of writing LaTeX directly in a text editor. On the other hand, it lets you concentrate on structure and mathematics instead of markup, and write while watching a near-final rendering on screen — a genuine advantage.
- Good fit: you want structured documents without writing markup; you want to build math by pointing and typing; you want a bridge from WYSIWYG to LaTeX quality.
- Poor fit: you want full control over the typesetting; you want to edit and reuse an existing body of raw LaTeX as-is; you lean heavily on the fine features of the newest packages.