[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ignore, skip, omit headline when exporting to LaTeX

From: Ihor Radchenko
Subject: Re: Ignore, skip, omit headline when exporting to LaTeX
Date: Fri, 08 Jul 2022 13:04:29 +0800

edgar@openmail.cc writes:

> Firstly, do tell me if I am breaking the nettiquete.

This is on topic and can be useful for others without knowing the
context of the mentioned discussion. So, there should be no issue with
posting this here, especially if you provide sufficient context.

> I found someone asking online how to ignore a headline when exporting  
> to LaTeX. This e-mail is to avoid creating an account on that forum  
> and to provide a solution.
> (require 'ox-extra)
>    (defun org-export-ignore-headlines-latex (data backend info)
>      "Hack of `org-export-ignore-headlines' for LaTeX: add a  
> conditional for the latex backend and replace 'ignore' with 'ignoreltx'"
>      (when (org-export-derived-backend-p backend 'latex)
>        (org-element-map data 'headline
>          (lambda (object)
>            (when (member "ignoreltx" (org-element-property :tags object))
> ...
>              (org-element-extract-element object)))
>          info nil)
>        data))

Note that this modified version of the function is derived from
org-export-ignore-headlines from ox-extra.el [1]
However, a part of the original function code is omitted.
AFAIU, this version also discards the headline contents, in addition to
the headline itself (unlike what org-export-ignore-headlines does).

Note that discarding headline + contents is also supported using

[1] https://git.sr.ht/~bzg/org-contrib


reply via email to

[Prev in Thread] Current Thread [Next in Thread]