On 24 February 2015 at 17:56, skillzero <[email protected]> wrote:
> Thanks for looking into it. I checked out the asciidoc source and I thought
> it might be easy to fix, but it seems to expand the tabs before parsing the
> file so by the time it reads the tabsize attribute, it's too late.

Sorry yes I should have said that the reader object expands tabs
during reading, if tabsize is >0 they are never seen by the processing
phase of asciidoc.

Cheers
Lex

>
> On Monday, February 23, 2015 at 8:08:23 PM UTC-8, Lex Trotman wrote:
>>
>> Seems that tabsize is not really a normal attribute in asciidoc, it
>> only works if its in a config file or on the command line.  So you
>> need to set it in a custom conf file as per
>> http://asciidoc.org/userguide.html#_miscellaneous_section.
>>
>> asciidoctor seems to accept :tabsize: 4 anywhere.
>>
>> Cheers
>> Lex
>>
>> PS For those wanting the gory details, perhaps for trying to fix it.
>> The reader object uses its tabsize (Python) attribute that is set when
>> the object is initialised, not the entry in the attributes dict.  The
>> reader object is created after command line attributes and system conf
>> files are read but before the doc is read (well its needed to read the
>> doc :) so changes to the attribute won't affect it from then on.
>> Since a new reader object is created for include files, they can have
>> the tabsize changed as the manual describes.
>>
>> On 24 February 2015 at 13:40, skillzero <[email protected]> wrote:
>> > That didn't seem to work either.
>> >
>> > On Monday, February 23, 2015 at 4:42:21 PM UTC-8, Lex Trotman wrote:
>> >>
>> >> its a configuration entry, try :miscellaneous.tabsize: 4
>> >>
>> >> Cheers
>> >> Lex
>> >>
>> >> On 24 February 2015 at 11:24, skillzero <[email protected]> wrote:
>> >> > I tried that and it didn't seem to work. I'm using asciidoc 8.6.8.
>> >> >
>> >> > On Monday, February 23, 2015 at 11:31:27 AM UTC-8, Dan Allen wrote:
>> >> >>
>> >> >> The correct syntax is
>> >> >>
>> >> >> :tabsize: 4
>> >> >>
>> >> >> If memory serves me correctly, that should work, but I haven't
>> >> >> verified
>> >> >> it.
>> >> >>
>> >> >> -Dan
>> >> >>
>> >> >> On Mon, Feb 23, 2015 at 9:56 AM, skillzero <[email protected]>
>> >> >> wrote:
>> >> >>>
>> >> >>> Is there a way to configure the tab size within the content of an
>> >> >>> asciidoc document? I'd like my files to be self-contained so they
>> >> >>> don't
>> >> >>> require -a options on the command line or separate configuration
>> >> >>> files. Some
>> >> >>> attributes, such as "toc" and "numbered" seem to work, but
>> >> >>> "tabsize"
>> >> >>> doesn't. For example:
>> >> >>>
>> >> >>> My Document
>> >> >>> ===========
>> >> >>> :numbered:
>> >> >>> :tabsize=4:
>> >> >>> :toc:
>> >> >>>
>> >> >>> The resulting file has sections numbered and a TOC, but the tabsize
>> >> >>> is
>> >> >>> still 8.
>> >> >>>
>> >> >>> --
>> >> >>> You received this message because you are subscribed to the Google
>> >> >>> Groups
>> >> >>> "asciidoc" group.
>> >> >>> To unsubscribe from this group and stop receiving emails from it,
>> >> >>> send
>> >> >>> an
>> >> >>> email to [email protected].
>> >> >>> To post to this group, send email to [email protected].
>> >> >>> Visit this group at http://groups.google.com/group/asciidoc.
>> >> >>> For more options, visit https://groups.google.com/d/optout.
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Dan Allen | http://google.com/profiles/dan.j.allen
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups
>> >> > "asciidoc" group.
>> >> > To unsubscribe from this group and stop receiving emails from it,
>> >> > send
>> >> > an
>> >> > email to [email protected].
>> >> > To post to this group, send email to [email protected].
>> >> > Visit this group at http://groups.google.com/group/asciidoc.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "asciidoc" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to [email protected].
>> > To post to this group, send email to [email protected].
>> > Visit this group at http://groups.google.com/group/asciidoc.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/asciidoc.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/asciidoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to