* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
@ 2014-11-26 19:31 ` Scott Randby
2014-11-26 19:47 ` Thomas S. Dye
` (4 subsequent siblings)
5 siblings, 0 replies; 24+ messages in thread
From: Scott Randby @ 2014-11-26 19:31 UTC (permalink / raw)
To: Org-mode
On Wed, Nov 26, 2014 at 2:00 PM, Jacob Gerlach <jacobgerlach@gmail.com> wrote:
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
>
> I am working on adapting a thesis LaTeX template into org-mode. The template
> is set up with a main.tex having several individual files (chapters,
> appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
>
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
You don't have to compile the whole document every time. You can
export a subtree: C-c C-e, C-s changes the export scope.
Scott Randby
>
> Any input or advice you can provide would be greatly appreciated.
>
> Regards,
> Jake
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
2014-11-26 19:31 ` Scott Randby
@ 2014-11-26 19:47 ` Thomas S. Dye
2014-11-27 7:51 ` Marcin Borkowski
` (3 subsequent siblings)
5 siblings, 0 replies; 24+ messages in thread
From: Thomas S. Dye @ 2014-11-26 19:47 UTC (permalink / raw)
To: Jacob Gerlach; +Cc: Org-mode
Aloha Jake,
In my experience, the one file approach is easiest with Org mode. I've
written a book in Org mode using this approach and found it to be quite
comfortable. Compilation time wasn't ever a big deal for me, but this
will depend on your patience obviously.
I don't think there are any real pitfalls, where you run into a
situation that can't be remedied. The various LaTeX constructs in Org
mode let you apply LaTeX solutions at several scales, from snippets to
blocks, and these work well in my experience.
We use LaTeX at work and it would be easy for me to do my writing
outside work in LaTeX, but I now do all my outside work in Org mode.
The combination of Babel and the new exporter, along with the
integration of tools such as ebib, make this a congenial document
preparation environment.
hth,
Tom
Jacob Gerlach <jacobgerlach@gmail.com> writes:
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
>
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
>
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
>
> Any input or advice you can provide would be greatly appreciated.
>
> Regards,
> Jake
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
>
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism.
> An alternate approach would be to use one single file, since I can
> simply fold chapters to focus my workflow.
>
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file
> and must always run pdflatex over the entire document. I'm sure there
> are pitfalls either way that I'm not yet aware of.
>
> Any input or advice you can provide would be greatly appreciated.
>
> Regards,
> Jake
>
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
2014-11-26 19:31 ` Scott Randby
2014-11-26 19:47 ` Thomas S. Dye
@ 2014-11-27 7:51 ` Marcin Borkowski
2014-11-27 9:26 ` Andreas Leha
2014-11-27 10:09 ` Eric S Fraga
` (2 subsequent siblings)
5 siblings, 1 reply; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-27 7:51 UTC (permalink / raw)
To: Org-mode
On 2014-11-26, at 20:00, Jacob Gerlach wrote:
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
Personally, I never really got that; I much prefer writing in LaTeX.
(That said, I've been using LaTeX for almost 15 years now, and plain TeX
for, like, two decades, with heavy hacking on both, and am currently
writing a (yet another, though hopefully unique;-)) book on LaTeX so I'm
rather biased.)
OTOH, I never really bought the idea of dividing my LaTeX project into
several files. The only reasons I can come up with are:
1. Compilation time. Nowadays almost non-issue, especially that you can
C-c C-r a region (or a previously, specially marked (with region and
then C-c C-t C-r) fragment of the LaTeX file) in AUCTeX. (As said by
others, you can do a similar thing in Org-mode.)
2. Collaboration and editing issues. Nowadays a non-issue with modern,
distributed CVSs with good merging capabilities (like Git or Mercurial).
3. Efficiency of editing (font-lock, for instance). Nowadays a
non-issue due to the speed of today's machines (oh, ye olde times;-),
when my first PC had a 40 MHz clock, 4 MB of RAM and 170 MB (!)
HDD... and before that I had a C-64, with 64 kB RAM and 1 MHz processor
- and I did some *real work* with that!)
So, basically, I'd advise going with one big file. There are several
advantages to that - the main (for me, at least) being the ease of
navigation between various parts of the project.
That said, I'm just wondering whether there is something in Emacs which
would combine several files (possibly in different languages) into one
buffer (maybe even in Org-mode), where C-x C-s would save each part into
its own file etc. Just thinking. (Babel/tangling probably comes
close.)
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
Is that required in any way? I'd be surprised if it was.
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
Yes. (FYI: you can also fold things in AUCTeX.)
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
This is maybe only distantly related, but shameless plug:
https://github.com/mbork/org-one-to-many. (The project is currently
dormant, since I'm working on a few other things, but I'm going to
revisit it within a few weeks/months. Feature requests/bug reports are
welcome.)
> Any input or advice you can provide would be greatly appreciated.
Just my 2 cents: I'd go for LaTeX if heavy math typesetting is involved
(then amsmath!), maybe for Org otherwise, check whether the template
imposes a many-file structure (which it probably doesn't), and keep
everything in one file.
> Regards,
> Jake
Hth,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-27 7:51 ` Marcin Borkowski
@ 2014-11-27 9:26 ` Andreas Leha
2014-11-28 20:27 ` Marcin Borkowski
2014-11-29 3:48 ` Jorge A. Alfaro-Murillo
0 siblings, 2 replies; 24+ messages in thread
From: Andreas Leha @ 2014-11-27 9:26 UTC (permalink / raw)
To: emacs-orgmode
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> On 2014-11-26, at 20:00, Jacob Gerlach wrote:
[ ... ]
>
>
> Just my 2 cents: I'd go for LaTeX if heavy math typesetting is involved
> (then amsmath!), maybe for Org otherwise, check whether the template
> imposes a many-file structure (which it probably doesn't), and keep
> everything in one file.
>
I would disagree here. I do not see, that writing equations in LaTeX is
substantially easier than in org. Or put the other way round: org's
support for equations is quite good.
And preview-latex is really speeding me up.
Just my 2 cents.
Andreas
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-27 9:26 ` Andreas Leha
@ 2014-11-28 20:27 ` Marcin Borkowski
2014-11-28 21:36 ` Andreas Leha
2014-11-29 0:21 ` Richard Lawrence
2014-11-29 3:48 ` Jorge A. Alfaro-Murillo
1 sibling, 2 replies; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-28 20:27 UTC (permalink / raw)
To: emacs-orgmode
On 2014-11-27, at 10:26, Andreas Leha wrote:
> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>>
>> Just my 2 cents: I'd go for LaTeX if heavy math typesetting is involved
>> (then amsmath!), maybe for Org otherwise, check whether the template
>> imposes a many-file structure (which it probably doesn't), and keep
>> everything in one file.
>>
>
> I would disagree here. I do not see, that writing equations in LaTeX is
> substantially easier than in org. Or put the other way round: org's
> support for equations is quite good.
> And preview-latex is really speeding me up.
You're right, mostly. My point was that with displayed equations (in
amsmath, since core LaTeX lacks a lot in this department), AUCTeX has at
least one nice thing: C-u C-c C-e. (Also, plain C-c C-e.) Both very
handy. (As for preview-LaTeX; in AUCTeX, you also have folding, which
looks worse, but is faster - at least I guess so, I hardly ever use it.)
(C-c C-e inserts an environment, with autocompletion. With prefix
argument it /changes/ the surrounding environment.)
Also, Richard's post made me realize why I prefer to stay with LaTeX: I
know it way better than Elisp (even though I'm making progress), and in
case of troubles, I can more easily deal with them in LaTeX (though
vertical positioning of things on the page - especially trying to
typeset on a grid - still beats me).
> Just my 2 cents.
>
> Andreas
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 20:27 ` Marcin Borkowski
@ 2014-11-28 21:36 ` Andreas Leha
2014-11-28 22:16 ` Marcin Borkowski
2014-11-29 0:21 ` Richard Lawrence
1 sibling, 1 reply; 24+ messages in thread
From: Andreas Leha @ 2014-11-28 21:36 UTC (permalink / raw)
To: emacs-orgmode
Hi Marcin,
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> On 2014-11-27, at 10:26, Andreas Leha wrote:
>
>> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>>>
>>> Just my 2 cents: I'd go for LaTeX if heavy math typesetting is involved
>>> (then amsmath!), maybe for Org otherwise, check whether the template
>>> imposes a many-file structure (which it probably doesn't), and keep
>>> everything in one file.
>>>
>>
>> I would disagree here. I do not see, that writing equations in LaTeX is
>> substantially easier than in org. Or put the other way round: org's
>> support for equations is quite good.
>> And preview-latex is really speeding me up.
>
> You're right, mostly. My point was that with displayed equations (in
> amsmath, since core LaTeX lacks a lot in this department), AUCTeX has at
> least one nice thing: C-u C-c C-e. (Also, plain C-c C-e.) Both very
> handy. (As for preview-LaTeX; in AUCTeX, you also have folding, which
> looks worse, but is faster - at least I guess so, I hardly ever use it.)
>
> (C-c C-e inserts an environment, with autocompletion. With prefix
> argument it /changes/ the surrounding environment.)
>
Are you aware of org-cdlatex-mode [1]? That provides some similar
functionality.f
> Also, Richard's post made me realize why I prefer to stay with LaTeX: I
> know it way better than Elisp (even though I'm making progress), and in
> case of troubles, I can more easily deal with them in LaTeX (though
> vertical positioning of things on the page - especially trying to
> typeset on a grid - still beats me).
I agree here. And some of my org documents admittedly look more like
latex documents ...
Best,
Andreas
[1] http://orgmode.org/manual/CDLaTeX-mode.html#CDLaTeX-mode
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 21:36 ` Andreas Leha
@ 2014-11-28 22:16 ` Marcin Borkowski
0 siblings, 0 replies; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-28 22:16 UTC (permalink / raw)
To: emacs-orgmode
On 2014-11-28, at 22:36, Andreas Leha wrote:
> Hi Marcin,
>
>> You're right, mostly. My point was that with displayed equations (in
>> amsmath, since core LaTeX lacks a lot in this department), AUCTeX has at
>> least one nice thing: C-u C-c C-e. (Also, plain C-c C-e.) Both very
>> handy. (As for preview-LaTeX; in AUCTeX, you also have folding, which
>> looks worse, but is faster - at least I guess so, I hardly ever use it.)
>>
>> (C-c C-e inserts an environment, with autocompletion. With prefix
>> argument it /changes/ the surrounding environment.)
>>
>
> Are you aware of org-cdlatex-mode [1]? That provides some similar
> functionality.
Nope - I'll check this out, thanks!
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 20:27 ` Marcin Borkowski
2014-11-28 21:36 ` Andreas Leha
@ 2014-11-29 0:21 ` Richard Lawrence
2014-11-29 2:20 ` Andreas Leha
1 sibling, 1 reply; 24+ messages in thread
From: Richard Lawrence @ 2014-11-29 0:21 UTC (permalink / raw)
To: emacs-orgmode
Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
> Also, Richard's post made me realize why I prefer to stay with LaTeX: I
> know it way better than Elisp (even though I'm making progress), and in
> case of troubles, I can more easily deal with them in LaTeX (though
> vertical positioning of things on the page - especially trying to
> typeset on a grid - still beats me).
Yes, that's a good point: if you already know LaTeX well, but are less
comfortable hacking on Org, that would probably change my advice.
I have accumulated about 600 lines of custom Elisp that is required to
export my thesis from Org to LaTeX and PDF. (The bulk of this, 471
lines, is a custom export backend derived from the latex backend. It
deals with exporting certain Org lists as non-standard LaTeX
environments. Most of the rest deals with exporting my reading list to
.bib and defining various custom link types, etc. to make the Org side
more pleasant.)
By contrast, I have only written about 100 lines in custom LaTeX style
files (so far -- I might need to do more of this when it comes time to
get the final styling right for filing my dissertation). I also rely on
other packages from CTAN, but I don't have to maintain those myself.
I'm no Elisp wizard, but I am now pretty familiar with Org exporter and
I'm comfortable with Lisp in general. On the other hand, I tend to shy
away from anything more complicated that \newcommand in the (La)TeX
world.
Best,
Richard
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 0:21 ` Richard Lawrence
@ 2014-11-29 2:20 ` Andreas Leha
0 siblings, 0 replies; 24+ messages in thread
From: Andreas Leha @ 2014-11-29 2:20 UTC (permalink / raw)
To: emacs-orgmode
Richard Lawrence <richard.lawrence@berkeley.edu> writes:
> Marcin Borkowski <mbork@wmi.amu.edu.pl> writes:
>
>> Also, Richard's post made me realize why I prefer to stay with LaTeX: I
>> know it way better than Elisp (even though I'm making progress), and in
>> case of troubles, I can more easily deal with them in LaTeX (though
>> vertical positioning of things on the page - especially trying to
>> typeset on a grid - still beats me).
>
> Yes, that's a good point: if you already know LaTeX well, but are less
> comfortable hacking on Org, that would probably change my advice.
>
> I have accumulated about 600 lines of custom Elisp that is required to
> export my thesis from Org to LaTeX and PDF. (The bulk of this, 471
> lines, is a custom export backend derived from the latex backend. It
> deals with exporting certain Org lists as non-standard LaTeX
> environments. Most of the rest deals with exporting my reading list to
> .bib and defining various custom link types, etc. to make the Org side
> more pleasant.)
>
> By contrast, I have only written about 100 lines in custom LaTeX style
> files (so far -- I might need to do more of this when it comes time to
> get the final styling right for filing my dissertation). I also rely on
> other packages from CTAN, but I don't have to maintain those myself.
Just as a second data point. (Well, I did not measure any of this
really. Only guesswork)
Of all the elisp dealing with orgmode in my .emacs only the lines
enabling babel for some languages and and the lines loading the
exporters -- I think -- are strictly necessary to compile my thesis.
Which are less then 10 lines (and could be set via customize).
Ahh, and a few lines from Nicolas enabling :ignoreheading:
All the real work is done in a LaTeX cls file.
For the process of writing I had some more convenience code (enabling
reftex, mapping of inlinetasks to LaTeX todonotes and the kind).
As for the lists: Org can export lists do different LaTeX lists via
something like
--8<---------------cut here---------------start------------->8-
#+ATTR_LATEX: :environment enumerate*
- foo
- bar
--8<---------------cut here---------------end--------------->8-
or more general (with the definition of myownlist in the cls file)
--8<---------------cut here---------------start------------->8-
#+ATTR_LATEX: :environment myownlist :options [with options]
- foo
- bar
--8<---------------cut here---------------end--------------->8-
In summary, I'd say it is quite possible to do the 'work' in LaTeX but
still use org for the actual writing.
It is a little more work to set up, as org is another layer that has to
be connected to LaTeX correctly which can be tricky to get right.
But in my opinion the advantages are numerous (babel, agenda,
navigation) and outweigh the limitations when it comes to supporting
LaTeX (as compared to what auctex offers, that is).
Regards,
Andreas
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-27 9:26 ` Andreas Leha
2014-11-28 20:27 ` Marcin Borkowski
@ 2014-11-29 3:48 ` Jorge A. Alfaro-Murillo
2014-11-29 11:55 ` Marcin Borkowski
1 sibling, 1 reply; 24+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-11-29 3:48 UTC (permalink / raw)
To: emacs-orgmode
Andreas Leha writes:
> On 2014-11-26, at 20:00, Jacob Gerlach wrote:
>>
>> Just my 2 cents: I'd go for LaTeX if heavy math typesetting is
>> involved (then amsmath!), maybe for Org otherwise, check
>> whether the template imposes a many-file structure (which it
>> probably doesn't), and keep everything in one file.
>>
>
> I would disagree here. I do not see, that writing equations in
> LaTeX is substantially easier than in org. Or put the other way
> round: org's support for equations is quite good.
There is no way that writing equations can be faster in org than
in AUCTeX, since AUCTeX is designed for that, especially with
LaTeX-math-mode, two keys write any Greek symbol for example. And
all the support for completion of commands, environments and
environment variables, changing fonts, sectioning, integration
with reftex...
By the way, AUCTeX supports many packages by default including
amsmath, so just adding the proper \usepackage{amsmath} in the
preamble makes AUCTeX fontify in math-mode align, gather,
multline, and their starred equivalents.
The one thing that org is better at is tables, but for that I use
radiotables inside of AUCTeX.
> And preview-latex is really speeding me up.
I have never been a fan of preview or any WYSIWYG editing, I feel
like it slows me down, but if you use only org and are not used to
LaTeX it could be helpful, in AUCTeX it is easier to read math
because of the fonts used (for example subscripts and superscripts
are written under and over the symbols). I would also suggest
compiling with SyncTeX for forward search support, I do not know
if forward search is possible with org.
That being said there is a learning curve associated with
TeX/AUCTeX and if you are already very comfortable with org and do
not have time for learning something new, perhaps it is better to
stick with org.
If you decide to go with LaTeX, the reason to split your
dissertation in several chapters is so that the compilation can
run faster, since when you change a chapter and compile only that
chapter is compiled again. This is a substantial gain in
compilation time with big documents (books, dissertations). If you
decide to go with several org files and the publishing mechanism
or a single org file, I think that every time that you export the
whole document needs to be compiled.
Best,
--
Jorge.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 3:48 ` Jorge A. Alfaro-Murillo
@ 2014-11-29 11:55 ` Marcin Borkowski
2014-11-29 17:30 ` Jorge A. Alfaro-Murillo
0 siblings, 1 reply; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-29 11:55 UTC (permalink / raw)
To: emacs-orgmode
On 2014-11-29, at 04:48, Jorge A. Alfaro-Murillo wrote:
> If you decide to go with LaTeX, the reason to split your
> dissertation in several chapters is so that the compilation can
> run faster, since when you change a chapter and compile only that
> chapter is compiled again. This is a substantial gain in
> compilation time with big documents (books, dissertations). If you
> decide to go with several org files and the publishing mechanism
> or a single org file, I think that every time that you export the
> whole document needs to be compiled.
I mostly agree, but the above is not true: see TeX-pin-region and
TeX-command-region. Bottom line: IMHO no point in dividing into many
files.
> Best,
Regards,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 11:55 ` Marcin Borkowski
@ 2014-11-29 17:30 ` Jorge A. Alfaro-Murillo
2014-11-29 22:32 ` Marcin Borkowski
0 siblings, 1 reply; 24+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-11-29 17:30 UTC (permalink / raw)
To: emacs-orgmode
Marcin Borkowski writes:
> I mostly agree, but the above is not true: see TeX-pin-region
> and TeX-command-region. Bottom line: IMHO no point in dividing
> into many files.
You are right, you can compile a region in AUCTeX, or export just
a region in org, but the problem (besides having to select the
region as compared to a fast C-c C-c C-m) is that the result does
not have the whole document, just the part you selected, so you
miss seeing the exported part in context. For example, you miss
the ability to read before or after in the pdf and use a backward
search to find the code that corresponds to the next part that you
want to edit. If you use a main file plus several files in LaTeX,
the whole document is preserved but the compilation just runs in
the files with changes, and the backward search from the pdf
points to the right point in the right file (at least with evince
it does).
Best,
--
Jorge.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 17:30 ` Jorge A. Alfaro-Murillo
@ 2014-11-29 22:32 ` Marcin Borkowski
0 siblings, 0 replies; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-29 22:32 UTC (permalink / raw)
To: emacs-orgmode
On 2014-11-29, at 18:30, Jorge A. Alfaro-Murillo wrote:
> Marcin Borkowski writes:
>
>> I mostly agree, but the above is not true: see TeX-pin-region
>> and TeX-command-region. Bottom line: IMHO no point in dividing
>> into many files.
>
> You are right, you can compile a region in AUCTeX, or export just
> a region in org, but the problem (besides having to select the
> region as compared to a fast C-c C-c C-m) is that the result does
> not have the whole document, just the part you selected, so you
> miss seeing the exported part in context. For example, you miss
> the ability to read before or after in the pdf and use a backward
> search to find the code that corresponds to the next part that you
> want to edit. If you use a main file plus several files in LaTeX,
> the whole document is preserved but the compilation just runs in
> the files with changes, and the backward search from the pdf
> points to the right point in the right file (at least with evince
> it does).
Well.
1. C-c C-r C-m is not /that/ slower than C-c C-c C-m ;-). You only
select the region once (with C-c C-t C-r) and it persists until
“unpinned”.
2. I did not get your second part. AFAIK, it is impossible to compile
just one file in the document and still get the whole pdf as a result.
I agree with backward search, it might not work (I don't know, I hardly
ever use it – I have C-s and C-r and don't feel the need for it...).
> Best,
Regards,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
` (2 preceding siblings ...)
2014-11-27 7:51 ` Marcin Borkowski
@ 2014-11-27 10:09 ` Eric S Fraga
2014-11-28 20:41 ` Marcin Borkowski
2014-11-27 11:43 ` Rainer M Krug
2014-11-28 17:40 ` Richard Lawrence
5 siblings, 1 reply; 24+ messages in thread
From: Eric S Fraga @ 2014-11-27 10:09 UTC (permalink / raw)
To: Jacob Gerlach; +Cc: Org-mode
On Wednesday, 26 Nov 2014 at 19:00, Jacob Gerlach wrote:
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
I would encourage this. Although I have been using LaTeX for almost 30
years, I now do all of my writing in org with the odd LaTeX directive
when necessary. With all the various LaTeX helper bits in org
(e.g. preview), there is little advantage to writing directly in LaTeX
any longer.
For me, the killer feature is the ability to put inline tasks in the
document so that I know what I need to work on without having to have a
separate task list or todo items within my general day to day task
list. Then a simple "C-c / t" shows me all the tasks for the current
document.
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
Indeed.
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
As others have said, you can export just subtrees when you wish. Not an
issue generally.
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-589-g9eff31.dirty
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-27 10:09 ` Eric S Fraga
@ 2014-11-28 20:41 ` Marcin Borkowski
2014-11-28 20:57 ` Eric S Fraga
2014-11-29 2:38 ` Jacob Gerlach
0 siblings, 2 replies; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-28 20:41 UTC (permalink / raw)
To: Org-mode
On 2014-11-27, at 11:09, Eric S Fraga wrote:
> On Wednesday, 26 Nov 2014 at 19:00, Jacob Gerlach wrote:
>> Hello list,
>>
>> I'm starting writing my thesis, for which I hope to remain in org-mode
>> rather than regular LaTeX.
>
> I would encourage this. Although I have been using LaTeX for almost 30
> years, I now do all of my writing in org with the odd LaTeX directive
> when necessary. With all the various LaTeX helper bits in org
> (e.g. preview), there is little advantage to writing directly in LaTeX
> any longer.
On the contrary: Org-mode (however I like it) does not have the
functions and keybindings that make writing LaTeX in AUCTeX so
pleasant. C-c C-e can be simulated by speed keys to enter special
blocks (to some extent, at least), but AFAIK there's no equivalent of
C-u C-c C-e, nor (C-u) C-c C-f, nor C-c C-l with C-x ` (and probably
some others I forgot about).
BTW: are there any plans to support similar thing in Org? Maybe not in
the core, but some kind of "plugin" in contrib? Like: convert region to
italic/bold, or enter a special block with autocompletion (e.g., based
on other special blocks in this very file), or change the surrounding
special block to another one?
OTOH, I don't try to convert anyone to using LaTeX; I'm only saying that
there are valid reasons to use LaTeX over Org, at least in some cases.
Though I would guess that they mean anything only for seasoned
LaTeX/AUCTeX users: if you have invested over half of your life in
learning TeX/LaTeX, and over a third of your life to learn AUCTeX,
switching and having to fight your muscle memory is not an easy
option;-). (And probably for some very special cases, too, where you
have to manually tweak a lot of things with low-level TeX code, for
instance.)
> For me, the killer feature is the ability to put inline tasks in the
> document so that I know what I need to work on without having to have a
> separate task list or todo items within my general day to day task
> list. Then a simple "C-c / t" shows me all the tasks for the current
> document.
And that is insanely cool, I have to say. (Though one can M-x occur in
LaTeX - not the same, but close.)
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 20:41 ` Marcin Borkowski
@ 2014-11-28 20:57 ` Eric S Fraga
2014-11-29 2:38 ` Jacob Gerlach
1 sibling, 0 replies; 24+ messages in thread
From: Eric S Fraga @ 2014-11-28 20:57 UTC (permalink / raw)
To: Marcin Borkowski; +Cc: Org-mode
On Friday, 28 Nov 2014 at 21:41, Marcin Borkowski wrote:
[...]
> On the contrary: Org-mode (however I like it) does not have the
> functions and keybindings that make writing LaTeX in AUCTeX so
> pleasant. C-c C-e can be simulated by speed keys to enter special
> blocks (to some extent, at least), but AFAIK there's no equivalent of
> C-u C-c C-e, nor (C-u) C-c C-f, nor C-c C-l with C-x ` (and probably
> some others I forgot about).
True. I must admit that it did take a while for my fingers to forget
AUCTeX bindings... but I actually still use them as I do have
significant amounts of embedded LaTeX in most documents I work on,
particularly equations.
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-595-g5945be
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 20:41 ` Marcin Borkowski
2014-11-28 20:57 ` Eric S Fraga
@ 2014-11-29 2:38 ` Jacob Gerlach
2014-11-29 3:23 ` Richard Lawrence
2014-12-03 20:24 ` Eric S Fraga
1 sibling, 2 replies; 24+ messages in thread
From: Jacob Gerlach @ 2014-11-29 2:38 UTC (permalink / raw)
To: Org-mode
Wow, I expected a little help, but never to spark such a conversation.
Thanks to all for the comments.
Thanks to all who suggested sticking with one file. That was the main
issue I needed to sort out, and I'm glad I have a way foward
On Wed, Nov 26, 2014 at 2:31 PM, Scott Randby <srandby@gmail.com> wrote:
> You don't have to compile the whole document every time. You can
> export a subtree: C-c C-e, C-s changes the export scope.
I had never tried out this feature before. I had previously customized
org-latex-link-with-unknown-path-format to help me catch link
typos [1], which causes subtree (pdf) export to fail if it includes a link
that is out of scope. Nevertheless, I may come back to this and adjust
the behavior if I end up having problems with export time.
On Thu, Nov 27, 2014 at 2:51 AM, Marcin Borkowski <mbork@wmi.amu.edu.pl> wrote:
> On Wednesday, 26 Nov 2014 at 19:00, Jacob Gerlach wrote:
>> I am working on adapting a thesis LaTeX template into org-mode. The
>> template is set up with a main.tex having several individual files
>> (chapters, appendices, etc) \include'd.
>
> Is that required in any way? I'd be surprised if it was.
Not at all required. I'm working from an already-created template
that meets the format requirements. The template is set up with
separate files. All that's required is the final pdf format.
> (FYI: you can also fold things in AUCTeX.)
Didn't realize that, but I'll probably stick with Org for now!
On Thu, Nov 27, 2014 at 5:09 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> For me, the killer feature is the ability to put inline tasks in the
> document so that I know what I need to work on without having to have a
> separate task list or todo items within my general day to day task
> list. Then a simple "C-c / t" shows me all the tasks for the current
> document.
Thus far I've mostly used Org as a LaTeX editor and haven't really
taken the time to learn and use the task tracking, but I really like
this idea. I haven't looked, but I'm sure there are variables to
control whether TODO state gets exported.
On Thu, Nov 27, 2014 at 6:43 AM, Rainer M Krug <Rainer@krugs.de> wrote:
> Don't forget latexmk which runns in an emacs shell or even a
> different terminal, monitors file changes, and if a file changes
> compiles the latex file - so exporting from org is exporting to latex
> only, and the pdf is creqated in the background.
Inded, I have org-latex-pdf-process set to:
("latexmk -f -pdf %f" "latexmk -f -pdf %f")
And I always export directly to pdf.
> I use it daily and it works perfectly.
I often find that latexmk fails to resolve links after I've made some
minor changes to a document. I haven't put much effort into troubleshooting
this - I end up running pdflatex over the file 2 extra times. I
suppose I should add that to org-latex-pdf-process...
On Fri, Nov 28, 2014 at 12:40 PM, Richard Lawrence
<richard.lawrence@berkeley.edu> wrote:
> Here are a couple of other things to think about. When I decided to go
> with Org, I took a few steps to ensure that if I ever need to switch to
> pure LaTeX, I will be able to do so with minimal pain, just by exporting
> my Org document to .tex and going from there. (The big sticking point
> here for me was making sure I could produce human-readable, stable
> labels and refs for things like sections. See the variable
> org-latex-custom-id-as-label, which was introduced by a patch I wrote.)
This sounds helpful. I'm using ELPA (tracking maint?) and don't see
this variable. Was your patch applied to master?
> Another thing to think ahead about is how you want to deal with your
> bibliography. People on this list use different approaches. I
> personally keep my reading tasks and notes in Org, then generate a .bib
> file from this as needed during compilation of my thesis. Others keep
> bibliographic information directly in .bib. I think you'll find there
> are good tools for either approach, but one or the other will probably
> fit better into your workflow, and may affect how easily you can export
> to other formats.
Yes, I know I have a lot to figure out in this arena. That's another day...
[1] http://lists.gnu.org/archive/html/emacs-orgmode/2014-08/msg00681.html
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 2:38 ` Jacob Gerlach
@ 2014-11-29 3:23 ` Richard Lawrence
2014-12-03 20:24 ` Eric S Fraga
1 sibling, 0 replies; 24+ messages in thread
From: Richard Lawrence @ 2014-11-29 3:23 UTC (permalink / raw)
To: emacs-orgmode
Jacob Gerlach <jacobgerlach@gmail.com> writes:
> On Fri, Nov 28, 2014 at 12:40 PM, Richard Lawrence
> <richard.lawrence@berkeley.edu> wrote:
>> (The big sticking point here for me was making sure I could produce
>> human-readable, stable labels and refs for things like sections. See
>> the variable org-latex-custom-id-as-label, which was introduced by a
>> patch I wrote.)
>
> This sounds helpful. I'm using ELPA (tracking maint?) and don't see
> this variable. Was your patch applied to master?
It was. I just checked -- sorry, I guess it's not in maint, even though
it was applied a while ago. Looks like it will land in Org 8.3.
Best,
Richard
OpenPGP Key ID: CF6FA646
Fingerprint: 9969 43E1 CF6F A646
(See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-29 2:38 ` Jacob Gerlach
2014-11-29 3:23 ` Richard Lawrence
@ 2014-12-03 20:24 ` Eric S Fraga
1 sibling, 0 replies; 24+ messages in thread
From: Eric S Fraga @ 2014-12-03 20:24 UTC (permalink / raw)
To: Jacob Gerlach; +Cc: Org-mode
On Friday, 28 Nov 2014 at 21:38, Jacob Gerlach wrote:
[...]
> On Thu, Nov 27, 2014 at 5:09 AM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>> For me, the killer feature is the ability to put inline tasks in the
>> document so that I know what I need to work on without having to have a
>> separate task list or todo items within my general day to day task
>> list. Then a simple "C-c / t" shows me all the tasks for the current
>> document.
>
> Thus far I've mostly used Org as a LaTeX editor and haven't really
> taken the time to learn and use the task tracking, but I really like
> this idea. I haven't looked, but I'm sure there are variables to
> control whether TODO state gets exported.
Indeed:
,----[ C-h v org-latex-format-inlinetask-function RET ]
| org-latex-format-inlinetask-function is a variable defined in `ox-latex.el'.
| Its value is org-latex-format-inlinetask
| Original value was
| org-latex-format-inlinetask-default-function
|
| This variable may be risky if used as a file-local variable.
|
| Documentation:
| Function called to format an inlinetask in LaTeX code.
|
| The function must accept seven parameters:
| TODO the todo keyword (string or nil)
| TODO-TYPE the todo type (symbol: `todo', `done', nil)
| PRIORITY the inlinetask priority (integer or nil)
| NAME the inlinetask name (string)
| TAGS the inlinetask tags (list of strings or nil)
| CONTENTS the contents of the inlinetask (string or nil)
| INFO the export options (plist)
|
| The function should return the string to be exported.
|
| You can customize this variable.
|
| This variable was introduced, or its default value was changed, in
| version 25.1 of Emacs.
|
| [back]
`----
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-595-g5945be
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
` (3 preceding siblings ...)
2014-11-27 10:09 ` Eric S Fraga
@ 2014-11-27 11:43 ` Rainer M Krug
2014-11-28 17:40 ` Richard Lawrence
5 siblings, 0 replies; 24+ messages in thread
From: Rainer M Krug @ 2014-11-27 11:43 UTC (permalink / raw)
To: Jacob Gerlach; +Cc: Org-mode
[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]
Jacob Gerlach <jacobgerlach@gmail.com> writes:
> Hello list,
>
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
>
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
>
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
Don't forget latexmk [1] which runns in an emacs shell or even a
different terminal, monitors file changes, and if a file changes
compiles the latex file - so exporting from org is exporting to latex
only, and the pdf is creqated in the background.
I use it daily and it works perfectly.
Cheers,
Rainer
>
> Any input or advice you can provide would be greatly appreciated.
>
> Regards,
> Jake
Footnotes:
[1] http://users.phys.psu.edu/~collins/software/latexmk-jcc/
--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-26 19:00 Large LaTeX project in single file or using publishing Jacob Gerlach
` (4 preceding siblings ...)
2014-11-27 11:43 ` Rainer M Krug
@ 2014-11-28 17:40 ` Richard Lawrence
2014-11-28 18:49 ` Melleus
2014-11-28 20:32 ` Marcin Borkowski
5 siblings, 2 replies; 24+ messages in thread
From: Richard Lawrence @ 2014-11-28 17:40 UTC (permalink / raw)
To: emacs-orgmode; +Cc: Jacob Gerlach
Hi Jake,
Jacob Gerlach <jacobgerlach@gmail.com> writes:
> I'm starting writing my thesis, for which I hope to remain in org-mode
> rather than regular LaTeX.
Others have already given you good advice, but since I am also writing
my thesis in Org, I thought I would chime in. Like you, I felt a bit of
trepidation when I was deciding whether to write in Org or LaTeX; I
ultimately went with Org because (1) I find it much more pleasant to use
98% of the time; (2) I felt pretty confident I could plug the gaps in
the other 2% with help from Org's awesome community; and (3) I wanted
the option to export to other formats like HTML (though I haven't used
this much so far).
> I am working on adapting a thesis LaTeX template into org-mode. The
> template is set up with a main.tex having several individual files
> (chapters, appendices, etc) \include'd.
>
> I believe that I could parallel this using org's publishing mechanism. An
> alternate approach would be to use one single file, since I can simply fold
> chapters to focus my workflow.
Like others, I would recommend the one-file approach. One advantage is
that it makes it easier to compile parts of your document by themselves,
since exporting a subtree from Org will inherit any #+LATEX_HEADER:
declarations that apply to the whole document (unless you override them
by setting the EXPORT_LATEX_HEADER property on the subtree).
> My first concern is losing the ability to use internal links if I use
> separate files. Another thought is compilation time if I use one file and
> must always run pdflatex over the entire document. I'm sure there are
> pitfalls either way that I'm not yet aware of.
If you decide you need to go the multiple-files route, you can probably
find a way to convert internal links into external ones. I half-recall
someone posting code on this list to do this at some point...
Here are a couple of other things to think about. When I decided to go
with Org, I took a few steps to ensure that if I ever need to switch to
pure LaTeX, I will be able to do so with minimal pain, just by exporting
my Org document to .tex and going from there. (The big sticking point
here for me was making sure I could produce human-readable, stable
labels and refs for things like sections. See the variable
org-latex-custom-id-as-label, which was introduced by a patch I wrote.)
If you're worried about ever having to make the switch, I would
recommend thinking ahead about each of the Org features you rely on and
seeing how they get exported to LaTeX. If the default output is not
something you'd want to edit by hand, consider either limiting your use
of that feature, or customizing it so that it produces better output for
you. Org provides a lot of ways to do the latter, from tweaking
variables to export filters to custom export backends.
Another thing to think ahead about is how you want to deal with your
bibliography. People on this list use different approaches. I
personally keep my reading tasks and notes in Org, then generate a .bib
file from this as needed during compilation of my thesis. Others keep
bibliographic information directly in .bib. I think you'll find there
are good tools for either approach, but one or the other will probably
fit better into your workflow, and may affect how easily you can export
to other formats.
Hope that's helpful!
Best,
Richard
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 17:40 ` Richard Lawrence
@ 2014-11-28 18:49 ` Melleus
2014-11-28 20:32 ` Marcin Borkowski
1 sibling, 0 replies; 24+ messages in thread
From: Melleus @ 2014-11-28 18:49 UTC (permalink / raw)
To: emacs-orgmode
My five cents.
Pretty long ago I started writing my thesis as a single LaTeX file so I
see no reason to redo it in Org format. Nevertheless I began use Org
mode almost exlusively for writing articles. Thanks to Org I can keep
all information needed for article in one file. I find helpful using
export/noexport tags to choose what I do and what I do not like to see
in the final article.
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: Large LaTeX project in single file or using publishing
2014-11-28 17:40 ` Richard Lawrence
2014-11-28 18:49 ` Melleus
@ 2014-11-28 20:32 ` Marcin Borkowski
1 sibling, 0 replies; 24+ messages in thread
From: Marcin Borkowski @ 2014-11-28 20:32 UTC (permalink / raw)
To: emacs-orgmode
On 2014-11-28, at 18:40, Richard Lawrence wrote:
> Hi Jake,
>
> Others have already given you good advice, but since I am also writing
> my thesis in Org, I thought I would chime in. Like you, I felt a bit of
> trepidation when I was deciding whether to write in Org or LaTeX; I
> ultimately went with Org because (1) I find it much more pleasant to use
> 98% of the time; (2) I felt pretty confident I could plug the gaps in
> the other 2% with help from Org's awesome community; and (3) I wanted
> the option to export to other formats like HTML (though I haven't used
> this much so far).
Re (1): as I said, I'm biased; re (2): thanks for making me realize this
was exactly one of my reasons to stay with LaTeX.
>> My first concern is losing the ability to use internal links if I use
>> separate files. Another thought is compilation time if I use one file and
>> must always run pdflatex over the entire document. I'm sure there are
>> pitfalls either way that I'm not yet aware of.
>
> If you decide you need to go the multiple-files route, you can probably
> find a way to convert internal links into external ones. I half-recall
> someone posting code on this list to do this at some point...
Yep, it was me. https://github.com/mbork/org-one-to-many, please
consider it somewhere between proof-of-concept and public beta (bug
reports/feature requests welcome).
> Here are a couple of other things to think about. When I decided to go
> with Org, I took a few steps to ensure that if I ever need to switch to
> pure LaTeX, I will be able to do so with minimal pain, just by exporting
> my Org document to .tex and going from there. (The big sticking point
> here for me was making sure I could produce human-readable, stable
> labels and refs for things like sections. See the variable
> org-latex-custom-id-as-label, which was introduced by a patch I wrote.)
Nice!
> If you're worried about ever having to make the switch, I would
> recommend thinking ahead about each of the Org features you rely on and
> seeing how they get exported to LaTeX. If the default output is not
> something you'd want to edit by hand, consider either limiting your use
> of that feature, or customizing it so that it produces better output for
> you. Org provides a lot of ways to do the latter, from tweaking
> variables to export filters to custom export backends.
Great advice! Again, a project idea I mentioned some time ago (a LaTeX
exporter which would export to something more idiomatic and customizable
on the LaTeX side) might help here. Not yet, however, I don't have time
for that now.
> Hope that's helpful!
>
> Best,
> Richard
Regards,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
^ permalink raw reply [flat|nested] 24+ messages in thread