Re: [O] How to export an Org file to LaTeX's book class, but without parts?
On 2015-04-22, at 03:32, Nick Dokos wrote: > Marcin Borkowski 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
Re: [O] How to export an Org file to LaTeX's book class, but without parts?
On 2015-04-22, at 08:27, Miguel Ruiz 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
Re: [O] How to export an Org file to LaTeX's book class, but without parts?
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: mb...@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
Re: [O] How to export an Org file to LaTeX's book class, but without parts?
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
Re: [O] How to export an Org file to LaTeX's book class, but without parts?
Marcin Borkowski 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