Re: [asciidoc-discuss] Writing lout backend
Hi Thomas
Apologies for not getting back to you sooner.
Thomas Pasch wrote:
> Dear Stuart,
>
> Example article for lout, file `ex1.txt`.
> Also attached: the correct lout form,
> file `ex1_.lout`.
>
> But at the moment @BeginSubSections,
> @EndSubSections and @BeginSubAppendices,
> @EndSubAppendices are missing in my backend.
>
> Hope the problem now become a little clearer
> to all.
Off the top of my head (aside from hacking the code) the easiest
solution would be to explicitly include the missing directives by
defining block macros to generate the output e.g:
BeginSubSection::[]
Not very helpful I know but AsciiDoc is designed to work with SGML/XML
markups so when you try to deal with non XML/SGML markups things get
really tricky. Benjamin Klum is in the process of creating a LaTeX
backend (non SGML/XML) for AsciiDoc (he's almost there), hopefully this
will be included in the next AsciiDoc release and -- the techniques he's
used may be helpful.
>
> Cheers,
>
> Thomas
>
>
>
>
>
>
>
> Section
> ---
> First paragraph first section.
>
> Second paragraph first section.
>
> SubSection
> ~~
> Fist paragraph first subsection.
> Section level has changed, thus we
> need @BeginSubSections before
> @SubSection @Begin.
>
> Second paragraph first subsection.
>
> SubSection2
> ~~~
> Fist paragraph second subsection.
> Section level has *not* changed, thus
> *no* @BeginSubSections here.
>
> Second paragraph second subsection.
> We are leaving level 2 now, thus we
> need @EndSubSections after
> @End @SubSection.
>
> Appendix A
> --
> First paragraph first appendix.
>
> Second paragraph first appendix.
>
> SubSection
> ~~
> Fist paragraph first appendix subsection.
> Section level has changed, thus we
> need @BeginSubAppendices before
> @SubAppendix @Begin.
>
> Second paragraph first appendix subsection.
> We are leaving level 2 now, thus we
> need @EndSubAppendices after
> @End @SubAppendix.
>
>
>
>
>
>
> @SysInclude { tbl }
> @SysInclude { eq }
>
> @SysInclude { report }
> @Report
> //
> @Section
> @Title { Section }
>
> @Begin @PP
> First paragraph first [EMAIL PROTECTED]
>
> Second paragraph first [EMAIL PROTECTED]
>
> @BeginSubSections
> @SubSection
> @Title { SubSection }
>
> @Begin @PP
> Fist paragraph first subsection.
> Section level has changed, thus we
> need @Char at BeginSubSections before
> @Char at SubSection @Char at [EMAIL PROTECTED]
>
> Second paragraph first [EMAIL PROTECTED]
>
> @End @SubSection
> @SubSection
> @Title { SubSection2 }
>
> @Begin @PP
> Fist paragraph second [EMAIL PROTECTED]
>
> Second paragraph second subsection.
> We are leaving level 2 now, thus we
> need @Char at EndSubSections after
> @Char at End @Char at [EMAIL PROTECTED]
>
> @End @SubSection
> @EndSubSections
> @End @Section
> @Appendix
> @Title { Appendix A }
>
> @Begin @PP
> First paragraph first [EMAIL PROTECTED]
>
> Second paragraph first [EMAIL PROTECTED]
>
> @BeginSubAppendices
> @SubAppendix
> @Title { SubSection }
>
> @Begin @PP
> Fist paragraph first appendix subsection.
> Section level has changed, thus we
> need @Char at BeginSubAppendices before
> @Char at SubAppendix @Char at [EMAIL PROTECTED]
>
> Second paragraph first appendix subsection.
> We are leaving level 2 now, thus we
> need @Char at EndSubAppendices after
> @Char at End @Char at [EMAIL PROTECTED]
>
> @End @SubAppendix
> @EndSubAppendices
> @End @Appendix
>
>
>
>
> ___
> Asciidoc-discuss mailing list
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
Cheers, Stuart
___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
Re: [asciidoc-discuss] Writing lout backend
Dear Stuart,
Example article for lout, file `ex1.txt`.
Also attached: the correct lout form,
file `ex1_.lout`.
But at the moment @BeginSubSections,
@EndSubSections and @BeginSubAppendices,
@EndSubAppendices are missing in my backend.
Hope the problem now become a little clearer
to all.
Cheers,
Thomas
ex1.txt
Description: message/disposition-notification
@SysInclude { tbl }
@SysInclude { eq }
@SysInclude { report }
@Report
//
@Section
@Title { Section }
@Begin @PP
First paragraph first [EMAIL PROTECTED]
Second paragraph first [EMAIL PROTECTED]
@BeginSubSections
@SubSection
@Title { SubSection }
@Begin @PP
Fist paragraph first subsection.
Section level has changed, thus we
need @Char at BeginSubSections before
@Char at SubSection @Char at [EMAIL PROTECTED]
Second paragraph first [EMAIL PROTECTED]
@End @SubSection
@SubSection
@Title { SubSection2 }
@Begin @PP
Fist paragraph second [EMAIL PROTECTED]
Second paragraph second subsection.
We are leaving level 2 now, thus we
need @Char at EndSubSections after
@Char at End @Char at [EMAIL PROTECTED]
@End @SubSection
@EndSubSections
@End @Section
@Appendix
@Title { Appendix A }
@Begin @PP
First paragraph first [EMAIL PROTECTED]
Second paragraph first [EMAIL PROTECTED]
@BeginSubAppendices
@SubAppendix
@Title { SubSection }
@Begin @PP
Fist paragraph first appendix subsection.
Section level has changed, thus we
need @Char at BeginSubAppendices before
@Char at SubAppendix @Char at [EMAIL PROTECTED]
Second paragraph first appendix subsection.
We are leaving level 2 now, thus we
need @Char at EndSubAppendices after
@Char at End @Char at [EMAIL PROTECTED]
@End @SubAppendix
@EndSubAppendices
@End @Appendix
___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
Re: [asciidoc-discuss] Writing lout backend
Hi Thomas
Thomas Pasch wrote:
> Hello,
>
> I'm following the quest to write a lout backend
> for asciidoc 7.1.2 (lout is a high level document
> description language in the tradition of LaTeX;
> see http://lout.sourceforge.net/[] for details).
> Having such an backend would give us the
> benefit of having a path towards PDF and
> PostScript documentation which is *much*
> more resource friendly than the docbook/fo
> path.
>
> To accomplish the task, I started by modifing
> docbook.conf. Basic things are in place now
> but I also encounter 3 problems that are
> the reason for this eMail.
>
> Section Level Problem
> ---
> Lout needs a special tag (i.e. output threatment)
> whenever the section level is *changed*. E.g.
>
>
> - > - a> ~ > ~ b> - a> ~ a> ^ b> -
>
>
> where >, a>, b> denote no event, event a, and event b,
> respectively. Looking at the code of asciidoc.py
> I encountered that there is a `Document` class
> that tracks section level information (in the `level`
> attribute). But I have no idea how to actually access
> this in a `*.conf` file.
I'm not familar with Lout and am not sure what you are looking for.
An example with AsciiDoc source and the desired Lout output be good.
>
> Section or Appendix
> ---
> Lout also needs to know if text processing is in a
> 'normal' section or has advanced towards the
> appendix. As above, I have no idea how to get this
> information from within a `*.conf` file.
Ditto my last comment.
>
> XML character references
>
> asciidoc seems to be designed with XML in mind.
Correct.
> However, more traditional high level document
> description languages like lout can't treat things
> like — . As a consequence, I did the following
> in the `lout.conf` file:
>
> -
> [replacements]
> # — entities
> \&\#([0-9]{1,4});=
> -
>
AciiDoc source does not contain SGML type character entities so I'm
unsure as to why you need to process them.
> Certainly, this is temporary hack. The right
> way to do it would be to replace 'well known'
> numerical entity references with the lout
> counterpart, i.e. [EMAIL PROTECTED] emdash`. As a further
> complication lout character references like
> the above need either an non alphanumeric
> character or an whitespace to the right and
> to the left. Instead of writing several hundred
> of replacement lines, a little python scripting
> (with a dictionary) feels the right thing to
> do...
>
> Any help would be highly appreciated.
>
> Cheers,
>
> Thomas
>
>
>
>
>
> ___
> Asciidoc-discuss mailing list
> [email protected]
> http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
>
Cheers, Stuart
___
Asciidoc-discuss mailing list
[email protected]
http://metaperl.com/cgi-bin/mailman/listinfo/asciidoc-discuss
