request for comments on EPUB exporting
Hi everyone, I'm working on exporting LyX documents to EPUB as part of my Google Summer of Code project, and I'd like to invite you to try out my current implementation, which can be found in the "epub/master" branch of the gsoc repository (g...@git.lyx.org:gsoc.git). The export process begins by exporting the document to XHTML via LyXHTML, then converting the XHTML to EPUB with the scripts in lib/scripts/epub. Right now, documents will successfully export to EPUB 2.0.1, with the following caveats: - Almost all metadata fields (author, book id, etc.) are filled in with default values. Only the title field is taken from the XHTML file from which the EPUB is converted. - No intra-document navigation is implemented; the document is just one long page. - MathML isn't part of the EPUB 2.0.1 standard, so the document output settings should be set to output math as images. What I'd like to implement soon: - Extracting other metadata fields from the document. The required fields are language, title, and identifier. The title field is taken from the document, but not the language or the identifier. I'm taking the title from the first paragraph to use the "title" inset, but there aren't corresponding insets for the other elements, so I'm not sure of the best way or ways to get the rest of the info. (There's an inset for author, but the author name is needed in both reading order and "file-as" order, and there's only one author inset.) One thought is to create custom insets, and another is to ask for the information via the document settings. - Intra-document navigation. In order to skip around within the document, add bookmarks, etc., navigation information needs to be added to the toc.ncx file within the EPUB archive. Which locations in the document should be added to the list of navigable points is not obvious. First, I read (here at http://www.gbenthien.net/Kindle%20and%20EPUB/ncx.html) that some e-readers only work with at most one depth level--only parts, or only chapters, or only sections, or whatever. I'm not sure whether this is correct or not. Either way, we can't always assume what depth the user wants in the table of contents--this is probably something we should ask. It's probably easiest to pull the navigation info straight from the document's table of contents, but I don't know if this info is available in the exported XHTML file without appearing visibly. What I'd like to implement at some point: - optional conversion of images to SVG format Note: Vector-based graphics scale better than raster-based graphics, making them well-suited for electronic media. Note: EPUB specifications require compliant e-readers to support SVG. Note: Older versions of some browsers (primarily IE) don't support SVG. Note: Preliminary searches turn up a package named dvisvgm ( http://www.ctan.org/pkg/dvisvgm) that converts DVI to SVG, and it's licensed under the GPL v3 or later. - ability to split large XHTML files into smaller ones Note: Splitting large XHTML files should boost the performance of the converted EPUB documents. - allow selection of an image for front cover artwork Note: Amazon requires JPEG or TIFF format for front cover artwork. I'd love to hear any thoughts, comments, and suggestions you all have, especially if you encounter any bugs or see something important I'm overlooking. Thanks, Josh
Re: Question #2: Printed results from LyX
On 8/30/13 8:22 AM, Richard Heck wrote: On 08/29/2013 08:38 PM, Ken Springer wrote: On 8/29/13 1:59 AM, Liviu Andronic wrote: On Thu, Aug 29, 2013 at 3:28 AM, Ken Springer wrote: Much like the speakers in a sound system, it occurs to me the actual quality of the printed output from a LyX document will depend on the quality of the printer being used. Right or wrong? If wrong, why? Well, kind of. Of course the printing quality will depend on the quality of the printer and the paper that you use. But once exported to PDF, the typesetting quality of your document should be rock-solid, whichever printer you use. So, the typesetting advantages of LyX/LaTeX is retained in a PDF document? That's great, since OS X has included native PDF export from the print dialog for some time. You don't need to use anything like that. LyX exports directly to PDF (which, if I remember correctly, is really a variety of PostScript, tuned for the web). This is good to know about exporting to PDF. AFAIK, PostScript is a printer language, where a PDF is supposed to be a cross platform, software independent document format. And the web has nothing to do with it. -- Ken Mac OS X 10.8.4 Firefox 23.0 Thunderbird 17.0.8 LibreOffice 4.1.04
Re: Question #2: Printed results from LyX
On 8/30/13 8:25 AM, Richard Heck wrote: On 08/29/2013 08:41 PM, Ken Springer wrote: On 8/29/13 8:19 AM, Richard Heck wrote: On 08/29/2013 03:59 AM, Liviu Andronic wrote: On Thu, Aug 29, 2013 at 3:28 AM, Ken Springer wrote: Much like the speakers in a sound system, it occurs to me the actual quality of the printed output from a LyX document will depend on the quality of the printer being used. Right or wrong? If wrong, why? Well, kind of. Of course the printing quality will depend on the quality of the printer and the paper that you use. But once exported to PDF, the typesetting quality of your document should be rock-solid, whichever printer you use. Obviously, a low resolution printer will give worse printed output. This is especially true since the fonts used are (usually) vector fonts. Would you have a guess as to the minimum resolution a printer would have to have that would show the difference in the quality of the final print? I'm thinking something the average computer user would possibly own, as opposed to a professional printing shop. No, I don't know enough about this, and obviously not as much as you. But even most home laser printers nowadays have enormous resolution. The pages I printed myself to test looked really good to my eyes. Admittedly, I've not had the time nor resources (meaning software) to test how things work today. I was looking for free stochastic screening software when I found the expensive stuff. But this has got me to wondering if the end result may end up being likened to the output of word processing software compared to typesetting software. Maybe you won't notice the difference until you have them side by side. This is something I won't be able to pursue at my end for at least two months. Just no time. :-( -- Ken Mac OS X 10.8.4 Firefox 23.0 Thunderbird 17.0.8 LibreOffice 4.1.04
Re: Question #2: Printed results from LyX
On 8/30/13 12:23 AM, Stephen George wrote: On 30/08/2013 1:49 PM, Ken Springer wrote: On 8/29/13 8:08 PM, Steve Litt wrote: When doing stochastic screening, the ideal is to screen at the same dpi as the final printing device. Next best is an even multiple. I.E. screen at 300 dpi for printing on a 600 dpi printer. You also have to decide on the finished physical size of the graphic before you start. I used to use the regular graphic in all the drafts. When I was satisfied with everything, then I applied the stochastic screen. I just searched Inscape+"stochastic screening" and got a bunch of useless stuff including an anti-Obama site (what, how'd Google do that?). Then I did the same thing for LaTeX, nothing ontopic for us. Same thing with "Computer monitors". One site said most inkjet printers use stochastic screening. I suspect all home printers and laser printers now have some kind of stochastic screening routines in their printer drivers. But, I've not tested the idea. An interesting discussion, but a question about Stochastic screening from someone who has only just heard of it. Is this screening something done at print driver level, and not a screen applied to the graphic itself prior to importing? ... therefore the same pdf file could be printed both with and without stochastic screening if the printer/driver support it? When I started with stochastic screening, printer drivers didn't have that ability. To write my reply, I had to do a bit of research, it's amazing how much you forget when you don't work with things for a long time. I found out that stochastic screening is also called frequency modulated screening, and error diffusion screening. After I started using stochastic screening on the image itself, HP started having error diffusion features of printing. I never applied the screening to the entire document, only to images. Then I placed the screened image into the document, and printed. Personally, I doubt that doing the screening to text is even worth the effort. My guess would be you could do either or both. But I know there are expensive screening software out there, or so it seemed with just a 10 minute investigation. -- Ken Mac OS X 10.8.4 Firefox 23.0 Thunderbird 17.0.8 LibreOffice 4.1.04
Re: Question #2: Printed results from LyX
Hello Ken, A LyX document is not printed. From a LyX document you generated first a LaTeX document and then from the LaTeX document a PDF document. The PDF document is printed. Of course, the quality of the printout depends on the output device. There is a tiny difference between a DeskJet 500 [1] and a Heidelberg printing machine [2]. ;-) Best regards Marcus [1] http://en.wikipedia.org/wiki/HP_Deskjet [2] http://en.wikipedia.org/wiki/Heidelberger_Druckmaschinen -- PMs: m.gloe...@gmx.de
Re: beamer: \lyxframeend undefined error
Scott, thx for the info. Looking forward to seeing how this becomes easier in version 2.1 after Jürgen's work. Best J. 2013/8/29 Scott Kostyshak > On Thu, Aug 29, 2013 at 5:00 PM, Jannick wrote: > > Hi, > > > > this is just a remark for potentially amending the documentation and > beamer > > templates after I was searching what was happening to my lyx > presentation: > > > > If frame end commands are omitted (which is no harm to the lyx beamer > > document so far), it is needed to have a close frame command at the end > of > > the document (see here > > > http://www.guyrutenberg.com/2009/07/22/lyxframeend-undefined-when-using-beamer-with-lyx > ). > > Thank you for the suggestion Jannick. Fortunately, things should be > more intuitive in 2.1 because the work by Juergen Spitzmueller. > > Best, > > Scott >
Re: error in LyX with Turkish language using knitr
I can reproduce the problem after I enable babel in the document. Normally I disable it because it often causes me trouble for unknown reasons. To disable it globally: Preferences-->Language Settings-->Language package-->None. Or disable it only for this document: Document-->Settings-->Language-->Language package-->None. Without babel, it compiles fine. Regards, Yihui -- Yihui Xie Web: http://yihui.name Department of Statistics, Iowa State University 2215 Snedecor Hall, Ames, IA On Fri, Aug 30, 2013 at 2:07 AM, Kizilkaya, Kadir [AN S] wrote: > Hi Scott, > > I attached the lyx file, I hope it is the correct one. > > Kadir > > From: skost...@lyx.org [skost...@lyx.org] on behalf of Scott Kostyshak > [skost...@princeton.edu] > Sent: Friday, August 30, 2013 1:24 AM > To: Kizilkaya, Kadir [AN S] > Cc: lyx-users > Subject: Re: error in LyX with Turkish language using knitr > > On Fri, Aug 30, 2013 at 2:06 AM, Kizilkaya, Kadir [AN S] > wrote: >> Tex file from LyX and Session info in R are below. > > Hi Kadir, > > Can you please send the .lyx file (the file that created the LaTeX file)? > > Thanks, > > Scott
Re: error in LyX with Turkish language using knitr
On Fri, Aug 30, 2013 at 3:07 AM, Kizilkaya, Kadir [AN S] wrote: > Hi Scott, > > I attached the lyx file, I hope it is the correct one. > > Kadir Hi Kadir, Thank you for sending the .lyx file. I can reproduce your error. This looks like a babel bug to me. However, I'm not experienced with such issues. Let's see if someone else has an idea. Scott
Re: Question #2: Printed results from LyX
On 08/29/2013 08:41 PM, Ken Springer wrote: On 8/29/13 8:19 AM, Richard Heck wrote: On 08/29/2013 03:59 AM, Liviu Andronic wrote: On Thu, Aug 29, 2013 at 3:28 AM, Ken Springer wrote: Much like the speakers in a sound system, it occurs to me the actual quality of the printed output from a LyX document will depend on the quality of the printer being used. Right or wrong? If wrong, why? Well, kind of. Of course the printing quality will depend on the quality of the printer and the paper that you use. But once exported to PDF, the typesetting quality of your document should be rock-solid, whichever printer you use. Obviously, a low resolution printer will give worse printed output. This is especially true since the fonts used are (usually) vector fonts. Would you have a guess as to the minimum resolution a printer would have to have that would show the difference in the quality of the final print? I'm thinking something the average computer user would possibly own, as opposed to a professional printing shop. No, I don't know enough about this, and obviously not as much as you. But even most home laser printers nowadays have enormous resolution. The pages I printed myself to test looked really good to my eyes. Richard
Re: Question #2: Printed results from LyX
On 08/29/2013 08:38 PM, Ken Springer wrote: On 8/29/13 1:59 AM, Liviu Andronic wrote: On Thu, Aug 29, 2013 at 3:28 AM, Ken Springer wrote: Much like the speakers in a sound system, it occurs to me the actual quality of the printed output from a LyX document will depend on the quality of the printer being used. Right or wrong? If wrong, why? Well, kind of. Of course the printing quality will depend on the quality of the printer and the paper that you use. But once exported to PDF, the typesetting quality of your document should be rock-solid, whichever printer you use. So, the typesetting advantages of LyX/LaTeX is retained in a PDF document? That's great, since OS X has included native PDF export from the print dialog for some time. You don't need to use anything like that. LyX exports directly to PDF (which, if I remember correctly, is really a variety of PostScript, tuned for the web). Richard
Re: list of contents in svmono class
Bieniasz wrote: > My text contains chapters, sections, subsections and subsubsections. > In the document options one can set some flags, and my settings specify > that all chapters, sections, subsections and subsubsections should be > listed in the list of contents. However, subsubsections do not appear > in the list of contents. Is there any way to fix this inconsistency? Go to Document > Settings > Numberings & TOC and drag the second slider towards the right. Jürgen
RE: error in LyX with Turkish language using knitr
Hi Scott, I attached the lyx file, I hope it is the correct one. Kadir From: skost...@lyx.org [skost...@lyx.org] on behalf of Scott Kostyshak [skost...@princeton.edu] Sent: Friday, August 30, 2013 1:24 AM To: Kizilkaya, Kadir [AN S] Cc: lyx-users Subject: Re: error in LyX with Turkish language using knitr On Fri, Aug 30, 2013 at 2:06 AM, Kizilkaya, Kadir [AN S] wrote: > Tex file from LyX and Session info in R are below. Hi Kadir, Can you please send the .lyx file (the file that created the LaTeX file)? Thanks, Scott newfile2.lyx Description: newfile2.lyx