On 06/11/2013 03:25 PM, Steve Litt wrote:
On Tue, 11 Jun 2013 14:38:23 -0400
Richard Heck <rgh...@lyx.org> wrote:

On 06/11/2013 02:03 PM, Steve Litt wrote:
On Tue, 11 Jun 2013 10:32:12 -0400
Richard Heck <rgh...@lyx.org> wrote:

On 06/10/2013 06:05 PM, Steve Litt wrote:
These days, it could be used as a front end to anything with the
proper styles defined, and the proper converter. So the same LyX
file could be used to output LaTeX, MSWord doc, XHTML, HTML,
simple HTML, or who knows what else.

To more easily accommodate this, it seems to me like layout files
should be split into an input side and an output side, with the
output side capable of multiple output formats. So the input side
might look something like this:

CharStyle MyEmph
Font
        Shape Italic
EndFont

if outputtype == latex
      outputName        latexlayout.layout/myemphL
      outputType        Command
elsif outputtype == simplehtml
      outputName        simphtmllayout.layout/myemphH
      outputType        InlineTag
else outputtype == msword
      outputName        winwordlayout.layout/myemphW
      outputType        CharacterStyle
End

Environments would be similar.

Ideally it would be designed so that it doesn't syntax check
inside the output type's it's not. That way you can develop one
output type at a time without getting errors from the ones you
haven't developed yet.
This can already be done, more or less. That is, I can't imagine
anything you'd want to do, as far as XHTML export goes, that isn't
provided for in the layout files.

Indeed, I am sufficiently confident about this that I'd be
surprised if it were not possible to build the sort of simple HTML
export you want simply by writing a new layout file.
Thanks Richard,

When I tried to do this with my layout file, it failed miserably.
Try as I might, I couldn't get Standard to map to <p>, nor could I
get Section to map to <h1>, etc.
If you want to send me your layout file, I will get it working.

Richard
Thanks Richard,

I'm sending you an entire tarballed directory tree with a minimal
example. As you'll see, LyxHTML convert respects my HTMLtag configs in
my layout file, except for mapping of Section and Subsection to <h1>
and <h2> respectively, instead it maps to <h1> and <h3> respectively.

This is because you mis-spelled the layout name: It should be
"Subsection", not "SubSection". Same for "Subsubsection" and for
"Subparagraph". These have to match what is in stdclass.inc, which
you are including, and which in turn includes stdsections.inc.

If you look on the paragraph style drop down, you will see that you
are getting new styles instead of modifying the old ones.

Convert to HTML does not respect my layout file's HTMLTag configs at
all.

That is because eLyXer does not know anything about layout files.
(It also does not know what LyX knows about translation.) As I said
in a separate message, this is in large part because it is not part of
LyX.

Richard

Reply via email to