[asciidoc-discuss] asciidoc-8.2.0.zip contains the 8.1.0 package.

2007-04-05 Thread Miguel Farah
I've just downloaded asciidoc-8.2.0.zip, and it seems to contain the
8.1.0 version.

The .tar.gz is different, though.

-- 
Miguel Farah
[EMAIL PROTECTED]

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


[asciidoc-discuss] 8.2.0: table of contents doesn't work.

2007-04-05 Thread Miguel Farah
I downloaded the 8.2.0 version and regenerated my documents; the table
of contents isn't working in any of them.


Comparing the 8.1.0 source files with the newer 8.2.0, I THINK the
problem lies in a modification to javascripts/toc.js:

Before, there was a "window.onload = generateToc" sentence at its
beginning, and now it's not there. This piece of JavaScript source is
included in the generated documents, and since there isn't a call
anywhere in the file, the funcion generateToc(toclevels) isn't executed
at all.

Adding the missing line manually made things work again.

-- 
Miguel Farah
[EMAIL PROTECTED]

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] asciidoc-8.2.0.zip contains the 8.1.0 package.

2007-04-05 Thread Stuart Rackham
Miguel Farah wrote:
> I've just downloaded asciidoc-8.2.0.zip, and it seems to contain the
> 8.1.0 version.
> 
> The .tar.gz is different, though.
> 

I've downloaded and installed -- it's all OK. Check that you don't have 
an old copy of AsciiDoc in your path.

-- Stuart

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] 8.2.0: table of contents doesn't work.

2007-04-05 Thread Stuart Rackham
Miguel Farah wrote:
> I downloaded the 8.2.0 version and regenerated my documents; the table
> of contents isn't working in any of them.
> 
> 
> Comparing the 8.1.0 source files with the newer 8.2.0, I THINK the
> problem lies in a modification to javascripts/toc.js:
> 
> Before, there was a "window.onload = generateToc" sentence at its
> beginning, and now it's not there. This piece of JavaScript source is
> included in the generated documents, and since there isn't a call
> anywhere in the file, the funcion generateToc(toclevels) isn't executed
> at all.
> 
> Adding the missing line manually made things work again.
> 

Either there's an old version of asciidoc somewhere in your path or you 
  have customized conf files that need to be updated to include the 
above JS line.

-- Stuart

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] How to translate "Table of Contents"

2007-04-05 Thread Stuart Rackham
Miguel Farah wrote:
> The answer to this is probably pretty obvious, but I'm new to
> AsciiDoc...
> 
> 
> I'm working in some documents written in spanish. The "-a toc" switch
> generates a table of contents... with the legend "Table of Contents",
> which I'd like to be "Índice".
> 
> How do I change this?

Create a ~/.asciidoc/xhtml11.conf file, add the [header] section from 
the distribution xhtml11.conf file and change the text the in toctitle 
.


> 
> Thanks in advance.
> 

-- Stuart

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] How to translate "Table of Contents"

2007-04-05 Thread Stuart Rackham
Oops, ignore my last post, didn't see that this question had already 
been answered.


Miguel Farah wrote:
> The answer to this is probably pretty obvious, but I'm new to
> AsciiDoc...
> 
> 
> I'm working in some documents written in spanish. The "-a toc" switch
> generates a table of contents... with the legend "Table of Contents",
> which I'd like to be "Índice".
> 
> How do I change this?
> 
> Thanks in advance.
> 

-- Stuart

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] toc attribute in the text

2007-04-05 Thread Stuart Rackham
Pavel Jurus wrote:
> Hello again,
> 
> On Thursday 08 March 2007 20:39, Stuart Rackham wrote:
>> Hi Pavel
>>
>> Pavel Jurus wrote:
>>> Hello,
>>>
>>> I cannot figure out how to turn on table of contents (in xhtml code) in
>>> document. I am able to generate table of contents by calling
>>> "asciidoc -a toc docname.txt". However I would prefer to be able to
>>> indicate that I want toc in text of my document. I tried to put ":toc:"
>>> or "[toc]" in my documents but it has no effect.
>>>
>>> I such thing possible? And how can I do this? You may ask why I want to
>>> put attribute into the text of document rather than to config file or to
>>> command line option. I want table of contents only in some longer
>>> documents and not in short ones, so config file is not suitable. And I'm
>>> generating xhtml dynamically by CGI (FastCGI to be exact) script, which
>>> means that command line options should be the same for all documents.
>> Not easily doable within AsciiDoc. You could go the DocBook route:
>> generate DocBook using AsciiDoc then XHTML with TOC using XSLT
>> Stylesheets. If you are able to run JavaScript server-side over the
>> XHTML you may be able to generate the TOC that way but I don't have any
>> experience with server-side JavaScript.
> 
> correct me if I'm wrong. I thought that XHTML TOC is just matter of embedding
> or linking of toc.js. This script then generates TOC dynamically when 
> displayed by client (web browser). In this respect there is no difference 
> whether I generate my documect by command line or by CGI script. All I want 
> is to choose whether toc.js is included, and I want to do it separately for 
> each document.
> 
> My question was basically whether I can choose that I want toc.js included by 
> putting an atribute into the text. I don't fully understand which attributes 
> can or cannot be part of an AttributeEntry. You can for example put
> ":encoding: ISO-8859-1" into document header but setting 
> e.g. ":iconsdir: /home/pavel/icons" in the document would have no effect?  I 
> am asking whether ":toc:" or something simillar would work in the document.

Here's the full explanation:

AsciiDoc has to read the configuration files *before* reading the
source document, this is necessary because the AsciiDoc source syntax
is mostly defined by the configuration files.

This means that any lines of markup eveloped by conditional inclusion
macros will be included or excluded *before* the attribute entries in
the AsciiDoc document header are read, so setting related attributes
in the AsciiDoc source document header will have no effect.  If you
need to control configuration file markup inclusion using attributes
in the AsciiDoc source file header you need to use attribute
references to control inclusion instead of conditional inclusion
macros (attribute references are substituted at the time the output is
written rather than at program startup).

These contrived examples illustrate the two forms of conditional
inclusion. The only difference between them is that the first is
evaluated at program load time while the second is evaluated when the
markup is written (after the AsciiDoc source header has been processed):

   ifdef::mytitle[]
 Hello World!<\h2>
   endif::mytitle[]

   {mytitle#}Hello World!<\h2>

So it can be done. You'll need to create a custom [header] based on the 
default xhtml11.conf [header]. You'll also need to replace the 
include1::[] macro call with the {include:} system attribute. The reason 
I decided not to make this the default behavior is that the {include:} 
system attribute is considered unsafe so all XHTML generation would have 
to run asciidoc using the --unsafe option.

Actually iconsdir can be set in the header but the path is relative to 
the generated HTML output i.e. it is the path at document view time 
rather than at document creation time (not spelled out in the 
documentation, I must make a note to that effect).


> 
> Pavel
> 
>>> Cheers
>>> Pavel
>>>
>>> ___
>>> Asciidoc-discuss mailing list
>>> Asciidoc-discuss@metaperl.com
>>> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
>> Cheers, Stuart
> 


Cheers, Stuart

___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss