* How to export an Org file to LaTeX's book class, but without parts?
@ 2015-04-21 22:33 Marcin Borkowski
2015-04-22 1:32 ` Nick Dokos
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-04-21 22:33 UTC (permalink / raw
To: Org-Mode mailing list
Hi all,
this is an actual question, but it can be viewed as a continuation of
the "why use LaTeX directly and not Org" thread (disclaimer: from the
POV of an experienced LaTeX user and much less experienced Org-exporter
user).
So, I tried to do the opposite, just to learn something/unlock the "Org
Exporter" skill;-). I want to export my Org file to the book class
(actually, a class similar to it, but never mind), but I want my
first-level headings to be chapters, not parts. OTOH, I don't want to
modify org-latex-classes. Is that possible, and if yes, how to achieve
that?
TIA,
--
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] 6+ messages in thread
* Re: How to export an Org file to LaTeX's book class, but without parts?
2015-04-21 22:33 How to export an Org file to LaTeX's book class, but without parts? Marcin Borkowski
@ 2015-04-22 1:32 ` Nick Dokos
2015-04-23 22:50 ` Marcin Borkowski
2015-04-22 6:15 ` Eric S Fraga
2015-04-22 6:27 ` Miguel Ruiz
2 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2015-04-22 1:32 UTC (permalink / raw
To: emacs-orgmode
Marcin Borkowski <mbork@mbork.pl> writes:
> Hi all,
>
> this is an actual question, but it can be viewed as a continuation of
> the "why use LaTeX directly and not Org" thread (disclaimer: from the
> POV of an experienced LaTeX user and much less experienced Org-exporter
> user).
>
> So, I tried to do the opposite, just to learn something/unlock the "Org
> Exporter" skill;-). I want to export my Org file to the book class
> (actually, a class similar to it, but never mind), but I want my
> first-level headings to be chapters, not parts. OTOH, I don't want to
> modify org-latex-classes. Is that possible, and if yes, how to achieve
> that?
AFAIK, no, not without modifying org-latex-classes - why don't you want
to modify it?
Nick
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to export an Org file to LaTeX's book class, but without parts?
2015-04-21 22:33 How to export an Org file to LaTeX's book class, but without parts? Marcin Borkowski
2015-04-22 1:32 ` Nick Dokos
@ 2015-04-22 6:15 ` Eric S Fraga
2015-04-22 6:27 ` Miguel Ruiz
2 siblings, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2015-04-22 6:15 UTC (permalink / raw
To: Marcin Borkowski; +Cc: Org-Mode mailing list
On Wednesday, 22 Apr 2015 at 00:33, Marcin Borkowski wrote:
[...]
> I want to export my Org file to the book class (actually, a class
> similar to it, but never mind), but I want my first-level headings to
> be chapters, not parts. OTOH, I don't want to modify
> org-latex-classes. Is that possible, and if yes, how to achieve that?
The easiest way is, unfortunately, to modify org-latex-classes but the
modification is simply adding an element to the list:
#+begin_src emacs-lisp
(add-to-list 'org-latex-classes
'("bookwithnoparts" "\\documentclass{book}"
("\\chapter{%s}" . "\\chapter*{%s}")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
#+end_src
or similar...
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-1030-g65bbb1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to export an Org file to LaTeX's book class, but without parts?
2015-04-21 22:33 How to export an Org file to LaTeX's book class, but without parts? Marcin Borkowski
2015-04-22 1:32 ` Nick Dokos
2015-04-22 6:15 ` Eric S Fraga
@ 2015-04-22 6:27 ` Miguel Ruiz
2015-04-23 22:34 ` Marcin Borkowski
2 siblings, 1 reply; 6+ messages in thread
From: Miguel Ruiz @ 2015-04-22 6:27 UTC (permalink / raw
To: Marcin Borkowski, Org-Mode mailing list
If you don't mind to live with part-chapter-section instead chapter-section-subsection:
---8<-----------------orgmode src-------------------->8---
#+LaTeX_CLASS: book
#+LaTeX_HEADER: \let\part\chapter
#+LaTeX_HEADER: \let\chapter\section
#+LaTeX_HEADER: \let\section\subsection
---8<---------------end of orgmode src---------------->8---
Regards.
> -----Original Message-----
> From: mbork@mbork.pl
> Sent: Wed, 22 Apr 2015 00:33:24 +0200
> To: emacs-orgmode@gnu.org
> Subject: [O] How to export an Org file to LaTeX's book class, but without
> parts?
>
> Hi all,
>
> this is an actual question, but it can be viewed as a continuation of
> the "why use LaTeX directly and not Org" thread (disclaimer: from the
> POV of an experienced LaTeX user and much less experienced Org-exporter
> user).
>
> So, I tried to do the opposite, just to learn something/unlock the "Org
> Exporter" skill;-). I want to export my Org file to the book class
> (actually, a class similar to it, but never mind), but I want my
> first-level headings to be chapters, not parts. OTOH, I don't want to
> modify org-latex-classes. Is that possible, and if yes, how to achieve
> that?
>
> TIA,
>
> --
> Marcin Borkowski
> http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
> Faculty of Mathematics and Computer Science
> Adam Mickiewicz University
____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: How to export an Org file to LaTeX's book class, but without parts?
2015-04-22 6:27 ` Miguel Ruiz
@ 2015-04-23 22:34 ` Marcin Borkowski
0 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-04-23 22:34 UTC (permalink / raw
To: Org-Mode mailing list
On 2015-04-22, at 08:27, Miguel Ruiz <rbenit68@inbox.com> wrote:
> If you don't mind to live with part-chapter-section instead chapter-section-subsection:
>
> ---8<-----------------orgmode src-------------------->8---
>
> #+LaTeX_CLASS: book
>
> #+LaTeX_HEADER: \let\part\chapter
> #+LaTeX_HEADER: \let\chapter\section
> #+LaTeX_HEADER: \let\section\subsection
>
> ---8<---------------end of orgmode src---------------->8---
Haha, thanks! Not a clean way, but should work. Nice!
> Regards.
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] 6+ messages in thread
* Re: How to export an Org file to LaTeX's book class, but without parts?
2015-04-22 1:32 ` Nick Dokos
@ 2015-04-23 22:50 ` Marcin Borkowski
0 siblings, 0 replies; 6+ messages in thread
From: Marcin Borkowski @ 2015-04-23 22:50 UTC (permalink / raw
To: emacs-orgmode
On 2015-04-22, at 03:32, Nick Dokos <ndokos@gmail.com> wrote:
> Marcin Borkowski <mbork@mbork.pl> writes:
>
>> Hi all,
>>
>> this is an actual question, but it can be viewed as a continuation of
>> the "why use LaTeX directly and not Org" thread (disclaimer: from the
>> POV of an experienced LaTeX user and much less experienced Org-exporter
>> user).
>>
>> So, I tried to do the opposite, just to learn something/unlock the "Org
>> Exporter" skill;-). I want to export my Org file to the book class
>> (actually, a class similar to it, but never mind), but I want my
>> first-level headings to be chapters, not parts. OTOH, I don't want to
>> modify org-latex-classes. Is that possible, and if yes, how to achieve
>> that?
>
> AFAIK, no, not without modifying org-latex-classes - why don't you want
> to modify it?
Because I want this setup for only one file, and not necessarily globally.
BTW, I'll probably settle with this:
,----
| #+LATEX_CLASS: mwbk
| # Local Variables:
| # org-latex-classes: (("mwbk" "\\documentclass[11pt]{mwbk}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")))
| # End:
`----
Seems to do the trick (mwbk is a Polish-localized - or rather, European
- version of the book class). The drawback is that it keeps asking for
confirmation that it is safe. It seems that there is no option to mark
a /variable/ and not a /variable-value pair/ as "safe" as file local
variables - I guess I'll file an Emacs feature request for that.
> Nick
Thanks to all, and 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] 6+ messages in thread
end of thread, other threads:[~2015-04-23 22:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-21 22:33 How to export an Org file to LaTeX's book class, but without parts? Marcin Borkowski
2015-04-22 1:32 ` Nick Dokos
2015-04-23 22:50 ` Marcin Borkowski
2015-04-22 6:15 ` Eric S Fraga
2015-04-22 6:27 ` Miguel Ruiz
2015-04-23 22:34 ` Marcin Borkowski
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.