Jose Abilio Oliveira Matos wrote:

> Tim Brunne writes: (using LyX 1.03)
>  >
>  > (-1-) A matter I already discussed with Jose: Using a title longer than
>  > approximately 80 characters renders problems: They are due to the SGML
>  > tools! Exporting the document as Latex is fine and the title is
>  > displayed perfectly after running Latex on the exported file.
>  >
>  > On the other hand exporting the document as LinuxDoc (i.e. as an SGML
>  > file): Because of the fact that a line break is inserted in the title
>  > after approximately 80 characters the title within the SGML file is not
>  > within one line. Now the version of 'sgml2html' on my Debian GNU/Linux
>  > system seems to have a bug: After transforming the SGML file to HTML the
>  > HTML code looks funny, the title appears twice and is displayed
>  > improperly by several browsers.
>  >
>  > This is a bug of the SGML tools. Anyway the problem may be solved by
>  > just removing the line break inserted by LyX! After doing so and
>  > transforming to HTML, the file obtained is looking nice with several
>  > browsers.
>
>    As I have told before I don't think this is a bug with sgmltools
> but a bug in the browsers. It shouldn't matter if you put a carriage
> return in your text (unless the text is inside of some verbatim like
> element, and title certainly is not one of those elements).
>
>   You can change the output from lyx using the configuration file_
> ~/.lyx/lyxrc _ uncomment the line ascii_line_lenght and put some value
> as 999. LyX will now break the line after 999 chars or any other value
> that solves your problem.

It's called "\ascii_linelen 80" in my files ?!!

Let me explain it. LyX produces perfectly valid SGML export files, including
line breaks and spaces which do not matter by definition of the SGML <title>
</title> tags. But after generating HTML from this SGML source by means of
"sgml2html" I get an "HTML" file which is actually NOT proper HTML code. You
may verify this by looking at this generated "HTML" file in emacs or any other
editor. - So ANY browser will not properly display this syntactically
erroneous "HTML" file.

Of course your suggestion will cure this desease.

>
>  > (-2-) I do not understand the policy of representing different character
>  > styles of the LyX document within the exported SGML file, but:
>  >
>  > I expect _the emphazise layout_ to be exactly that in SGML. This is not
>  > so. (Remember that the _bold layout_ of characters is translated
>  > properly to SGML). In order to obtain _emphazise_ in SGML one presently
>  > has to use character style italic !
>  >
>  > Therfore: Emphazise layout is not properly transformed to SGML.
>
>    I noticed that when writing the font handling code for
> docbook. This code comes from 0.10.x or even earlier. I will fix that
> for 1.0.4, the old behaviour will remain (for campatibility with old
> documents) but the Emphasize font will be handle correctly.

I could imagine to define internally a map

    from: character styles of LyX
    to: the smaller number of character styles in SGML.

which you probably have done already ...

>  > (-3-) Inserting non-HTML type URLs in LinuxDoc (article): If no name for
>  > such an URL is given (which seems to make sense after all!) and the
>  > exported SGML file is transformed to HTML, no browser displays this URL!
>  > Seems that the "name" entry should be omitted in HTML or the URL should
>  > be there instaed of nothing. (Is that the fault of SGML tools again?)
>
>   Nope. Those cases are the cases where you should use an html url. It
>  doesn't make sense to me to use one url without a name. The name is
> the visible face of the url (universal resource locator) if you want
> the name to be the url then you should use a html url ( that is the
> only difference between them.

I was thinking of a URL which is the same as its name. There could be a method
to type this string (which is for the name and URL at the same time) only
once. This is what I expected the non-HTML URL to be. But that isn't what was
intended by the non-HTML URL, is it ?

>  > (-4-) My main point here: Using the "Verbatim" environment within the
>  > LinuxDoc article does not work at all.
>  >
>  > When using this environment I expect that the text is displayed in
>  > PostScript, DVI, SGML or HTML viewers as it was formatted in LyX. That
>  > is not achieved. The reason seems to be again that (a) line breaks are
>  > inserted where they should be omitted and (b) an extra blank is inserted
>  > after each line break.
>
>   Tell me if changing the value of ascii_line_length change this, if
> not than it is really a lyx bug.

It does not change the occurence of unwanted line breaks (checked by
experiment !). You can only avoid unwanted line breaks by making
"\ascii_linelen" bigger than the number of characters of the largest verbatim
environment of your document .... which you surely don't want to do!--- Also,
the extra space inserted at the beginning of each line within the exported
SGML file is unwanted as well, because it indents every line by one space in
the final view (postscript, html or the like) of the document.

I think there should be a ONE TO ONE copy of the text within the LyX verbatim
environment into exported Latex, SGML, etc. -files. I think any extra
formatting should be avoided when dealing with verbatim text.

>   :-) (As a pay back you could help us to make it better ;-)

I cannot promise anything presently...

Now this has become a quite long message...

Best wishes, Tim

Reply via email to