* Bug in syntax-highlighting? - pandoc 2.10.1 @ 2020-10-02 21:03 'Karl Weber' via pandoc-discuss [not found] ` <fa5cd959-e9e4-46a5-b493-0600977c7388o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: 'Karl Weber' via pandoc-discuss @ 2020-10-02 21:03 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1463 bytes --] Hi, I try to use my own syntax-lighting with pandoc and target format HTML. Coloring works, so far as I have tested it. However, the anchors don't work as expected from the documentation. For one, the doc says: The numberLines (or number-lines) class will cause the lines of the code block to be numbered, starting with 1 or the value of the startFrom attribute This also works as described. In particular: no class numberLines means no numbers. The doc also says: The lineAnchors (or line-anchors) class will cause the lines to be clickable anchors in HTML output. This does not work, as I understand it. pandoc always produces anchors, independent of whether the class lineAnchors is present of absent. To me, this is a nuisance, because I do not want anchors. Is there a way to prevent pandoc from creating anchors or is this a bug? Note: pandoc will always create anchors, even without line numbers. Even this is ugly, because my browser -- firefox -- shows selectable dots at the beginning of each line. Thanks in advance Karl -- 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/fa5cd959-e9e4-46a5-b493-0600977c7388o%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 2287 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <fa5cd959-e9e4-46a5-b493-0600977c7388o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>]
* Re: Bug in syntax-highlighting? - pandoc 2.10.1 [not found] ` <fa5cd959-e9e4-46a5-b493-0600977c7388o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> @ 2020-10-02 21:19 ` Albert Krewinkel [not found] ` <87blhkjpfo.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> 2020-10-02 21:52 ` John MacFarlane 1 sibling, 1 reply; 4+ messages in thread From: Albert Krewinkel @ 2020-10-02 21:19 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw As a workaround, you can use the following CSS to hide the anchors: <style> pre > code.sourceCode a { display: none; } </style> 'Karl Weber' via pandoc-discuss writes: > Hi, > > I try to use my own syntax-lighting with pandoc and target format HTML. > > Coloring works, so far as I have tested it. However, the anchors don't work > as expected from the documentation. > > For one, the doc says: > > The numberLines (or number-lines) class will cause the lines of the code > block to be numbered, starting with 1 or the value of the startFrom > attribute > > This also works as described. In particular: no class numberLines means no > numbers. > > The doc also says: > > The lineAnchors (or line-anchors) class will cause the lines to be > clickable anchors in HTML output. > > This does not work, as I understand it. pandoc always produces anchors, > independent of whether the class lineAnchors is present of absent. To me, > this is a nuisance, because I do not want anchors. Is there a way to > prevent pandoc from creating anchors or is this a bug? > > Note: pandoc will always create anchors, even without line numbers. Even > this is ugly, because my browser -- firefox -- shows selectable dots at the > beginning of each line. > > Thanks in advance > Karl -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <87blhkjpfo.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>]
* Re: Bug in syntax-highlighting? - pandoc 2.10.1 [not found] ` <87blhkjpfo.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> @ 2020-10-04 8:22 ` 'Karl Weber' via pandoc-discuss 0 siblings, 0 replies; 4+ messages in thread From: 'Karl Weber' via pandoc-discuss @ 2020-10-04 8:22 UTC (permalink / raw) To: pandoc-discuss [-- Attachment #1.1: Type: text/plain, Size: 1248 bytes --] Hi Albert, thanks for your answer. Albert Krewinkel schrieb am Freitag, 2. Oktober 2020 um 23:20:04 UTC+2: > As a workaround, you can use the following CSS to hide the anchors: > > <style> > pre > code.sourceCode a { > display: none; > } > </style> > This would only help with empty anchors, however not in case I am also using line numbers (which I occasionally do in code blocks). However, it is pointing into the right direction. The css pandoc is inserting through the variable $highlighting-css$ is colliding with my own css in other respects, so I will remove it from the template altogether and adjust my own css. As long as I am only dealing with target format html, this will even save me from the need to define my own themes file. The latter would only be an indirect way to specify the css. Regards Karl -- 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/eeb909ea-f230-4527-8013-6f3aef4efe23n%40googlegroups.com. [-- Attachment #1.2: Type: text/html, Size: 1942 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bug in syntax-highlighting? - pandoc 2.10.1 [not found] ` <fa5cd959-e9e4-46a5-b493-0600977c7388o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2020-10-02 21:19 ` Albert Krewinkel @ 2020-10-02 21:52 ` John MacFarlane 1 sibling, 0 replies; 4+ messages in thread From: John MacFarlane @ 2020-10-02 21:52 UTC (permalink / raw) To: 'Karl Weber' via pandoc-discuss, pandoc-discuss My assumption was that empty anchors are invisible and harmless. I did not know that some browsers display them as dots. It seems like non-standard behavior -- do any other browsers do this? "'Karl Weber' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> writes: > Hi, > > I try to use my own syntax-lighting with pandoc and target format HTML. > > Coloring works, so far as I have tested it. However, the anchors don't work > as expected from the documentation. > > For one, the doc says: > > The numberLines (or number-lines) class will cause the lines of the code > block to be numbered, starting with 1 or the value of the startFrom > attribute > > This also works as described. In particular: no class numberLines means no > numbers. > > The doc also says: > > The lineAnchors (or line-anchors) class will cause the lines to be > clickable anchors in HTML output. > > This does not work, as I understand it. pandoc always produces anchors, > independent of whether the class lineAnchors is present of absent. To me, > this is a nuisance, because I do not want anchors. Is there a way to > prevent pandoc from creating anchors or is this a bug? > > Note: pandoc will always create anchors, even without line numbers. Even > this is ugly, because my browser -- firefox -- shows selectable dots at the > beginning of each line. > > Thanks in advance > Karl > > -- > 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/fa5cd959-e9e4-46a5-b493-0600977c7388o%40googlegroups.com. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-04 8:22 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-02 21:03 Bug in syntax-highlighting? - pandoc 2.10.1 'Karl Weber' via pandoc-discuss [not found] ` <fa5cd959-e9e4-46a5-b493-0600977c7388o-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 2020-10-02 21:19 ` Albert Krewinkel [not found] ` <87blhkjpfo.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> 2020-10-04 8:22 ` 'Karl Weber' via pandoc-discuss 2020-10-02 21:52 ` John MacFarlane
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).