Re: Lyx2doc: was Anyone know of a best-seller written in LyX
On 06/11/2013 03:25 PM, Steve Litt wrote: On Tue, 11 Jun 2013 14:38:23 -0400 Richard Heck wrote: On 06/11/2013 02:03 PM, Steve Litt wrote: On Tue, 11 Jun 2013 10:32:12 -0400 Richard Heck 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 outputNamelatexlayout.layout/myemphL outputTypeCommand elsif outputtype == simplehtml outputNamesimphtmllayout.layout/myemphH outputTypeInlineTag else outputtype == msword outputNamewinwordlayout.layout/myemphW outputTypeCharacterStyle 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 , nor could I get Section to map to , 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 and respectively, instead it maps to and 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
Re: Lyx2doc: was Anyone know of a best-seller written in LyX
On 06/11/2013 02:03 PM, Steve Litt wrote: On Tue, 11 Jun 2013 10:32:12 -0400 Richard Heck 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 , nor could I get Section to map to , etc. If you want to send me your layout file, I will get it working. Richard
Re: Lyx2doc: was Anyone know of a best-seller written in LyX
On 06/11/2013 01:18 PM, stefano franchi wrote: Here are the problems I found. My guess is that part of these are LyX/XHMTL issues and part are due to AbiWord. 1. Bibliography did not come over and was just ignored. I had to copy and paste from the pdf output. Biblatex issue? Probably. If there's no BibTeX inset, then the bibliography will not be produced, and I guess you don't have that for BibLaTeX, except maybe in a note. So this is really an effect of the fact that we have no formal support for BibLaTeX. 2. Footnote text came over but not as a footnote. It was just pasted in the correct location but as a regular text. Footnotes are just exported as div's, with class="footnote", so AbiWord or whatever will not recognize it as a footnote. There's not really any HTML equivalent of a footnote, so I'm not sure there is much to be done here. 3. Latex special character issues: "em-dash as triple hyphen" came over as a triple hyphen and not as an em-dash. "tilde as non-breaking space" (I routinely use that in references) came over as tilde. The em-dash SHOULD be exported as such. There's code in Paragraph::simpleLyXHTMLOnePar() that is supposed to handle this. It works for me in a simple test document. The tilde is a different story. Can you file a bug about that? We do some LaTeX --> HTML conversion here, handling things like \"u, so I just need to add handling of ~. 4. Images were pasted more or less where the floats were inserted, at full original size. Another bug. I suppose we should scale them somehow? Please post a bug about this, too. There's not really anything to do other than put the images where they are inserted. HTML has no concept of a "page", so the placement options make no sense. 5. Captions followed the images as regular text. Similar to the footnote problem, I think. Probably we should switch to using the new tag and the associated tag. Can you also file a bug about that? 6. Formatting of the "paragraph" environment was lost (I guess it's too deeply nested to have a corresponding h level?) I forgot to include a tag for those. I've just fixed that for the next release. See http://git.lyx.org/?p=lyx.git;a=commit;h=c6a08bc4421c960dc8148a95eb68ba90c2f95ff5 for the commit. Sorry to ask for so much bug-filing. With 2.1 on the horizon, I can't do very much right now, as Vincent has trunk pretty locked. Richard
Re: Lyx2doc: was Anyone know of a best-seller written in LyX
On Tue, 11 Jun 2013 10:32:12 -0400 Richard Heck 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 , nor could I get Section to map to , etc. SteveT Steve Litt* http://www.troubleshooters.com/ Troubleshooting Training * Human Performance
Re: Lyx2doc: was Anyone know of a best-seller written in LyX
On Tue, Jun 11, 2013 at 9:32 AM, Richard Heck wrote: > On 06/10/2013 06:05 PM, Steve Litt wrote: > > 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 Richard, I just spent the last hour converting a short (2800 words) lyx/pdf file into Word. Could you tell me where I should look to fix the problems I detail below? Setup: Lyx + memoir + biblatex = Biber. Usually typeset to pdf with lualatex. . File contained two images (in floats, reduced from the originals by latex) Archlinux box with TL2012 I tried the elyxer routes (both regular and html(word)) and they failed with too many errors to report here. I then exported to xhtml, imported into abiword and exported to doc format. Opened it it libreoffice for final cleanup. Here are the problems I found. My guess is that part of these are LyX/XHMTL issues and part are due to AbiWord. 1. Bibliography did not come over and was just ignored. I had to copy and paste from the pdf output. Biblatex issue? 2. Footnote text came over but not as a footnote. It was just pasted in the correct location but as a regular text. 3. Latex special character issues: "em-dash as triple hyphen" came over as a triple hyphen and not as an em-dash. "tilde as non-breaking space" (I routinely use that in references) came over as tilde. 4. Images were pasted more or less where the floats were inserted, at full original size. 5. Captions followed the images as regular text. 6. Formatting of the "paragraph" environment was lost (I guess it's too deeply nested to have a corresponding h level?) Are these issues that a proper layout file would sort out? Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic StudiesPh: +1 (979) 845-2125 Texas A&M University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Lyx2doc: was Anyone know of a best-seller written in LyX
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. Richard It seems to me that something like this would be a logical way of turning LyX into a universal front end while changing very little of LyX's core code. I'm not a good enough programmer to do this in C++, so feel free to view this suggestion with some healthy skepticism. Thanks, SteveT Steve Litt* http://www.troubleshooters.com/ Troubleshooting Training * Human Performance
Lyx2doc: was Anyone know of a best-seller written in LyX
On Mon, 10 Jun 2013 16:02:15 -0500 stefano franchi wrote: > On Mon, Jun 10, 2013 at 1:44 PM, Les Denham > wrote: > > I use LyX rather than Word (or its clones) because it allows me to > > produce a presentable document in about half the time it takes with > > Word. This is emphatically the case if it is a document requiring a > > detailed table of contents, an index, or a bibliography, or if it > > contains figures, cross-references or footnotes. > > > > > I guess that's the very reason why we all use LyX. I certainly > wouldn't be as productive in Word. But those of us working in the > Humanities (at least some Humanities) then have to budget some time > to convert the output to Word. Nothing else is accepted. I tend to > think best-sellers authors' position is closer to us than to a > physicist's, a mathematician's or a logician's. That's why a minimal > and yet reliable LyX-to-Doc converter---a topic we've repeatedly > discussed on the list---would make such a difference to the > non-technical user, IMHO. Stephano, you bring up an important point... Ten years ago, I used LyX only because it was a front end to LaTeX. Now I use it because it's an ultra-fast, styles-enforcing wordprocessor. I've used it to make Kindle eBook (http://www.amazon.com/dp/B006QTBLA2), which has absolutely nothing to do with LaTeX. Now I'm making a converter to make it do simple HTML like you'd find on a web page, rather than as input to an eBook. One thing perhaps I haven't appreciated til now is what a good, fast and efficient wordprocessor LyX is. It knows when you press space twice it was a mistake and only prints one space. It knows when you press Enter twice that it's a mistake and prints only one. It makes fingerprinting difficult, which is just what I want. And I've never had LyX lose my work. 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. It seems to me that something like this would be a logical way of turning LyX into a universal front end while changing very little of LyX's core code. I'm not a good enough programmer to do this in C++, so feel free to view this suggestion with some healthy skepticism. Thanks, SteveT Steve Litt* http://www.troubleshooters.com/ Troubleshooting Training * Human Performance