"Jose' Matos" <[EMAIL PROTECTED]> schrieb am 02.07.04 17:29:41:
> 
> On Friday 02 July 2004 15:59, Chris Karakas wrote:
> >
> > Regarding the &, I have a problem (unrelated to math and equations): if I
> > leave it as "& amp ;" in the SGML text, it becomes "& amp ; amp ;" (being
> > displayed as "& amp ;" in the browser) in HTML. Thus I always have to
> > "transform back" the "& amp ;" to "&" in LyX' SGML, in order to get it
> > right in HTML. I know I am digressing here, but I could not resist - if
> > you have any idea why this is happening, it would be very helpful.
> 
>   That is a bug.  & means really that &, it should not translate it.
>   Could it be the whitespace that you leave?
> 

No. :)

I leave the spaces there on purpose, only in the mails I write to you (in order for my 
webmail application to NOT treat them as an entity) - in the code there are no spaces. 
Check it for yourself: get the SGML file 

http://www.karakas-online.de/mySGML/mySGML.sgml

with the appendix (the bibliography SGML file is currently missing, but that's not a 
problem):

http://www.karakas-online.de/mySGML/appendix.sgml

and change the & to their SGML entities (because currently I use them verbatim, i.e. I 
don't use the entities). Then pass the file to openjade for HTML using

$SGMLTOOLS -b onehtml -s $HTML_NOCHUNKS_DSL -j "-i output.print.png -V nochunks -V 
html-index" $1.sgml

I use sgmltools-lite as you can see, but that's not the important thing. The important 
thing is to pass the "-i output.print.png -V nochunks -V html-index" parameters to 
Openjade (this is done through the -j option above). Another magic incantation that 
should work is:

$OPENJADE -t sgml -d $HTML_NOCHUNKS_DSL -i output.print.png -V nochunks -V html-index 
$1.sgml > $1.html

Of course $1 is the basename of the file ("mySGML" in this case) and the other 
variables are just pointing to Openjade or the "no-chunks" HTML stylesheet.

I use the sgmltools variant and I get that effect - i.e. all &'s become their 
entities, even if they are at the start of an entity...

I am starting to suspect sgmltools-lite...

> > If it is an inline equation, LyX should output "< inlineequation >",
> > otherwise it should output "< equation >".  The thing with "<
> > informalequation >" was just a trick of mine in my attempt to mark the
> > inline equations. And it would be nice if we could specify the id
> > attribute of each equation independently with a user dialog (otherwise, I
> > have to use the awkscr_math script to give them an id by numbering them
> > consecutively, which is quite incovenient).
> 
>   But you were right, :-) we are issuing an informal equation as we are not 
> giving it a title. That is what informal means in docbook terms. What are 
> the advantages of informalequation versus an equation?
> 

Again, not exactly. :)

I actually do give titles to my equations, see the above mySGML.sgml file (search for 
the equation element inside angle brackets to land directly on an equation). This is 
done in the awkscr_math awk script:

http://www.karakas-online.de/mySGML/awkscr_math

I think the best would be to offer a dialog for every equation. In that dialog, the 
user would be able to choose the title (if so, it would become an "equation"), or not 
(then it would become an "informalequation") and the id attributes. Of course, the 
dialog should be available only if the document type is DocBook SGML/XML 

>   Also I don't remember what happens with previous version but with 1.4 we 
> are placing the label id of the first line for the whole equation. This 
> works for cross-reference. I assume that you like to output also a number 
> for it.
> 

Yes. Actually, I want the same behaviour as the one I get from LaTeX with

\newtheorem{Def}{Definition}[chapter]
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{cor}{Corrolary}[chapter]
\newtheorem{lem}{Lemma}[chapter]
\newtheorem{alg}{Algorithm}[chapter]
\newtheorem{pro}{Problem}[chapter]

but that's probably also a stylesheet problem. No matter what it is, we must solve it. 
You can't write Mathematics in LyX, then export it to SGML/XML only to find out that 
numbering and/or referrals do not work.

> > What disturbs me at the moment is DocBook's lack of "theorem",
> > "definition", "proof" and "corrolary" elements. LaTeX can number all
> > those elements consecutively inside a chapter/section, thus making
> > referrals like "see Theorem 5.3-15" (for the 15th theorem of section 5.3)
> > possible. How do I get this with LyX and DocBook? Can you offer such
> > functionality for the SGML/XML exported document? That is, can you offer
> > the possibility to "misuse" a (referable) element  like "example"  with
> > "< example role="theorem" id="thm-5.3-15">"? Or is there a better way to
> > handle this?
> 
>   <example role="theorem">...</example> can be easily done now for all the 
> relevant types, always playing with the role attribute.
>   Regarding the numbering detail how is that done in dblatex?
> 

To tell you the truth, I don't know. :shock:

About the CVS version of LyX: since I need the old 1.2 for my production work, I will 
have to find a way to use them both concurrently - but I am a bit reluctant, as I 
don't know if this will break things in unpredictable ways. Obviously, I need a 
complete different Linux installation for testing purposes - and this might take some 
time...

-- 
Regards

Chris Karakas
http://www.karakas-online.de

Reply via email to