Hacker News new | past | comments | ask | show | jobs | submit login
LyX: combine the power of LaTeX with the ease of use of a graphical interface (lyx.org)
198 points by delib on Aug 28, 2018 | hide | past | favorite | 68 comments



The thing I love most about LyX is the "outline" view. Editing plain text e.g. in "vi" has nothing comparable, but neither does Word, or Google Docs, etc., in my opinion.

In the screenshot here https://pauljmiller.files.wordpress.com/2015/05/lyx-main-scr... you can see there is a pane on the left with the document structure. At the bottom of that pane, there are four buttons, the right of which are an up and down button. Those four buttons (left, right, up, down) allow you to take a section of the document and move it around. The up/down change its position relative to other sections, and left/right promote/indent the section (e.g. change heading to sub-heading, or vice versa).

When editing large documents (e.g. > 100 pages), I find this invaluable if I wish to restructure the document.


> neither does Word

MS Word has an interactive draggable outline view with the promote/demote/drag features ("View"|"Outline"), it also has a navbar outline view ("View"|"Navigation Pane" checkbox). You can use both combined.


The "move heading up/down" don't work as well as LyX.

On Word, if you move a heading up/down with the buttons (in "View"|"Outline") the heading moves but the text and sub-sections underneath it don't move.

Before:

    MY HEADING
    Some text
       SUB-HEADING
       Text about the sub-heading
       SUB-HEADING 2
       More text
If you take "SUB-HEADING 2" and click "move up", the document is now:

    MY HEADING
    Some text
       SUB-HEADING
       SUB-HEADING 2
       Text about the sub-heading
       More text
What you want, when you move a heading, is not only to move the heading, but to really move the whole section, including: the heading, its text, and sub-headings, the text under the sub-headings, etc.

LyX moves the sections around, Word only moves the headings.

I'll concede that dragging in Word does give the desired effect (I admit I never tried drag before you mentioned it, despite having used Word for 25 years and always wishing for that feature. I assumed dragging did the same as the buttons.) And the indent/outdent buttons do work take their contents with them as well.


What is your text is not related to the heading? In Word just select everything you want to move, then move it all together.

Also Ctrl-Alt-arrow moves the sections around.


Why would your text be unrelated to the header?

In an editor with first-class outlining support, the document is usually composed with the outline view in play, so essentially you’re always adding text and headers to a “node” rather than to the document as a whole. You then place the node in the outline, rather than placing text in a linear document that happens to (sometimes) reflect a valid outline.

It’s less comparable to Word, and more comparable to editing .rtf files and placing them into a flow in Desktop Publishing software. The content (the .rtf file) and the document (the flow-boxes) are separate, and can be modified separately without knowledge of how the other side has been modified.

(This workflow also being the original TeX workflow, just replacing “.rtf files” with individual .tex content files, and “the layout” with a structural .tex file that imports those content files.)


Because a writing app supports the act of writing. Once you’re done writing, you don’t need the app anymore. And when you’re in the act of writing, things are often not linear. You might come up with headers first, and fragments of text, usually in the order they pop into your head, not the order they need to be in the final copy. Then you wordsmith and reorder things to get them into a progression.

And in Word you can always collapse the section and then move it around with all of the text.


MS Word's outlining feature was there in Word for Windows 1.0 at the latest, which makes it close to 30 years old.


Org-Mode and Leo Editor have a collapsible outline view like that, but while you can use them to author documents, it's obviously hard to compare them to LyX.


> it's obviously hard to compare them to LyX.

Org-mode is certainly not directly comparable. But the output you get from Org-mode is comparable. Org-mode has excellent support for seamless export to LaTeX and LaTeX-generated-PDF, and many use it for writing, e.g., academic papers. Output is as beautiful as any other LaTeX tool, depends on the styling you build in. Here, e.g., is someone who modified LaTeX output to have an "Edward Tufte" look, once you incorporate the mods n your Emacs init file, conversion to this output happens automatically from the plain text Org file export: https://damitr.org/2014/01/09/latex-tufte-class-in-org-mode/


If you use Emacs, AuCTeX provides this type of functionality


+ outline-minor-mode


FWIW, Google Docs has an outline view.


I don't remember it allowing you to re-order sections, though.


That's kind of the (almost) whole point of Scrivener.

Also, I've seen this recently: https://innovationdilation.com/ but there are many many more like that.


This functionality is kind of huge for me though. I'm getting sick of Apple quality control problems, and have been thinking of bailing to a pixelbook with crostini. Scrivener is one of the few apps that makes me reluctant to pull the trigger; if lyx can replace it then...



That support article only states that Google Docs can display headings.

LyX can not only do that, it can also move the sections around (with left/right/up/down buttons). This moves the heading, plus all text under the heading, any sub-sections including their text, etc. It's very useful for restructuring the document.


:g/^#/p

for markdown at least.


If you put a #after the p you'll get the line numbers of the instances too, and you can jump to them with :num.

So for LaTeX if I do...

    :g/^\\\(sub\)*section/p#
I get...

     35 \section{Introduction}
     37 \section{Setup}
     39 \subsection{CSS Setup}
     66 \subsection{JS Setup}
     74 \subsection{HTML Setup}
     92 \subsection{React setup}
    113 \section{Components}
    261 \subsection{Card Box}
    541 \section{Old Chunks}
    562 \section{Index}
    566 \section{Code Chunks}
and...

    :92
Takes me to the React Setup subsection.


I've used LyX for ~17 years. Did all of my homework in it in college, wrote my thesis in it, and pull it out anytime I need to write a TeX document for myself.

If you're new to LaTeX, just grab LyX and go. It is a great gateway to LaTeX, and a reliable friend even if you wind up working in pure LaTeX, in order to collaborate or satisfy a formatting requirement, some of the time.

Thank you, LyX!


Same here. I spent so much time using LyX, and it's a fantastic project - high quality, great documentation. It accompanied all the way through school and I still use it for letters and such.

Edit: I took the opportunity to donate :)

https://www.lyx.org/Donate


One problem for me: the text always fills the full width of the window even though that quickly becomes ineligible. I haven't found a way yet to fix that


Make the window smaller. Seriously, I had the same problem and now I have room on my screen.


I also wrote my thesis in LyX! About 20 years ago :)


I've used LyX and had high hopes for it, but never really fit my workflow.

LyX is really good if you need to produce simple documents and don't need to invoke a lot of special LaTeX packages. I think LyX hits a sweet spot between Microsoft Word and full-blown LaTeX.

If you need to do anything out of the ordinary (like use TikZ), LyX will still let you do it but it's going to feel a bit unwieldy. LyX is also quite slow on very large documents like dissertations. I recall the WYSIWYM rendering of math symbols and the old-school fonts looking a little unpolished compared to the PDFs generated by LaTeX, which bothered me a little. Many advanced LaTeX heads are sticklers for correct aesthetics. I know LyX can generate PDFs too, but if I wanted that, I'd rather write LaTeX code directly (more control, much more lightweight and responsive).

I eventually wrote my dissertation on TeXworks.

p.s. as mentioned in another comment, TeXmacs has a higher fidelity WYSIWYG than LyX.


> LyX is also quite slow on very large documents like dissertations.

Have you tried it again in the last year or two? I've found that scrolling, for example, has become a lot faster since I first started using it.


Right, I wrote a 100 page document in LyX on a 2011 Mac Mini and it was fine. (Not sure what version of LyX.)


I have not, so this information may be outdated.


I think that GNU TexMacs [1] is a superior to LyX, albeit less well known. Unlike LyX, it doesn't depend on the TeX stack and all the baggage that comes with it.

1: http://www.texmacs.org/tmweb/home/welcome.en.html


Isn't TeXmacs dead? It got removed from the Debian repos due to lack of maintenance.

https://packages.qa.debian.org/t/texmacs.html


No, the package just has no Debian maintainer so it was dropped. Latest release is 1.99.7 which was released July 5:

https://github.com/texmacs/GNUTeXmacs/releases


One big advantage I found for Lyx over TexMacs is that you can have latex in comments in Lyx but not in TexMacs


I’ve found LyX good for getting a document started, allowing you to not think so heavily about formatting details while giving you decent output.

Eventually, though, I export to LaTeX and format the rest myself. I find that using LyX long enough, you don’t have the formatting commands available to you (and you end up with a ton of unreadable custom insets and inline TeX), and configuration becomes as complex as LaTeX itself.

It’s a neat project and I’ve been happy to see it steadily grow over the past 10+ years.


> you don’t have the formatting commands available to you (and you end up with a ton of unreadable custom insets and inline TeX)

Does this mean a LyX user can't easily collaborate with others? Most people don't use LyX. If in a collaboration one author uses LyX and everyone else uses normal LaTeX (possibly with lots of packages, tikz/pstricks, etc.), will this cause problems---either for the LyX user, for everyone else, or for version control?


> configuration becomes as complex as LaTeX itself.

I've been a happy user of LyX for about a decade and I have to agree whole-heartedly with you here. Creating a new document in LyX invariably starts with me copying a previous .lyx file and deleting all the content because the preambles and associated settings are very large.

I suppose I should just make a template, but copying and pasting a file is easier, and I like the analogy with a mother dough...


I would create or use a style file which would redefine standard macros to apply the desired styling.


LyX is a wonderful program that needs more love and more developers.

If you have the skills please help out.

C++ and Python: https://www.lyx.org/GetInvolved


It's seems to be down for me. Perhaps the hacker news hug of death?


Most probably; I happen to have gone to the site a few says ago and it was working as usual.


There's also WordTeX, a "WYSIPCTWOTCG" editor. There's a paper [1], but this is a rare case where the Youtube video [2] is both more entertaining and the medium lets the content shine.

[1] http://www.andrew.cmu.edu/user/twildenh/wordtex/

[2] http://www.youtube.com/watch?v=jlX_pThh7z8


This is nice indeed.


The feature in LyX I miss most when using other document editors is "Branches" [0].

I like to write thoughts about what I'm writing, notes to myself etc and keep them within the document, knowing they won't be output in the final file.

Word's comments never work as well for this. For reviewing they're fine, for longer prose... no.

0. https://wiki.lyx.org/LyX/NewInLyX14#toc6


ConTeXt provides similar feature called [modes](http://wiki.contextgarden.net/Modes) and you can imitate it in LaTeX using the [comment](https://ctan.org/pkg/comment?lang=en) package


Trivia: LyX was initially developed by Matthias Ettrich who started KDE one year later. LyX is 23 years old, barely younger than Qt, the GUI framework it uses.


Wrote my master dissertation in LyX, it was great. The LaTeX-specific features that LyX did not support, I put in a "preamble". Never had a problem and it even worked on a then-rare iBook (2004).


I use LyX to write academic papers and really love it. Sure, there are quirks, but it's still makes for a better workflow compared to the alternatives.

Especially important for me:

- track changes, which makes collaboration convenient (especially with less technically-oriented colleagues)

- math typesetting with instant preview

- integrated BibTex support, which makes citing easy

- easy to reference equations, tables, and figures in the text


I use LyX a lot for writing manuals, especially operations manuals. It's worked out fairly well. I've written and maintained several large "Operations Manuals" with other members of my team by placing the LyX documents under version control.

The main issue I had at one point was producing usable HTML output from the LaTeX conversion process, but I found a tool that processes the LyX file directly into HTML which produced acceptabled results.


Interesting how ShareLaTeX, Overleaf, Authorea etc. did not adopt LyX even though they are trying to reach a broader audience. Anyone know the reason?


They're all web-based and LyX isn't?


Qt has a web assembly target now though, so it could be.


I haven't used LyX in years, but I still probably would if I was doing the same math-heavy work I used to. WYSWIG is really helpful when doing equation editing and learning the shortcuts enabled me to mostly keep up with note taking on my laptop during math lectures.


Lyx is great. Although I’ve moved on to just typing straight latex, I probably would never have gotten started if it weren’t for Lyx. I still use it to set tables and such, because coding latex tables can be a huge pain. A great project.


LyX is a wonderful program and I do love it, but one thing I will caution against is tables. If you need to use tables, consider not using LyX. LyX looks like it can do tables, the UI in LyX is great for editing tables, however...

Tables do not split across pages (at least not by default). Word and Google Docs etc. can do this out of the box. Maybe there is a way to get this to work. For e.g. the description of a database table, as a table in the document with columns like "column name", "type", "description", not being able to use multiple pages is a real limitation.


That's how LaTeX tables work.

You can enable the "multi table" option in the table properties, which will use the longtable package to extend the table across multiple pages.


A bit of a pain, but you can do this by inserting the table, modifying the settings, and using the long table.

The formatting is a bit different, but I believe it will split the table across pages while supporting headers, footers, captions, and other options.


I am a fan of LyX but using version control with the resulting tex document is near impossible and does not work well with others editing in a regular text editor. Wonder if anyone else had this experience?


I use LyX with version control.

We put the software architecture document (about 100 pages) in a single .lyx file in a "doc" directory of our Git repository, which stores our software source code.

We love feature branches, so we update not only the code, but the documentation as well, in the branch. When we merge, everything gets merged together.

What I mean to say is, we're not just using Git to "check out, check in", we are also merging and branching as well.

The workflow works perfectly for us.

We've been using this for 2 years, with many many commits. Hardly any merge errors. And no times where Git merged wrongly and corrupted the document or similar. I fix merge errors in a text editor if they occur (maybe once every few months, takes a few minutes to repair.)

One thing I would say is that LyX always writes the newline endings native to your platform. Git, by default, checks out Windows newlines on Windows and converts them to UNIX newlines on commit. So that works well too. But if you don't use that feature of Git, you might experience problems.

We haven't had a need to edit the generated TeX document manually. We just use LyX.


Can someone comment on LyX vs TeXstudio? I'm using TeXstudio, I'm loving it but I'm wondering if I'm missing out on great stuff.


Different levels of abstraction. TeXstudio is akin to an IDE for LaTeX, whereas LyX is more a nice frontend on top of LaTeX. IMO, if you're already experienced and happy with LaTeX there's no reason to switch, but if you don't already know LaTeX or you find the workflow clunky LyX may be a good fit.


I've been using this for years and somehow continue to be able to amaze academics when I show them they don't need to write LaTeX tables and equations etc. by hand.

While there's an argument for writing plain text, I don't think it applies to most of the academics who can barely run a python script and wish they had secretaries typesetting their papers like the good old days.


I appreciate the efforts of LyX as it makes LaTeX writing more creative and less technical. I did use it at some point. But being rather absolutist when it comes to this, as a student i still preferred Word and Libreoffice because i like to play with the placement of pictures to explain technical things. But LyX might be your best bet if LaTeX is a requirement.


“the ease of use of a graphical interface”

Why do people think this is a thing? Whether I’m making a poster or slides in latex / beamer, dealing with spreadsheet data with pandas in an ipython console, programmatically checking email, writing code in emacs no window mode, or virtually anything else I do with a computer, perhaps the hugest rule of thumb is to avoid GUIs at all costs, they are the biggest productivity killer.

I know people will chime in with their opposing experiences, but it’s just noise to me. Sure, there are limited good uses for GUIs, but I cannot fathom at all how writing tex documents could be one. Doesn’t matter if you’re totally new to it or been doing it for years, anything taking your hand away from the keyboard to deal with menus is killing you.

If you want wysiwyg-like behavior, just open another shell tab with a permanently running job that detects changes to your source file, re-runs whatever document compilation command you use, and refreshes evince or some other viewer that you never interact with except to look at. Spending time learning this way of working from the start is worth far more than spending relatively less time on the first few documents in lyx.



Hopefully LaTeX3 [1] will be ready soon, migrating to it should make LyX developes' life easier too.

[1] https://github.com/latex3/latex3


LyX has been my go-to editor for years now. I like it's wysiwym approach and I get so productive on LyX that can amaze seasoned latex users.


If you like WYSIWYM, you may also like typora.io for Markdown.


What I miss in LyX is the ability to interface with Grammarly or LanguageTools. Otherwise it works great.


I think the server died under front page pressure :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: