Consider the following asciidoc code:
.Code source
["source","java","numbered","8",args="--line-range=1-4"]
----
include::./Main-extrait.java[]
----
["source","java","unnumbered","8",args="--line-range=4-"]
----
include::./Main-extrait.java[]
----
The second listing with the unnumbered argument should be printed
without line numbers. It is always printed with line numbers.
Solution :
replace all
src_numbered?
with
src_numbered@numbered:
in the following files:
/etc/asciidoc/filters/source/source-highlight-filter.conf
/etc/asciidoc/backends/odt/odt.conf
/etc/asciidoc/backends/odp/odp.conf
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/asciidoc/-/Ccz9ZyCCM3AJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
--- source-highlight-filter.conf 2012-11-27 18:32:42.478920072 +0000
+++ source-highlight-filter.conf.bak 2012-11-27 17:43:51.895056963 +0000
@@ -52,14 +52,14 @@
# Source styles template.
ifdef::basebackend-html[]
[source-filter-style]
-ifndef::pygments[source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml -s {language} {src_numbered@numbered:--line-number} {src_tab?--tab={src_tab}} {args=}"]
-ifdef::pygments[source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered@numbered:-O linenos=table} {encoding?-O encoding={encoding}} {args=}"]
+ifndef::pygments[source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f xhtml -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}} {args=}"]
+ifdef::pygments[source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered?-O linenos=table} {encoding?-O encoding={encoding}} {args=}"]
endif::basebackend-html[]
ifdef::basebackend-html4[]
[source-filter-style]
# html4 does not use pygments.
-source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html -s {language} {src_numbered@numbered:--line-number} {src_tab?--tab={src_tab}} {args=}"
+source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight -f html -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}} {args=}"
endif::basebackend-html4[]
ifdef::basebackend-docbook[]
@@ -101,7 +101,7 @@
ifndef::basebackend-docbook[]
postsubs=callouts
# GNU Source Highlight filter.
-filter=source-highlight -f {basebackend-xhtml11?xhtml}{basebackend-html4?html} -s {language} {src_numbered@numbered:--line-number} {src_tab?--tab={src_tab}}
+filter=source-highlight -f {basebackend-xhtml11?xhtml}{basebackend-html4?html} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}}
endif::basebackend-docbook[]
ifdef::basebackend-docbook[]