[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: alphabetical lists will not show up as such in LaTeX export [9.
From: |
Juan Manuel Macías |
Subject: |
Re: Bug: alphabetical lists will not show up as such in LaTeX export [9.3.6 (9.3.6-71-g7684b5-elpaplus @ /home/qqwy/.emacs.d/elpa/org-plus-contrib-20200518/)] |
Date: |
Fri, 05 Mar 2021 13:01:15 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
Qqwy/Wiebe-Marten <qqwy@gmx.com> writes:
> However, the LaTeX that is exported will still create normal `enumerize`
> lists that do /not/ show up as alphabetical but rather still use `1.`,
> `2.`, `3.` for numbering.
>
> I think this current behaviour is at the very least surprising, and
> possibly unintended.
I use the enumitem package
(http://mirrors.ctan.org/macros/latex/contrib/enumitem/enumitem.pdf) for
lists in LaTeX. For an alphabetical list, for example:
#+begin_src org
,#+LaTeX_Header: \usepackage{enumitem}
,#+ATTR_LaTeX: :options [label=\alph*.,widest=a]
a. Lorem
b. ipsum
c. dolor
#+end_src
And to export to LaTeX and HTML, you can define a macro like this:
#+begin_src org
,#+MACRO: alphalist (eval (if (org-export-derived-backend-p
org-export-current-backend 'latex) "#+ATTR_LaTeX: :options
[label=\\alph*.,widest=a]" "#+ATTR_HTML: :type a"))
{{{alphalist}}}
a. Lorem
b. ipsum
c. dolor'
#+end_src
Best regards,
Juan Manuel