public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* HTML Header Numbering
@ 2019-12-19 23:58 Gerard O'Keefe
       [not found] ` <f5284276-9b28-4eac-87a2-54713536b69f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Gerard O'Keefe @ 2019-12-19 23:58 UTC (permalink / raw)
  To: pandoc-discuss

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

This may be a simple question but I've been searching and testing for days 
and can't figure it out.

When converting from markdown to html, is it possible to have h1, h2, and 
h3 headers numbered, but leave h4, h5 and h6 headers unnumbered without 
specifically tagging each lower level header with {.unnumbered} or {-}?

-- 
If you have received this email in error, please let me know by return 
email so I can make sure it doesn't happen again. Because emails can 
contain confidential and privileged material, I'd ask for your help by 
deleting it and any attachments. Thanks!


We like to keep people up to 
date with information about new products and services at ATB or changes 
that could affect you. You can check out more about ATB and CASL at 
http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx 
<http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx> 



If you would like to unsubscribe from our updates, please use this URL - 
http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx 
<http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx>

-- 
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/f5284276-9b28-4eac-87a2-54713536b69f%40googlegroups.com.

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

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

* Re: HTML Header Numbering
       [not found] ` <f5284276-9b28-4eac-87a2-54713536b69f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-12-20  0:47   ` John MacFarlane
       [not found]     ` <yh480kr20zyg9m.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: John MacFarlane @ 2019-12-20  0:47 UTC (permalink / raw)
  To: Gerard O'Keefe, pandoc-discuss


This is a feature that has been requested, e.g.
https://github.com/jgm/pandoc/issues/3552

AS noted there, you can use a filter to add the 'unnumbered'
classes automatically.  A lua filter that does this
would look like this:

```
function Header(el)
  if el.level >= 4 then
    table.insert(el.attr.classes,"unnumbered")
    return el
  end
end
```


Gerard O'Keefe <gokeefe-caZgAziG89s@public.gmane.org> writes:

> This may be a simple question but I've been searching and testing for days 
> and can't figure it out.
>
> When converting from markdown to html, is it possible to have h1, h2, and 
> h3 headers numbered, but leave h4, h5 and h6 headers unnumbered without 
> specifically tagging each lower level header with {.unnumbered} or {-}?
>
> -- 
> If you have received this email in error, please let me know by return 
> email so I can make sure it doesn't happen again. Because emails can 
> contain confidential and privileged material, I'd ask for your help by 
> deleting it and any attachments. Thanks!
>
>
> We like to keep people up to 
> date with information about new products and services at ATB or changes 
> that could affect you. You can check out more about ATB and CASL at 
> http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx 
> <http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx> 
>
>
>
> If you would like to unsubscribe from our updates, please use this URL - 
> http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx 
> <http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx>
>
> -- 
> 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/f5284276-9b28-4eac-87a2-54713536b69f%40googlegroups.com.

-- 
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/yh480kr20zyg9m.fsf%40johnmacfarlane.net.


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

* Re: HTML Header Numbering
       [not found]     ` <yh480kr20zyg9m.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2019-12-20  1:01       ` Gerard O'Keefe
  0 siblings, 0 replies; 3+ messages in thread
From: Gerard O'Keefe @ 2019-12-20  1:01 UTC (permalink / raw)
  To: pandoc-discuss

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

I may have to look into how to implement an lua filter, but the CSS 
workaround 
at https://github.com/jgm/pandoc/issues/3552#issuecomment-291070328 was 
easy to implement and worked perfectly for now.

Thanks!

On Thursday, 19 December 2019 17:47:49 UTC-7, John MacFarlane wrote:
>
>
> This is a feature that has been requested, e.g. 
> https://github.com/jgm/pandoc/issues/3552 
>
> AS noted there, you can use a filter to add the 'unnumbered' 
> classes automatically.  A lua filter that does this 
> would look like this: 
>
> ``` 
> function Header(el) 
>   if el.level >= 4 then 
>     table.insert(el.attr.classes,"unnumbered") 
>     return el 
>   end 
> end 
> ``` 
>
>
-- 
If you have received this email in error, please let me know by return 
email so I can make sure it doesn't happen again. Because emails can 
contain confidential and privileged material, I'd ask for your help by 
deleting it and any attachments. Thanks!


We like to keep people up to 
date with information about new products and services at ATB or changes 
that could affect you. You can check out more about ATB and CASL at 
http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx 
<http://www.atb.com/important-information/privacy-security/Pages/ATB-and-CASL.aspx> 



If you would like to unsubscribe from our updates, please use this URL - 
http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx 
<http://www.atb.com/important-information/privacy-security/Pages/unsubscribe.aspx>

-- 
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/2113cf69-cd16-4739-9525-2be274818c94%40googlegroups.com.

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

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

end of thread, other threads:[~2019-12-20  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 23:58 HTML Header Numbering Gerard O'Keefe
     [not found] ` <f5284276-9b28-4eac-87a2-54713536b69f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-12-20  0:47   ` John MacFarlane
     [not found]     ` <yh480kr20zyg9m.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2019-12-20  1:01       ` Gerard O'Keefe

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