all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* In LaTeX export, can I control what heading type a headline goes to?
@ 2018-11-28 19:42 William Denton
  2018-11-28 19:56 ` Ken Mankoff
  2018-11-29  8:55 ` Richard Lawrence
  0 siblings, 2 replies; 4+ messages in thread
From: William Denton @ 2018-11-28 19:42 UTC (permalink / raw)
  To: emacs-orgmode

By default the LaTeX export uses the article class, and headline levels are 
mapped to headings this way:  top level becomes section, second level becomes 
subsection, third level becomes subsubsection.  That's simple and works very 
well.

If the book class is used, then the top level becomes part, the second level 
becomes chapter, the third level becomes section, the fourth level becomes 
subsection, etc.  That works well too, of course, but what if I don't want to 
use "part"?

Is there a way, exporting as a book, to make Org skip "part" and make a 
top-level Org headline turn into a chapter?  Is there a built-in way, or do I 
need to make my own class in org-latex-classes that has the structure I want?

(In LaTeX the problem doesn't arise, of course:  don't use \part{} and just 
start with \chapter{}.)

Bill
--
William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: http://ghg.earth/
Caveat lector.                      ---   STAPLR: http://staplr.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In LaTeX export, can I control what heading type a headline goes to?
  2018-11-28 19:42 In LaTeX export, can I control what heading type a headline goes to? William Denton
@ 2018-11-28 19:56 ` Ken Mankoff
  2018-11-28 21:19   ` Diego Zamboni
  2018-11-29  8:55 ` Richard Lawrence
  1 sibling, 1 reply; 4+ messages in thread
From: Ken Mankoff @ 2018-11-28 19:56 UTC (permalink / raw)
  To: William Denton; +Cc: emacs-orgmode

Hi Bill,
On 2018-11-28 at 20:42 +0100, William Denton <wtd@pobox.com> wrote:
> Is there a way, exporting as a book, to make Org skip "part" and make
> a top-level Org headline turn into a chapter? Is there a built-in way,
> or do I need to make my own class in org-latex-classes that has the
> structure I want?

What about customizing org-latex-classes?

It contains:

 ("book" "\\documentclass[11pt]{book}"
  ("\\part{%s}" . "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}")
  ("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))

Seems like modifying that could provide the behavior you're looking for.

  -k.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In LaTeX export, can I control what heading type a headline goes to?
  2018-11-28 19:56 ` Ken Mankoff
@ 2018-11-28 21:19   ` Diego Zamboni
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Zamboni @ 2018-11-28 21:19 UTC (permalink / raw)
  To: mankoff; +Cc: wtd, Org-mode

[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]

Exactly what Ken said. Look at the documentation for org-latex-classes to
see the full description. You can see an example in my Emacs config:
https://github.com/zzamboni/dot-emacs/blob/master/init.org#various-exporters
(look
for the paragraph that starts with "Some customizations for the LaTeX
exporter"). Once that is defined, you can specify the name you used as the
value of "#+latex_class:" at the top of your org file, e.g.:

#+latex_class: book-no-parts

Best,
--Diego


On Wed, Nov 28, 2018 at 8:57 PM Ken Mankoff <mankoff@gmail.com> wrote:

> Hi Bill,
> On 2018-11-28 at 20:42 +0100, William Denton <wtd@pobox.com> wrote:
> > Is there a way, exporting as a book, to make Org skip "part" and make
> > a top-level Org headline turn into a chapter? Is there a built-in way,
> > or do I need to make my own class in org-latex-classes that has the
> > structure I want?
>
> What about customizing org-latex-classes?
>
> It contains:
>
>  ("book" "\\documentclass[11pt]{book}"
>   ("\\part{%s}" . "\\part*{%s}")
>   ("\\chapter{%s}" . "\\chapter*{%s}")
>   ("\\section{%s}" . "\\section*{%s}")
>   ("\\subsection{%s}" . "\\subsection*{%s}")
>   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))
>
> Seems like modifying that could provide the behavior you're looking for.
>
>   -k.
>
>

[-- Attachment #2: Type: text/html, Size: 2104 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: In LaTeX export, can I control what heading type a headline goes to?
  2018-11-28 19:42 In LaTeX export, can I control what heading type a headline goes to? William Denton
  2018-11-28 19:56 ` Ken Mankoff
@ 2018-11-29  8:55 ` Richard Lawrence
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Lawrence @ 2018-11-29  8:55 UTC (permalink / raw)
  To: William Denton, emacs-orgmode

Hi Bill,

William Denton <wtd@pobox.com> writes:

> Is there a way, exporting as a book, to make Org skip "part" and make a 
> top-level Org headline turn into a chapter?  Is there a built-in way, or do I 
> need to make my own class in org-latex-classes that has the structure I want?

Another simple solution that doesn't require changing the default
configuration is: just don't use top level headlines in your document!
I don't think Org will care if your highest-level headlines start with "**".

That may or may not work for your particular situation, but it seems
like a good option to keep in mind!

-- 
Best,
Richard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-11-29  8:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-28 19:42 In LaTeX export, can I control what heading type a headline goes to? William Denton
2018-11-28 19:56 ` Ken Mankoff
2018-11-28 21:19   ` Diego Zamboni
2018-11-29  8:55 ` Richard Lawrence

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.