public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* Shifting headings
@ 2022-02-07  5:29 Alan Tyree
       [not found] ` <CAGMsgMydrozeXq-UUkU_xycyWFmmhVW5d5hXaTjQha72chWMiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Tyree @ 2022-02-07  5:29 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 858 bytes --]

I have been experimenting with:

--shift-heading-level-by=N

What I am finding is that there are a couple of headings that I would like
to remain as they are. Is there anything like the .unlisted or .unnumbered
attributes that would prevent a heading from being shifted? For example:

# Heading 1{.no-shift}

Thanks for any advice, and cheers from Australia,
Alan


-- 
Alan L Tyree                    http://www2.austlii.edu.au/~alan

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAGMsgMydrozeXq-UUkU_xycyWFmmhVW5d5hXaTjQha72chWMiQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 1571 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shifting headings
       [not found] ` <CAGMsgMydrozeXq-UUkU_xycyWFmmhVW5d5hXaTjQha72chWMiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2022-02-07  7:45   ` Albert Krewinkel
       [not found]     ` <877da7cdyb.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Krewinkel @ 2022-02-07  7:45 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw; +Cc: Alan Tyree

Alan Tyree <alantyree-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Is there anything like the .unlisted or .unnumbered attributes that
> would prevent a heading from being shifted?
> For example:
> # Heading 1{.no-shift}
> Thanks for any advice, and cheers from Australia,

There's nothing like this built-in, but you could use a short Lua
filter:

    function Header (h)
      if not h.classes:includes 'no-shift' then
        h.level = h.level + 1
      end
      return h
    end

Store the code in a file and pass that file to pandoc via the
`--lua-filter` command line option.

-- 
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Shifting headings
       [not found]     ` <877da7cdyb.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
@ 2022-02-07 21:32       ` Alan Tyree
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Tyree @ 2022-02-07 21:32 UTC (permalink / raw)
  To: Albert Krewinkel; +Cc: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

Thank you, Albert. That works a treat.

I really must learn to make lua filter.
Cheers,
Alan


On Mon, 7 Feb 2022 at 18:50, Albert Krewinkel <albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
wrote:

> Alan Tyree <alantyree-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > Is there anything like the .unlisted or .unnumbered attributes that
> > would prevent a heading from being shifted?
> > For example:
> > # Heading 1{.no-shift}
> > Thanks for any advice, and cheers from Australia,
>
> There's nothing like this built-in, but you could use a short Lua
> filter:
>
>     function Header (h)
>       if not h.classes:includes 'no-shift' then
>         h.level = h.level + 1
>       end
>       return h
>     end
>
> Store the code in a file and pass that file to pandoc via the
> `--lua-filter` command line option.
>
> --
> Albert Krewinkel
> GPG: 8eed e3e2 e8c5 6f18 81fe  e836 388d c0b2 1f63 1124
>


-- 
Alan L Tyree                    http://www2.austlii.edu.au/~alan

-- 
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAGMsgMz4wD%3DYmZ_89S67sHOLHSEODJcFMZgSHXELufmb9nR9CA%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 2517 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-07 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07  5:29 Shifting headings Alan Tyree
     [not found] ` <CAGMsgMydrozeXq-UUkU_xycyWFmmhVW5d5hXaTjQha72chWMiQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-02-07  7:45   ` Albert Krewinkel
     [not found]     ` <877da7cdyb.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2022-02-07 21:32       ` Alan Tyree

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).