From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Cubizolles Subject: remove directory structure in latex export Date: Sat, 12 Jul 2014 15:34:21 +0200 Message-ID: <87mwcevgyq.fsf@free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5xsO-0003Et-DU for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 10:02:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5xsH-0006ax-OK for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 10:02:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:55696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5xsH-0006aa-Hi for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 10:02:01 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X5xsF-0000XK-SA for emacs-orgmode@gnu.org; Sat, 12 Jul 2014 16:01:59 +0200 Received: from 37.162.84.191 ([37.162.84.191]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Jul 2014 16:01:59 +0200 Received: from j.cubizolles by 37.162.84.191 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 12 Jul 2014 16:01:59 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org When exporting an Org file to LaTeX, I'd like to be able to remove all headings with levels inferior to the ones explicitly selected with a select-tag. In the following example, I'd like the LaTeX file to include only the "Puissance des force de Laplace sur un moment magnétique" heading, not the "Cas d'un moment magnétique", "Puissance et énergie potentielle"... I've tried playing with :headline-levels so that all headings get translated as section, subsection, subsubsection and redefining the \section,\subsection,\subsubsection commands in the LaTeX class to \relax but for some reason, the third level still gets translated as an enumerate list. Julien. --8<---------------cut here---------------start------------->8--- #+begin_src emacs-lisp :tangle yes :exports none (setq org-publish-project-alist '( ("beamer" :base-directory "./" :publishing-directory "./" :publishing-function org-beamer-publish-to-pdf :exclude ".*" :latex-class "mpsi_beamer" :include ("reglages.org") :completion-function jc-org-publish-rename-beamer-pdf) ("eleves" :base-directory "./" :publishing-directory "./" :publishing-function org-latex-publish-to-pdf :exclude ".*" :latex-class "mpsi" :include ("reglages.org") :select-tags ("eleves") :headline-levels "10" :completion-function jc-org-publish-rename-eleves-pdf ) )) #+end_src #+RESULTS: | beamer | :base-directory | ./ | :publishing-directory | ./ | :publishing-function | org-beamer-publish-to-pdf | :exclude | .* | :latex-class | mpsi_beamer | :include | (reglages.org) | :completion-function | jc-org-publish-rename-beamer-pdf | | | | | | eleves | :base-directory | ./ | :publishing-directory | ./ | :publishing-function | org-latex-publish-to-pdf | :exclude | .* | :latex-class | mpsi | :include | (reglages.org) | :select-tags | (eleves) | :headline-levels | 10 | :completion-function | jc-org-publish-rename-eleves-pdf | #+TAGS: eleves * Cas d'un moment magnétique ** Puissance et énergie potentielle *** Puissance des forces de Laplace **** Puissance des force de Laplace sur un moment magnétique :eleves: La puissance des forces de Laplace subies par un moment magnétique plongé dans un champ magnétique et en rotation autour d'un axe \(\Delta\) est: #+BEGIN_LaTeX \begin{equation*} - m_\perp B_\perp \sin(\theta) \dot{\theta}. \end{equation*} #+END_LaTeX --8<---------------cut here---------------end--------------->8---