by adrianmsmith · 8y ago · 0 comments
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.
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.
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.
Also Ctrl-Alt-arrow moves the sections around.
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.)
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/
Also, I've seen this recently: https://innovationdilation.com/ but there are many many more like that.
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.
for markdown at least.
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.