public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Christophe Demko <chdemko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Customize list item label for latex
Date: Sun, 16 Dec 2018 05:21:27 -0800 (PST)	[thread overview]
Message-ID: <e4d2283d-f272-40b2-92fb-e5ddfa5d4ba7@googlegroups.com> (raw)
In-Reply-To: <m2tvjfcwy4.fsf-9Onoh4P/yGk@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2424 bytes --]

You can use

```
#. my item
   #. subitem
      #. subsubitem
```

which does the job (see http://pandoc.org/MANUAL.html#extension-fancy_lists)

It generates 

```
\begin{enumerate}
\tightlist
\item
  my item

  \begin{enumerate}
  \tightlist
  \item
    subitem

    \begin{enumerate}
    \tightlist
    \item
      subsubitem
    \end{enumerate}
  \end{enumerate}
\end{enumerate}
```

in LaTeX

Le samedi 15 décembre 2018 04:04:27 UTC+1, jiewuza a écrit :
>
>
> Currently, pandoc sets the label automatically according to the text 
> format. For 
> ``` 
> (1) item 
>     (a) subitem 
>          i. subsubitem 
> ``` 
>
> It generates tex: 
> ``` 
> \begin{enumerate} 
> \def\labelenumi{(\arabic{enumi})} 
> \item 
>   my item 
>
>   \begin{enumerate} 
>   \def\labelenumii{(\alph{enumii})} 
>   \tightlist 
>   \item 
>     subitem 
>
>     \begin{enumerate} 
>     \def\labelenumiii{\roman{enumiii}.} 
>     \tightlist 
>     \item 
>       subsubitem 
>     \end{enumerate} 
>   \end{enumerate} 
> \end{enumerate} 
> ``` 
>
> This is a great feature. However, sometimes it is required to match a 
> `hierarchy label format`. It is common that the format is predefined in 
> scholar paper templates, like: 
> ``` 
> \renewcommand{\theenumi}{\arabic{enumi}} 
> \renewcommand{\labelenumi}{(\theenumi)} 
> \renewcommand{\theenumii}{\alpha{enumii}} 
> \renewcommand{\labelenumii}{\theenumii} 
> \renewcommand{\theenumiii}{\roman{enumiii}} 
> \renewcommand{\labelenumiii}{(\theenumiii)} 
> ``` 
>
> And you just have to make the hierarchy right, forgetting the format 
> detail. 
>
> So I am wondering if it is worth introducing an option to disable 
> generating the 
> label according to the text, but leaving the format for user 
> customization. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e4d2283d-f272-40b2-92fb-e5ddfa5d4ba7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 3446 bytes --]

  parent reply	other threads:[~2018-12-16 13:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-15  3:04 jiewuza
2018-12-16  3:27 ` jiewuza
     [not found] ` <m2tvjfcwy4.fsf-9Onoh4P/yGk@public.gmane.org>
2018-12-16 13:21   ` Christophe Demko [this message]
2018-12-17  7:44     ` jiewuza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4d2283d-f272-40b2-92fb-e5ddfa5d4ba7@googlegroups.com \
    --to=chdemko-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).