emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: About exporting
Date: Thu, 01 Apr 2021 16:21:54 +0200	[thread overview]
Message-ID: <87lfa2axvh.fsf@posteo.net> (raw)
In-Reply-To: <8735wacx8b.fsf@ucl.ac.uk> (Eric S. Fraga's message of "Thu, 01 Apr 2021 07:52:52 +0100")

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Wednesday, 31 Mar 2021 at 20:28, Martin Steffen wrote:
>> And there is a final thing which (for me) seem to work better in
>> latex-mode compared to org. That's jumping to the ``next error'' with
>> some key stroke. That's important, LaTeX's own error output it quite
>> poor, but jumping to error locations is vital.
>
> Yes, this is an issue I have as well.  And the fact that the error
> messages are for the LaTeX lines, not the org lines, so you end up
> sometimes having to look at the LaTeX code and then go back to the org
> file.  This definitely adds friction!

These days I'm working on a book (a dictionary) of over 1000 pages. The
preamble contains 1813 lines of code (+/-), and is written separately in
a Org document, through literary programming. Contains: a) A lot of
(La)TeX code written (or perpetrated) by me, b) some Lua functions to
control certain parts of the process, c) all the configuration for Xindy
(the indexes) in Common Lisp (inside a filecontents* environment).
Everything, of course, ordered by sections. With this cocktail it seems
that something can go wrong at some point :-) However I find it very
easy to debug having things well separated. And I can always tangle
different versions of the preamble...

As I have already mentioned, I use Org Publish intensively. Some parts
of my Org Publish setup for this project are:

[...]
:base-directory "~/Git/DHTC/libro/org/"
:base-extension "org"
; *.tex files and output
:publishing-directory "~/Git/DHTC/libro/tex/"
:publishing-function org-latex-publish-to-latex
:body-only t
:exclude "DHTC-master\\.org\\|bibli-dhtc\\.org"

Each part of the book is an *org document that I export to *tex using
Org-Publish (:body-only t). And each document only includes at the
beginning:

#+SETUPFILE: diccionario.setup
#+INCLUDE: "elisp"

(that is, a setup file and a file that I have named `elisp' where I include
functions and filters).

And then I have a master document, as simple as possible, where the
preamble and the subdocuments are added through '\input{...}'. I have
defined this macro:

#+MACRO: input (eval (if (org-export-derived-backend-p org-export-current-backend 'latex) (concat "@@latex:\\input{@@" $1 ".tex" "@@latex:}@@") $1))

And, with a simple Elisp function, I compile the final document (or
parts of it) using latexmk (with `start-process-shell-command'). I add
an argument so that a dedicated buffer is generated with the output of
latexmk. As latexmk runs in interactive mode, every time I do a change
in a subdocument and call Org-Publish again, latexmk rebuilds everything
automatically. The latexmk output is very neat and warns of possible
errors. Also I always have an alternative branch in the repository to do
tests when I put 'experimental' code.

By all this I mean that using LaTeX from Org (but without stopping using
LaTeX) gives me a pretty productive and organized workflow. I recommend
try it out for large books.

Best regards,

Juan Manuel 


  parent reply	other threads:[~2021-04-01 14:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.51.1617033608.26133.emacs-orgmode@gnu.org>
2021-03-29 19:37 ` About exporting Ypo
2021-03-29 20:15   ` William Denton
2021-03-29 20:46   ` autofrettage
2021-03-29 21:39     ` Samuel Wales
2021-03-29 21:31   ` Juan Manuel Macías
2021-03-29 22:06   ` Tim Cross
2021-03-30  6:17     ` Eric S Fraga
2021-03-30  8:01       ` Colin Baxter
2021-03-30  8:13         ` Detlef Steuer
2021-03-30 10:15           ` Eric S Fraga
2021-03-30 11:40             ` Joost Kremers
2021-03-30  8:17         ` Eric S Fraga
2021-03-30 11:04       ` Juan Manuel Macías
2021-03-29 22:26   ` Thomas S. Dye
2021-03-30  4:47   ` Greg Minshall
2021-03-30 11:54   ` Martin Steffen
2021-03-30 12:44     ` autofrettage
2021-03-30 14:35       ` Martin Steffen
2021-03-30 14:44         ` autofrettage
2021-03-30 15:44         ` Juan Manuel Macías
2021-03-31  9:59           ` Eric S Fraga
2021-03-31 18:28             ` Martin Steffen
2021-04-01  6:52               ` Eric S Fraga
2021-04-01  7:00                 ` Tim Cross
2021-04-01  7:29                   ` Eric S Fraga
2021-04-01  8:50                 ` Timothy
2021-04-01 11:33                   ` Eric S Fraga
2021-04-01 13:25                     ` Timothy
2021-04-02 14:06                       ` Eric S Fraga
2021-04-01 14:21                 ` Juan Manuel Macías [this message]
2021-03-30 20:49     ` Tim Cross
2021-03-31 18:56 Juan Manuel Macías

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lfa2axvh.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).