On 06/11/2013 01:42 PM, Bob Alvarez wrote:
On 6/10/13 2:23 PM, Richard Heck wrote:
On 06/09/2013 05:22 PM, Bob Alvarez wrote:
Let me state my interest in this topic to see if it overlaps with
yours. I agree that HTML exporters like Alex Fernandez' eLyXer do a
great job of producing web pages that look like pdf documents. What I
would want is to be able to add some capabilities to the HTML that
would not be possible in a static format like pdf. But at the same
time, I want to use Lyx's capabilities for formatting the document and
math typesetting.
As an example, I use Lyx to create web pages with a lot of math. Like
most math, it is structured with general statements like theorems with
proofs. Many times, the proof gets in the way of the narrative
although it is important for it to be there if the reader wants to see
it. I saw a website where they added a + sign gadget that if you click
it once displays the proof and then clicking it again hides it.
This is relatively easy to do using the javascript openClose function
http://javascriptsource.com/miscellaneous/collapsible-text.html
The from LyX's own XHTML exporter is substantially customizable through
layout files. I'd be surprised if this sort of thing could be not be
done fairly simply. At worst, you'd have to define some new sort of
inset in which you could wrap whatever you wanted to be opened and
closed.
Richard
Could you provide some more details on how I can go about doing this?
I read Ch. 4 of the "Additional" and Ch. 5 of the "Customization" but
I am a beginner at this. Is there a sample XHTML layout file that I
can modify? For example, one that inserts javascript?
What sort of thing would you like to be able to do? That would give me a
better sense of how to answer. But for some ideas, look perhaps at how
footnotes are formatted in the file stdinsets.inc.
The ordinary article.layout file contains lots of HTML-specific
material. So you could also start by looking at it. My sense was that
what Steve wants is a kind of stripped-down layout, that is closely
targeted to making simple HTML pages. So, in that case, you might have
much simpler stuff than in the complex layouts we have.
Richard