can I get help?
I tested a lot but still can't find a solution...

basically asciidoc manual described a method of "combining the document":
http://www.methods.co.nz/asciidoc/userguide.html#X90
using leveloffset + include macro.

on the other hand, sometime I think it's useful to do the other way around: to "checkout" a chapter, and generate a standard HTML file for a range of text blocks out of a big file.

************************* the problem:

my asciidoc file content:

//file: temp111.txt
//asciidoc -a toc -a toclevels=10 -a leveloffset=-4 temp111.txt
===== topic1
Ping Sandy <[email protected]>
:toc-title: agenda
:toclevels: 7
:leveloffset: -4

====== sub-topic1
text

======= sub-topic11
text

====== sub-topic2
text

======= sub-topic21
text


why this doesn't work? shouldn't the "toclevels" extend the levels already (and my understanding that's why following works)?

//this works
//file: temp111.txt
//asciidoc -a toc -a toclevels=10 -a leveloffset=-2 temp111.txt
=== topic1
Ping Sandy <[email protected]>
:toc-title: agenda
:toclevels: 7
:leveloffset: -2

==== sub-topic1
text

===== sub-topic11
text

==== sub-topic2
text

===== sub-topic21
text


this can be quickly seen in web asciidoc:
http://andrewk.webfactional.com/asciidoc.php?


//and this looks also works
= level1
Ping Sandy <[email protected]
:toc-title: agenda
:toclevels: 7
:leveloffset: -4

== level2
text

=== topic1

==== sub-topic1
text

===== sub-topic11
text

==== sub-topic2
text

===== sub-topic21
text

I'm not sure this out to be the issue of "how to extend toclevels from max 4 to higher level".


I modified /etc/asciidoc/asciidoc.conf, and added more levels:

[titles]
subs=specialcharacters,quotes,replacements,macros,attributes,replacements2
# Double-line title pattern and underlines.
sectiontitle=^(?P<title>.*?)$
underlines="==","--","~~","^^","++"
# Single-line title patterns.
sect0=^= +(?P<title>[\S].*?)( +=)?$
sect1=^== +(?P<title>[\S].*?)( +==)?$
sect2=^=== +(?P<title>[\S].*?)( +===)?$
sect3=^==== +(?P<title>[\S].*?)( +====)?$
sect4=^===== +(?P<title>[\S].*?)( +=====)?$



#I added more levels here
sect5=^====== +(?P<title>[\S].*?)( +======)?$
sect6=^======= +(?P<title>[\S].*?)( +=======)?$
sect7=^======== +(?P<title>[\S].*?)( +========)?$
sect8=^========= +(?P<title>[\S].*?)( +=========)?$
blocktitle=^\.(?P<title>([^.\s].*)|(\.[^.\s].*))$

still no luck...
how to support more levels than 4?

regards
ping


On 10/27/12 1:13 PM, ping wrote:
I'm enjoying the power of vim + asciidoc using the method described
below, specifically I can "check out" portion of my docs in a huge doc
into HTML including TOC, just like saving the portion of texts into a
seperate asciidoc text file...

but today I just found that this magic "leveloffset" attribute , doesn't
work if the title level increase to like 5.

here is an example of how I test it

//so this works fine:
<---vim mark a

=== topic1
Ping Sandy <[email protected]>
:toc-title: agenda


==== sub-topic1
==== sub-topic2

<---vim mark b

:'a,'bw !asciidoc -o chapter1.html -a leveloffset=-2 -


//this doesn't work

<---vim mark a

ē

<---vim mark b

:'a,'bw !asciidoc -a toclevels=7 -o chapter1.html -a leveloffset=-4 -


currently I workaround it by de-indent the title level and make it
smaller, then it work...
please advice...thanks!


On 10/1/2012 3:13 PM, ping wrote:
please ignore...this was an old email in my draft \, after more test,
I got this solved this morning via:

:'a,'bw !asciidoc -o chapter1.html -a leveloffset=-2 -


On 10/01/2012 03:12 PM, ping wrote:
while studying the manual I'm trying to understand attribute:
leveloffset, which looks quite useful.
I'm thinking of one of the scenarios: in a large document, I can
"checkout" a smaller part of it , say a chapter. especially in VIM,
where I can just call external asciidoc command to convert the selected
portion into HTML, on the fly:

:'a,'bw !asciidoc -o chapter1.html -

having said that, I would like to have this as my chapter in the "big"
book file:

<---vim mark a

=== topic1
Ping Sandy <[email protected]>
:toc-title: agenda
:leveloffset: -2

==== sub-topic1
==== sub-topic2

<---vim mark b


but looks this doesn't work as expected, I guess "leveloffset" only
support positive value?


thanks

regards
ping


--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
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.

Reply via email to