Re: [asciidoc-discuss] Blockquote Attribution tags where there are no attributions

2007-01-17 Thread Stuart Rackham

Hi Matthew

Matthew Marshall wrote:

Hi --

I would like to suggest that blockquotes without attribution be
rendered in docbook without attribution tags.

For example,

_
some text
_

is currently rendered as:

blockquote
attribution/attribution
simparasome text/simpara
/blockquote

My suggestion is that it be rendered:

blockquote
simparasome text/simpara
/blockquote

The reason I prefer this is that converting the docbook renders the
attribution dash mark where it expects the attribution -- which looks
strange for blockquotes without attribution.


Good idea, I've edited the docbook.conf file for the next release and 
I've attached the patch below.





Thanks,
Matthew

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



Cheers, Stuart
--
Stuart Rackham
--- docbook.conf2007-01-18 11:21:11.243179710 +1300
+++ docbook.conf.NEW2007-01-18 11:17:08.126733269 +1300
@@ -243,10 +243,13 @@
 # The epigraph element may be more appropriate than blockquote.
 blockquote{id? id={id}}
 title{title}/title
-attribution
+# Include attribution only if either {attribution} or {citetitle} are defined.
+{attribution#}attribution
+{attribution%}{citetitle#}attribution
 {attribution}
 citetitle{citetitle}/citetitle
-/attribution
+{attribution#}/attribution
+{attribution%}{citetitle#}/attribution
 |
 /blockquote
 
___
Asciidoc-discuss mailing list
Asciidoc-discuss@metaperl.com
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss


Re: [asciidoc-discuss] How to put timestamp at top of .html output?

2007-01-24 Thread Stuart Rackham
Hi Matt

Matt England wrote:
 I currently generate my .html docs using:
 
asciidoc -a toc source-file.asciidoc
 
 How can I get the timestamp, which appears at the bottom of the page by 
 default, to appear somewhere at the top or near the top of the page?

You need to move the lines containing {revision} and {localdate} from 
the xhtml11.conf [footer] section to [header] section. The prefered way 
would be to create a local xhtml11.conf file containing your customized 
[header] and [footer] sections.


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

Cheers, Stuart
-- 
Stuart Rackham

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


Re: [asciidoc-discuss] asciidoc format wiki?

2007-01-28 Thread Stuart Rackham
One thing that may be worth mentioning, asciidoc can act as a filter and 
along with the -s option you can markup a text stream. For example try:

echo '*Hello World!*' | asciidoc -s -

Not very sophisticated but may be useful as a proof of concept.


Cheers, Stuart


Dag Wieers wrote:
 On Sat, 27 Jan 2007, Felix Obenhuber wrote:
 
 i'm wondering, if there's a wiki out there with uses asciidoc markup? Using
 several markups for writing docs, wikis etc. isn't really what i wantone 
 type
 should be enough... do you know anything?
 
 I think what is needed is to allow the asciidoc-library to be used as a 
 backend to python-based wiki's. For that there should be a usable 
 interface for asciidoc. (eg. a loadable asciidoc module maybe)
 
 I haven't looked at the code yet if it is possible. But if it isn't I 
 don't think it would be a lot of work to do it.
 
 
 I imagine something like a textfile (asciidoc) based wiki. Files are kept in 
 git,
 so i can use vim (with adopted vimki) to write asciidoc textfiles and commit
 those. Modifying a suited wiki solution to show htmls generated from the 
 asciidoc
 files and perform a commit on pressing the save button  after editing over 
 web
 frontend.
 
 We want this for our work as well. An asciidoc-frontend and indexing 
 system for storage of text-files. The backend is a versioning system 
 (subversion in our case).
 
 
 I see the folowing advantages:
  
  * easy export in lots of format, thanks to asciidoc
  * fast and reliable storage through git
  * collaborative writing by syncing git repositories
  * comfortable browsing by wiki web frontend
  * store non text blobs in git - list them in some way for access (don't know
about the best way.
 
 Right, nothing to add here :)
 
 
 Maybe a python based wiki is most suited for an direct asciidoc
 integration...

 What do you think about? Have a akin homebrew solution? Tell me.
 
 I'm willing to commit time to this as well. I'm very interested in using 
 Django combined with this. Keep me in sync, whatever you plan to do :)
 
 Kind regards,
 --   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
 [all I want is a warm bed and a kind word and unlimited power]
 
 ___
 Asciidoc-discuss mailing list
 Asciidoc-discuss@metaperl.com
 http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
 

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


Re: [asciidoc-discuss] How to get toc's to show more sublevels?

2007-02-01 Thread Stuart Rackham
Hi Matt

Matt England wrote:
 I'd like to get my table-of-contents (in non-book or article form--I'm not 
 sure of the terminology) to show more sublevels then what it currently does 
 (it only shows 2 levels deep; I want it to show more levels in some of my 
 docs).
 
 Is this possible?
 
 Does my question make any sense?

Yes, here's what you need to do:

Add toclevel3 to ./stylesheets/xhtml11.css:

   div.toclevel1, div.toclevel2, toclevel3 {
 margin-top: 0;
 margin-bottom: 0;
   }
   div.toclevel2 {
 margin-left: 2em;
   }
   div.toclevel3 {
 margin-left: 4em;
   }

Change the line in ./javascripts/toc.js from:

   var re = /[hH]([2-3])/;

to:

   var re = /[hH]([2-4])/;

I've gone and added a toclevels attribute for the next release so you
can do e.g.

   $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt


Cheers, Stuart


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

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


Re: [asciidoc-discuss] asciidoc titles format

2007-02-03 Thread Stuart Rackham
Dag Wieers wrote:
 Hi,
 
 I always liked the way asciidoc did titles by putting a line under them.
 Nevertheless the '= title' way of doing it is incompatible with most 
 wiki's syntax. A title in wiki's is usually '= title ='.
 
 Would it be possible to allow both, so that asciidoc is compatible with 
 both ways of doing it ?

I'm not familiar with the trailing ='s syntax, is it a common Wiki 
convention? It would be easy to make trailing ='s optional i.e. the 
following would be equivalent:

== My Title
== My Title ==

Is this what you're suggesting?


 
 Frankly, I don't know what the rationale is for doing it like this.

I had a couple of requests for this (you either like it or hate it), the 
  actual syntax follows the Ruby RDoc documentation format.


 
 Kind regards,
 --   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
 [all I want is a warm bed and a kind word and unlimited power]
 
 ___
 Asciidoc-discuss mailing list
 Asciidoc-discuss@metaperl.com
 http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
 


Cheers, Stuart

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


Re: [asciidoc-discuss] asciidoc titles format

2007-02-05 Thread Stuart Rackham
Dag Wieers wrote:
 On Sun, 4 Feb 2007, Stuart Rackham wrote:
 
 Dag Wieers wrote:

 I always liked the way asciidoc did titles by putting a line under them.
 Nevertheless the '= title' way of doing it is incompatible with most 
 wiki's syntax. A title in wiki's is usually '= title ='.

 Would it be possible to allow both, so that asciidoc is compatible with 
 both ways of doing it ?
 I'm not familiar with the trailing ='s syntax, is it a common Wiki 
 convention? It would be easy to make trailing ='s optional i.e. the 
 following would be equivalent:

 == My Title
 == My Title ==

 Is this what you're suggesting?
 
 Yes. MoinMoin apparently uses it and looking at the wikimatrix.org 
 website, you see others use that as well. (DokuWiki, Giki, IkeWiki, 
 JAMWiki, miniWiki, MoniWiki, OpenWikiNG, etc, etc...). There are more who 
 do the trailing = than not.
 
 And since it's so easy to allow it...

OK, I've implemented this for the next release.


 
 
 Frankly, I don't know what the rationale is for doing it like this.
 I had a couple of requests for this (you either like it or hate it), the 
   actual syntax follows the Ruby RDoc documentation format.
 
 That's fine. If you look at wikimatrix.org, it's scary how much different 
 syntaxes people invented for essentially the same thing :)
 
 If the syntax would be replacable in wiki's and one could hook up asciidoc 
 in place of the internal parser. Now that would be useful.
 
 Kind regards,
 --   dag wieers,  [EMAIL PROTECTED],  http://dag.wieers.com/   --
 [all I want is a warm bed and a kind word and unlimited power]
 


Cheers, Stuart

___
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] 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 Iacute;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


[asciidoc-discuss] AsciiDoc Emacs syntax highlighter

2007-04-07 Thread Stuart Rackham
Hi All

The *Nix Power Tools project (http://xpt.sourceforge.net/) has released 
an AsciiDoc syntax highlighter for emacs:

http://xpt.sourceforge.net/tools/doc-mode/

Thanks to fa.del for sending me this link.


Cheers, Stuart

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


Re: [asciidoc-discuss] Noob Questions

2007-07-26 Thread Stuart Rackham
Hi James

James Mansion wrote:
  This is the document I want to mark up:
 
   
  This is Application and ServerApplication so let's see how we do.
   
 
  I want 'Application' and 'ServerApplication' to be in monospace.
 
  So I define the following:
 
   
  [specialwords]
  monospacedwords=P X Y
  monospacedwords=ServerApplication Application
   
 
 
  What happens is that the 'Server' in ServerApplication is not in 
monospace.  Make almost any change, and it will be though:
 
  Change the P in the line before to Q, or pretty much anything else,
  and its OK again - we recognise Application and also ServerApplication
  and convert both to monospace.

The second monospaced declaration will overwrite the first and should 
probably be:

monospacedwords=(?u)\\?\bServerApplication\b (?u)\\?\bApplication\b

To delimit at word boundaries, use unicode and allow the words to be 
escaped.

I can't replicate the weirdness in terms of the preceding line affecting 
the following.


 
  Remove X or Y and its OK too.
 
 
  Any ideas?
 
  The other desire I'd have is that I'd like to use replacements as I 
used to in LaTeX.
 
  What I find however is that with:
 
  [replacements]
  win=`Microsoft Windows`
 
  I'd really like this to be re-evaluated and monospaced - but it isn't 
(the back ticks are passed right through).
 
  Is it possible to get this effect - where I replace a shorthand?

This is because replacements substitution comes after quotes 
substitution -- one way round this is to define as replacements2

[replacements2]
win=`Microsoft Windows`

and then redefine the various block subs attributes to include 
replacements2 before quotes -- probably more trouble than it's worth though.

 
  Maybe I haven't understood all the manual's subtlety!
 
 
  Thanks
  James
 
 


Cheers, Stuart


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


Re: [asciidoc-discuss] [PATCH] permalink support

2007-08-30 Thread Stuart Rackham
Thanks very much for the patch, I'll put it into the next release. I
installed and regenerated the AsciiDoc User Guide, works well with a
couple of easily fixed exceptions:

1.  If two or more elements with the same ID already exist outside the
 generated titles you will get an XHTML validity  error. For
 example IDs generated by BlockId elements, in the AsciiDoc headers
 or footers or filter generated. In this example the 'header' ID is
 generated by the AsciiDoc header:

  asciidoc.css-embedded.html:965: element h3: validity error : ID
  header already defined
  h3 id=header5.2. Header/h3

2. If the title does not start with an underscore or letter invalid
xhtml will result, here's an (admitedly contrived) example where
the title '-Introduction-' results in an error:

   asciidoc.css-embedded.html:395: element h2: validity error : 
Syntax of
   value for attribute id of h2 is not valid
   h2 id=-introduction-1. -Introduction-/h2

3. Trailing non-alphanumeric characters in title results in trailing
dashes in ID (not a validity error, just looks funny) e.g.

  'Line Breaks (HTML/XHTML)' - 'line-breaks-html-xhtml-'

Issues 1 and 2 can be fixed by prepending an underscore to the
generated ID (at fist sight it's a little ugly but it is a
straight-forward unambiguous solution). Issue 3 is trivial. Here's the
code:

   def gen_id(title):
   ''' The normalized value of the id attribute is an NCName 
according to
   the 'Namespaces in XML' Recommendation:
   NCName  ::= NCNameStartChar NCNameChar*
   NCNameChar  ::= NameChar - ':'
   NCNameStartChar ::= Letter | '_'
   NameChar::= Letter | Digit | '.' | '-' | '_' | ':'
   '''
   id = re.sub(r'[^a-zA-Z0-9.-]+', '_', title).strip('_').lower()
   # Prefix with underscore to ensure a valid id start character and to
   # ensure the id does not clash with existing document id's.
   id = '_' + id
   i = 1
   while True:
   if i == 1:
   tid = id
   else:
   tid = '%s_%d' % (id, i)
   if tid not in Section.ids:
   Section.ids.append(tid)
   return tid
   else:
   tid = id
   i += 1
   gen_id = staticmethod(gen_id)

The only other change I made is to use underscores instead of dashes,
it makes the rest of the ID consistent with the prefix and I find
underscores easier on the eye for long titles.

At this stage I'll make auto-generated section IDs optional (enabled
by defining the `-a sectids` attribute).

--
Cheers, Stuart



VMiklos wrote:
 hi,
 
 i have the following problem: when creating big documents, the anchor
 of a chapter looks like #toc34 and so on. this can be problematic
 when you give the link to someone and later you insert a chapter
 before toc34
 
 so here is what i did:
 
 http://frugalware.org/~vmiklos/patches/asciidoc-8.2.2-permalink.diff
 
 of corse it adds these ids only in case there is no id defined by the user
 
 what do you think about it?
 
 thanks,
 - VMiklos
 
 ___
 Asciidoc-discuss mailing list
 Asciidoc-discuss@metaperl.com
 http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
 



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


Re: [asciidoc-discuss] Issue with CSS in IE but No Issue in Firefox

2007-09-10 Thread Stuart Rackham
mowestusa wrote:
 Wow, great stuff. Thanks again, this is good advice
 that I will put to work. Any thoughts on including a
 title/title in the asciidoc source text file,
 which  will properly go into the head/head? (From
 reading the docs it looks like I need a First level
 title, but is there any way to put it in without
 having it show visibly on the page as a title or
 section?

You could drop the level 0 pass the doctitle attribute on the 
command-line with e.g. -a doctitle=Foo Bar


 
 
 --- Stuart Rackham [EMAIL PROTECTED] wrote:
 
 I use 3 indispensable tools: Firefox plus the Web
 Developer addin and 
 the Firebug addin. Here's how I (try) to work:

 - After any changes I validate the the local XHTML
 file at W3 using Web 
 Developer (Ctrl+Shift+A). I also use xmllint(1) in
 my build scripts for 
 gross validation checks.

 - Once I've got valid code I turn to the CSS -- I've
 found the Firebug 
 Inspect command really valuable for learning about
 CSS and visualizing 
 exactly what's going on (without it CSS makes my
 brain hurt).

 - Finally I turn to non-conforming browsers (IE6 I'm
 talking about you) 
 and try to devise any necessary work-arounds.
 
 
 

 
 Yahoo! oneSearch: Finally, mobile search 
 that gives answers, not web links. 
 http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
 

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