How would one go about to move a [sub..]section to a different position in the document structure?
The sectioning commands would have to be changed according to the new parent level.
Is there a program that does that? An editor via drag and drop?
A cli call like this should do it (given that the section numbering is default):
texsectionmove main.tex 3.2 root
Best Answer
As I interpret it, None is asking for something that looks like a directory structure: we can move folders (sections/subsections...) around in an arbitrary way, and LaTeX should know whether to put
\section
,\subsection
, or whatever else. A partial solution, that works well with copying and pasting within the document is to use a section-like environment instead of just a macro.The deepsection environment defined there takes exactly the same arguments as
\section
, and chooses the relevant level of sectioning for you. It will also complain if you are going deeper than you should.