Scott White wrote:
Date: Sun, 30 Mar 2008 21:38:22 -0400
From: [EMAIL PROTECTED]

Scott White wrote:

1) everything is justified. How can I change it to left alignment?

Note that LaTeX microspaces, etc, so this looks proper. If you're going
to convert to HTML, it probably doesn't matter, since HTML doesn't do
justification, does it?

Actually I am fairly sure it does. align="justify" is valid html
tag.

It's an attribute, not a tag. And it's deprecated in HTML 4.0, and omitted entirely in XHTML 1.0. The correct way to specify justification in contemporary HTML is with a style.

> The current LyX functionality does not use this tag. I just don't
want to be surprised in the future if LyX started to use it.

LyX has nothing to do with HTML output. That's produced by a LaTeX renderer that creates HTML (such as htlatex), which is NOT part of LyX.

It's crucial to understand what LyX is and is not. LyX does not produce formatted output, except for its own display on the screen. It's an application for producing LaTeX documents and processing them with LaTeX processors - but those processors are part of a LaTeX implementation (or are separate utilities). They aren't part of LyX.

This has nothing to do with LyX and everything to do with whatever HTML
converter you are using. See Tools>Preferences>Converters, and look for
HTML to see what you're using.

htlatex $$i is the converter listed, but looking at my directory
structure I think it is MiKTeX 2.7.

MiKTeX is a LaTeX implementation. It includes htlatex, which is a LaTeX renderer that produces HTML.

So what happens here is:

1. You create your document in LyX.
2. You ask LyX to export to HTML.
3. LyX creates a LaTeX document from your document. That will include LaTeX commands for the various options you've set, packages you've included, etc. 4. LyX looks at your converter preferences to find the command line it should use to create HTML.
5. LyX invokes the specified converter (htlatex, for example).
6. The htlatex it finds on your system is (probably) the one supplied with MiKTeX. htlatex will create HTML (and CSS) from the LaTeX document LyX created in step 3.

As you can see, what you do in LyX defines the LaTeX document, and that's the input to htlatex. But LyX can only control the final HTML output to the extent that htlatex can be controlled by what's in the LaTeX source (and options on the htlatex command line, if you edit the converter in your LyX preferences). Ultimately, what goes into your HTML output is up to htlatex.

LaTeX isn't designed to let you specify exactly how you want your document to look. (It's possible to get very fine-grained control with LaTeX, but it requires a sophisticated understanding of the language.) It's designed to let you worry about content and structure, and let *it* worry about layout.

So if you want to specify exactly how your HTML is going to look, I'd suggest one of two things: don't use LaTeX (and LyX), or edit the style sheet (the CSS file) after generating the content. (You can also create a style sheet ahead of time and just substitute it for the one generated by htlatex.) HTML layout is properly done through a stylesheet (using floats, positioning, widths and heights, etc) anyway.

--
Michael Wojcik


Reply via email to