From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: scrlttr2 class and org-mode Date: Wed, 13 Mar 2019 09:55:18 +0100 Message-ID: References: <874l887ygf.fsf@gmail.com> <878sxjair9.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000bbb9570583f5f7eb" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:46981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zfh-0003Ij-5p for emacs-orgmode@gnu.org; Wed, 13 Mar 2019 04:55:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zfg-0000pk-2Y for emacs-orgmode@gnu.org; Wed, 13 Mar 2019 04:55:33 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]:39282) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zff-0000ot-LI for emacs-orgmode@gnu.org; Wed, 13 Mar 2019 04:55:32 -0400 Received: by mail-lj1-x229.google.com with SMTP id y9so520629ljk.6 for ; Wed, 13 Mar 2019 01:55:31 -0700 (PDT) In-Reply-To: <878sxjair9.fsf@alphaville.usersys.redhat.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nick Dokos Cc: "Liste-emacs-orgmode@gnu.org" --000000000000bbb9570583f5f7eb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Many thanks Nick for this help. I am going to inspect my user.el file, in order to correct it, and I will inform you about the result. Best wishes, Jo. Le mar. 12 mars 2019 =C3=A0 22:34, Nick Dokos a =C3=A9cr= it : > Joseph Vidal-Rosset writes: > > > ... > > it is also possible to get sections in a > > letter with scrlttr2 class. Nevertheless, I have to write the latex cod= e > > \section{} and I ignore how getting sections via org-mode for thi= s > > class. Is it possible to get an org-mode translation for section in thi= s > > class? > > > > C-h v org-latex-classes RET > > Briefly, you need to add a new element to it, describing what you want or= g > to do with this class. > > Here's a snippet from my init file that adds two latex classes to this > variable. Hope this makes the process clear: > > --8<---------------cut here---------------start------------->8--- > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;= ;; > ;;; latex export > (setq revtex-class > '("revtex" "\\documentclass[11pt]{revtex4-1}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) > > (setq koma-article-class > '("koma-article" "\\documentclass[11pt]{scrartcl}" > ("\\section{%s}" . "\\section*{%s}") > ("\\subsection{%s}" . "\\subsection*{%s}") > ("\\subsubsection{%s}" . "\\subsubsection*{%s}") > ("\\paragraph{%s}" . "\\paragraph*{%s}") > ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) > > (progn > (require 'ox-latex) > (add-to-list 'org-latex-classes revtex-class t) > (add-to-list 'org-latex-classes koma-article-class t))) > --8<---------------cut here---------------end--------------->8--- > > -- > Nick > > "There are only two hard problems in computer science: cache > invalidation, naming things, and off-by-one errors." -Martin Fowler > > > --000000000000bbb9570583f5f7eb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Many thanks Nick for this help. I am going= to inspect my user.el file, in order to correct it, and I will inform you = about the result.

Best wishe= s,

Jo.

Le= =C2=A0mar. 12 mars 2019 =C3=A0=C2=A022:34, Nick Dokos <ndokos@gmail.com> a =C3=A9crit=C2=A0:
Joseph Vidal-Rosset <joseph.vida= l.rosset@gmail.com> writes:

> ...
> it=C2=A0 is also=C2=A0 possible to=C2=A0 get sections=C2=A0 in a
> letter with scrlttr2 class. Nevertheless, I have to write the latex co= de
> \section{}=C2=A0 and I=C2=A0 ignore how=C2=A0 getting=C2=A0 sections v= ia=C2=A0 org-mode for=C2=A0 this
> class. Is it possible to get an org-mode translation for section in th= is
> class?
>

C-h v org-latex-classes RET

Briefly, you need to add a new element to it, describing what you want org<= br> to do with this class.

Here's a snippet from my init file that adds two latex classes to this<= br> variable. Hope this makes the process clear:

--8<---------------cut here---------------start------------->8---
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=
;;; latex export
(setq revtex-class
=C2=A0 =C2=A0 =C2=A0 '("revtex" "\\documentclass[11pt]{r= evtex4-1}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\section{%s}" . "\\section*{%= s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subsection{%s}" . "\\subsect= ion*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subsubsection{%s}" . "\\subs= ubsection*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\paragraph{%s}" . "\\paragrap= h*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subparagraph{%s}" . "\\subpa= ragraph*{%s}")))

(setq koma-article-class
=C2=A0 =C2=A0 =C2=A0 '("koma-article" "\\documentclass[1= 1pt]{scrartcl}"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\section{%s}" . "\\section*{%= s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subsection{%s}" . "\\subsect= ion*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subsubsection{%s}" . "\\subs= ubsection*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\paragraph{%s}" . "\\paragrap= h*{%s}")
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ("\\subparagraph{%s}" . "\\subpa= ragraph*{%s}")))

(progn
=C2=A0 =C2=A0 (require 'ox-latex)
=C2=A0 =C2=A0 (add-to-list 'org-latex-classes revtex-class t)
=C2=A0 =C2=A0 (add-to-list 'org-latex-classes koma-article-class t))) --8<---------------cut here---------------end--------------->8---

--
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler

--000000000000bbb9570583f5f7eb--