Re: [O] [BUG][ODT] Headings not created with num:nil

2014-11-28 Thread Rasmus
Christian Moe  writes:

> Hi,
>
> Headings should be styled as Heading 1, Heading 2 etc. in ODT output.
>
> But when heading numbering is turned off, they are just styled as
> paragraphs in Default Style.
>
> They *are* included in the exported TOC, though.
>
> Tested in 8.3beta.

I see the same thing.  There seems to be no regressions on the lisp side
(assuming my git bisec skills are adequate).

What was wrong on my system was that
/usr/share/emacs/etc/org/styles/OrgOdtStyles.xml was not up to date (that
is: it was not the git version).

I updated the org-git package and I no longer see this.  Very weird.

—Rasmus

-- 
With monopolies the cake is a lie!




Re: [O] [BUG][ODT] Headings not created with num:nil

2014-11-28 Thread Christian Moe

Thanks! Now that I thought to check my setup, my problem was similar.

So this is *not* a bug in the ODT exporter. False alarm, case closed.

In my case, my org-odt-styles-dir points to a directory that does
contain a copy of the style files, but is apparently not updated with
new installs. I'll have to try to figure out why that happens.

Yours,
Christian

Rasmus writes:

> Christian Moe  writes:
>
>> Hi,
>>
>> Headings should be styled as Heading 1, Heading 2 etc. in ODT output.
>>
>> But when heading numbering is turned off, they are just styled as
>> paragraphs in Default Style.
>>
>> They *are* included in the exported TOC, though.
>>
>> Tested in 8.3beta.
>
> I see the same thing.  There seems to be no regressions on the lisp side
> (assuming my git bisec skills are adequate).
>
> What was wrong on my system was that
> /usr/share/emacs/etc/org/styles/OrgOdtStyles.xml was not up to date (that
> is: it was not the git version).
>
> I updated the org-git package and I no longer see this.  Very weird.
>
> —Rasmus




[O] possible bug in adding properties to headlines with no properties

2014-11-28 Thread John Kitchin
I noticed an undesirable behavior in setting a property on a headline
with no properties, but which contains a code block that generates
headlines with properties. When I try to set a property with C-c C-x p,
the property gets put in the wrong place (inside the code block). It is
a small issue, but I thought I would report. 

If the headline already has a PROPERTIES drawer then it seems to work fine.

Here is an example.

* bug in setting properties?
 <- put cursor here, C-c C-x p add property

The property goes in the code block below
 
#+BEGIN_SRC emacs-lisp
(format "** %s
  :PROPERTIES:
  :ID: %s
  :END:
%s" "A headline" "some id" "some body text")
#+END_SRC
#+RESULTS:
: ** A headline
:   :PROPERTIES:
:   :ID: some id
:   :END:
: some body text

-- 
---
John Kitchin
http://kitchingroup.cheme.cmu.edu




Re: [O] possible bug in adding properties to headlines with no properties

2014-11-28 Thread Charles C. Berry

On Fri, 28 Nov 2014, John Kitchin wrote:


I noticed an undesirable behavior in setting a property on a headline
with no properties, but which contains a code block that generates
headlines with properties. When I try to set a property with C-c C-x p,
the property gets put in the wrong place (inside the code block). It is
a small issue, but I thought I would report.



John,

When I do as you suggest, I get a prompt:

Malformed drawer at 348, repair? (y or n)

`348' was the bol for the first :PROPERTIES: line.

When I respond `y', a properties drawer is created under the headline and 
I get the usual prompts to complete the addition of a property.


In the end, it looks correct.

I get the same behavior with both current and older 8.3beta commits:

: commit e4195fa7db03284c0c0d5b70a66d419ce7caf3e9
: Author: Nicolas Goaziou 
: Date:   Thu Nov 13 21:49:03 2014 +0100


: commit 5945beef05120ce319228195a9e0c562f8573d19
: Author: Nicolas Goaziou 
: Date:   Thu Nov 27 00:21:03 2014 +0100
:

HTH,

Chuck




Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Richard Lawrence
Hi Jake,

Jacob Gerlach  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




Re: [O] Stack overflow in regexp matcher

2014-11-28 Thread Alan Schmitt
On 2014-10-25 12:34, "Charles C. Berry"  writes:

> Further, changing that regexp to
>
>  "^[^%\n]*usepackage.*{biblatex}"
>
> and byte-compiling reftex-parse.el.gz seems to make the problem go away.

The auctex developers have fixed the issue, which will be available in
the next version of emacs (since reftex is bundled).

In the meantime, they suggested to add the following in a configuration
file:

#+begin_src emacs-lisp
(with-eval-after-load 'reftex-parse
  (defun reftex-using-biblatex-p ()
"Return non-nil if we are using biblatex rather than bibtex."
(if (boundp 'TeX-active-styles)
;; the sophisticated AUCTeX way
(member "biblatex" TeX-active-styles)
  ;; poor-man's check...
  (save-excursion
(re-search-forward "^[^%\n]*?usepackage.*{biblatex}" nil t)
#+end_src

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Melleus
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.




Re: [O] possible bug in adding properties to headlines with no properties

2014-11-28 Thread John Kitchin
"Charles C. Berry"  writes:

thanks for the note. I am still on 8.2.7, so it sounds like the issue is
fixed upstream of me. I look forward to getting there!

> On Fri, 28 Nov 2014, John Kitchin wrote:
>
>> I noticed an undesirable behavior in setting a property on a headline
>> with no properties, but which contains a code block that generates
>> headlines with properties. When I try to set a property with C-c C-x p,
>> the property gets put in the wrong place (inside the code block). It is
>> a small issue, but I thought I would report.
>>
>
> John,
>
> When I do as you suggest, I get a prompt:
>
> Malformed drawer at 348, repair? (y or n)
>
> `348' was the bol for the first :PROPERTIES: line.
>
> When I respond `y', a properties drawer is created under the headline
> and I get the usual prompts to complete the addition of a property.
>
> In the end, it looks correct.
>
> I get the same behavior with both current and older 8.3beta commits:
>
> : commit e4195fa7db03284c0c0d5b70a66d419ce7caf3e9
> : Author: Nicolas Goaziou 
> : Date:   Thu Nov 13 21:49:03 2014 +0100
>
>
> : commit 5945beef05120ce319228195a9e0c562f8573d19
> : Author: Nicolas Goaziou 
> : Date:   Thu Nov 27 00:21:03 2014 +0100
> :
>
> HTH,
>
> Chuck
>
>
>

-- 
---
John Kitchin
Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Marcin Borkowski

On 2014-11-27, at 10:26, Andreas Leha wrote:

> Marcin Borkowski  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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Marcin Borkowski

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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Marcin Borkowski

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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Eric S Fraga
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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Andreas Leha
Hi Marcin,

Marcin Borkowski  writes:
> On 2014-11-27, at 10:26, Andreas Leha wrote:
>
>> Marcin Borkowski  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




Re: [O] Can special blocks be nested?

2014-11-28 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> this seems to work when exporting:
>
> #+BEGIN_BLOCK1
> Lorem ipsum
> #+BEGIN_BLOCK2
> dolor sit amet
> #+END_BLOCK2
> #+END_BLOCK1
>
> but font locking does not (the inner block begin/end markers are not
> colorized properly).
>
> Is this construction legal?

It is legal. You can nest special blocks, as long as they don't have the
same type.


Regards,

-- 
Nicolas Goaziou



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Marcin Borkowski

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



Re: [O] [RFC] Change property drawer syntax

2014-11-28 Thread Nicolas Goaziou


Sebastien Vauban 
writes:

> The above function is perfect for her task!  No diff at all [1] when
> applied on all my files from org-agenda-files (~ 45).

I updated ORG-NEWS then. Thanks for the feedback.


Regards,




Re: [O] html export does seem to no more recognise EXPORT_ .. PROPERTIES

2014-11-28 Thread Nicolas Goaziou
Hello,

Rainer Stengele  writes:

> with latest Org version I find the html export does no more recognise these 
> settings at the begin of the file:
>
> :PROPERTIES:
> :EXPORT_FILE_NAME: 
> x:/0PROJEKT/Kunden/customer/customer-Dokumentation-mmdd.html
> :EXPORT_TITLE: Stoll - IT (HW/SW) - Zugänge - Konfigurationen [Stand: 
> mmdd]
> :END:
>
> Export is simply done into the folder the org file lives.

This is always the case. Exporting in another (possibly remote)
directory is called "publishing" and requires additional set-up.


Regards,

-- 
Nicolas Goaziou



Re: [O] Can special blocks be nested?

2014-11-28 Thread Marcin Borkowski

On 2014-11-28, at 23:16, Nicolas Goaziou wrote:

> It is legal. You can nest special blocks, as long as they don't have the
> same type.

Thanks!

> Regards,

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Richard Lawrence
Marcin Borkowski  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




[O] How to inspect a document and check for the presence of source block language names and support

2014-11-28 Thread Grant Rettke
Good evening,

My goal is to obtain the following behavior in org mode for a document:
1) Report an error if there is a source block without a language
   specified
2) Report an error if there is a source block with a language specified
   that is *not* present in `org-babel-load-languages'

I've thought about ways to do this and come up with:
1) Visually inspect the document
2) Use `org-element' to parse and process the document

What are some other ways and what do you think about these two options?

Emacs version: `24.4.1'

Org version: `8.2.10'

Kind regards,
-- 
Grant Rettke
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Andreas Leha
Richard Lawrence  writes:
> Marcin Borkowski  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




Re: [O] How to inspect a document and check for the presence of source block language names and support

2014-11-28 Thread Andreas Leha
Hi Grant,

Grant Rettke  writes:
> Good evening,
>
> My goal is to obtain the following behavior in org mode for a document:
> 1) Report an error if there is a source block without a language
>specified
> 2) Report an error if there is a source block with a language specified
>that is *not* present in `org-babel-load-languages'
>
> I've thought about ways to do this and come up with:
> 1) Visually inspect the document
> 2) Use `org-element' to parse and process the document

I'd be interested in 2) if you come up with something here :-)

Regards,
Andreas




Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Jacob Gerlach
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  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  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  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  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
 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



Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Richard Lawrence
Jacob Gerlach  writes:

> On Fri, Nov 28, 2014 at 12:40 PM, Richard Lawrence
>  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.)




Re: [O] Large LaTeX project in single file or using publishing

2014-11-28 Thread Jorge A. Alfaro-Murillo

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.




[O] Wrapping sections in html not possible

2014-11-28 Thread Henry Hirsch
Hello,

When the following code snippet is exported to html the 
jumbotron section is not wrapped in the jumbotron class but 
the jumbotron div is in another section and the closing div
is in the content of my jumbotron.

* Another Section
#+BEGIN_HTML

#+END_HTML
* content of my jumbotron
This text is all about my jumbotron
#+BEGIN_HTML

#+END_HTML

* Another Section

So how can org mode support wrapping sections in html?
Especially for more complex cases where a section or
multiple sections will be wrapped in multiple divs.

I am using macros extensively and a workaround so far
is to not use org-modes sections but use a macro like
#+MACRO: heading #+HTML: $1
to create headlines. Which works but is unsatisfactory
for obvious reasons.

I am very interested in your thoughts. 

Regards
Henry