[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about string-match and match-string
From: |
Julien Cubizolles |
Subject: |
Re: Question about string-match and match-string |
Date: |
Sat, 20 Jul 2013 17:26:49 +0200 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) |
Rasmus <rasmus@gmx.us> writes:
> (with-eval-after-load 'ox
> (defun rasmus/org-latex-ignore-heading (headline backend info)
> "Strip headline from HEADLINE if it has tag ignoreheading for
> certain headlines. `info' is ignored"
> (when (and (org-export-derived-backend-p backend 'latex 'html 'ascii 'odt)
> (string-match "\\`.*ignoreheading.*\n"
> (downcase headline)))
> (replace-match "" nil nil headline)))
>
> (add-to-list 'org-export-filter-headline-functions
> 'rasmus/org-latex-ignore-heading))
It's working, thanks, but it's ignored if you use tags:nil option (which
is pretty common I guess). Consider the following
--8<---------------cut here---------------start------------->8---
#+TITLE: Titre
* First Heading :tag:
blablabla
* Second Heading :ignoreheading:
blablabla
--8<---------------cut here---------------end--------------->8---
The second heading is omitted and its text is present, just like I want
it. However, you get an (in my opinion) ugly \textsc{tag} in the first
heading (\section{First Heading\hfill{}\textsc{tag}})
If however you use
--8<---------------cut here---------------start------------->8---
#+TITLE: Titre
#+OPTIONS: tags:nil
* First Heading :tag:
blablabla
* Second Heading :ignoreheading:
blablabla
--8<---------------cut here---------------end--------------->8---
Both the first and second heading are displayed (not what I want).
Finally, something weird with the title: if you don't define it with de
#+TITLE, it's set to name_of_thefile$_{\text{ignoreheading}}$...
Julien.
- Question about string-match and match-string, Suvayu Ali, 2013/07/17
- Re: Question about string-match and match-string, Suvayu Ali, 2013/07/17
- Re: Question about string-match and match-string, Rasmus, 2013/07/17
- Re: Question about string-match and match-string, Suvayu Ali, 2013/07/17
- Re: Question about string-match and match-string, Julien Cubizolles, 2013/07/18
- Re: Question about string-match and match-string, Rasmus, 2013/07/18
- Re: Question about string-match and match-string,
Julien Cubizolles <=
- Re: Question about string-match and match-string, Rasmus, 2013/07/20
- Re: Question about string-match and match-string, Rasmus, 2013/07/20
- Re: Question about string-match and match-string, Julien Cubizolles, 2013/07/21
Re: Question about string-match and match-string, Nicolas Richard, 2013/07/17