Re: EPUB converter
Steve Litt via lyx-users said on Fri, 25 Mar 2022 18:09:56 -0400 >And please make the output well-formed XML as well as HTML5. HTML5 can, >but doesn't have to be, well formed XML. It's a couple orders of >magnitude easier to deal with if the exported HTML has all opening tags >accompanied by closing tags, and for tags that both open and close >( for instance), be sure to put the trailing slash. The following simple Python3 program checks to make sure the file that is its argument is well-formed XML. It's also attached as an attachment. By using this program on LyX' HTML exports, you can verify that the HTML is also well formed XML. == #!/usr/bin/python3 # Copyright 2017 by Steve Litt # Expat license: https://directory.fsf.org/wiki/License:Expat import sys import re import xml.etree.ElementTree as ET fname = sys.argv[1] print('\nTesting for well formedness {} ...\n'.format(fname)) try: tree = ET.parse(fname) except ET.ParseError as err: (line, col) = err.position code = str(err.code) errmsg = 'ERROR: {}'.format(str(err)) print(errmsg) if re.search(' ', errmsg): print('Replace all with to solve problem.') print('\n') sys.exit(1) else: print('Congrats, {} is well formed!'.format(fname)) print('') == SteveT Steve Litt March 2022 featured book: Making Mental Models: Advanced Edition http://www.troubleshooters.com/mmm #!/usr/bin/python3 # Copyright 2017 by Steve Litt # Expat license: https://directory.fsf.org/wiki/License:Expat import sys import re import xml.etree.ElementTree as ET fname = sys.argv[1] print('\nTesting for well formedness {} ...\n'.format(fname)) try: tree = ET.parse(fname) except ET.ParseError as err: (line, col) = err.position code = str(err.code) errmsg = 'ERROR: {}'.format(str(err)) print(errmsg) if re.search(' ', errmsg): print('Replace all with to solve problem.') print('\n') sys.exit(1) else: print('Congrats, {} is well formed!'.format(fname)) print('') -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Pavel Sanda via lyx-users said on Fri, 25 Mar 2022 09:20:15 +0100 >That said, the unfortunate news is that speedy prototyping in external >python script is probably going to share the fate of other scripts of >this sort (elyxer being last but not the only one): cool and perhaps >better than the output we currently have, but in long-term >uncompatible and abandoned, because it does not internally share the >codebase with LyX itself. Or, the LyX project could fulfill their goal of making LyX' native format an XML dialect, and then any developer could convert a LyX doc to any other format quite easily. The trouble is, in the early 00's, the LyX project decided to make the LyX native format an XML dialect, which greatly increased the difficulty of parsing a LyX file, but did not carry through in making LyX files well formed XML. If they'd carried through with making it XML, converting it to anything else would be relatively simple. As of now, it's the worst of both worlds: Difficult parsing because of some XMLisms, but not parsable by an XML parser because it's not well formed XML. One more thing. In my opinion LyX' HTML export suffers not from technical deficiencies, but from deficiencies of specification. Please, don't do us the "favor" of adding appearances to the HTML. Instead, just pass the styles through as-is, and let people like Ken Kopelson and me handle conversion of style to appearance, which is done simply with CSS. When you pass appearances instead of styles into the HTML, you're doing extra work, and sabotaging us. And please make the output well-formed XML as well as HTML5. HTML5 can, but doesn't have to be, well formed XML. It's a couple orders of magnitude easier to deal with if the exported HTML has all opening tags accompanied by closing tags, and for tags that both open and close ( for instance), be sure to put the trailing slash. Also, please either give the output file an XML DTD/schema that defines HTML characters like , or else just output their numeric equivalents, eg. . Ken Kopelson, do you agree with this paragraph? If you want to go the extra mile in making things easier for people writing LyXHTML to ePub converters, a nice but by no means necessary favor you could do us is to output a CSS file listing all the styles in the document, and perhaps giving some best-guess appearances for each. Or else make them all big and red, so the self-published author can easily specify each later on. But please, please, PLEASE, do not throw in an all-possible-styles CSS file that bloats up our books and is extremely difficult to deal with. I'd rather personally write an XML parser that looks at the XHTML5 file and outputs the CSS. All previous attempts have considered the exported HTML to be the final file for reading. This is clearly false: It's an intermediate file, and as such, should be very easy to parse (do the slight extra work to make it well-formed XML), and pass ONLY styles into it, no appearances. And this thing where standard paragraph environment translated to two different , one for the first line and one for all the rest so that the first line isn't indented, please don't. This is easily done in CSS, and even if it weren't, we converter makers could easily write a converter program to change it to two different , AT THE VERY LAST PASS before outputting the file intended for the reader. And please, don't throw in all sorts of extraneous elements like previous attempts have done. If fifteen consecutive paragraphs are in the, let's say for example, "story" environment, just begin each paragraph of the output with instead of putting them all in a . I've seen past LyXHTML go several levels deep in unnecessary elements. Life shouldn't be that difficult. Once again, all past attempts at LyXHTML have unnecessarily bitten off way more than they could chew. Just pass us the styles, and we'll take care of the style to appearance translation, *at the right time*! SteveT Steve Litt March 2022 featured book: Making Mental Models: Advanced Edition http://www.troubleshooters.com/mmm -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
On Sun, Mar 06, 2022 at 07:24:02PM -0800, Ken Kopelson via lyx-users wrote: > Hi Jürgen, > Thank you for the message. As for my time usage, I have already built the > external converter, because I have books that are on a publishing schedule, > and they need to get out there. My question is where I go from here. I'm > not sure if the LyX team realizes just how many self-publishing authors are > out there in the world. It is a very large number. When I joined the > Self-Publishing School (with thousands of students all writing books), I > found that nobody even knew about LyX. I think authors should be using LyX, > but it needs to be easier, and EPUB/Kindle is absolutely mandatory. > > I am willing to talk with the guy who is writing the EPUB output, and help > him make it better. Even if only to serve as a consultant, since a) I'm a > developer with decades of experience, b) I'm a published book author, and > c) I've written a fully-working external converter from LyXHTML to EPUB. > Given all of that, I think I can be of service to the LyX project, at least > in some capacity. Can you please put me in touch with the individual that I > should speak with? As Juergen wrote the best would be to join lyx-devel list, Thibaut Cuvelier who rewrote docbook output and provided ebook on top of that is actively present there. I think he would grateful for feedback about the bugs of the current LyX 2.4 epub output. That said, the unfortunate news is that speedy prototyping in external python script is probably going to share the fate of other scripts of this sort (elyxer being last but not the only one): cool and perhaps better than the output we currently have, but in long-term uncompatible and abandoned, because it does not internally share the codebase with LyX itself. If there was a way how to include your knowledge into improving internal LyX code that would be win-situation for us, but it would mean that your python scripting won't be used in the end, which might be hard pill to swallow... Pavel -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Perl is your friend :-)-O or Python, Lua or whatever language you prefer. el On 2022-03-09 06:41 , Tom Goldring via lyx-users wrote: Is there a substitute for \thinspace that will not generate an error in elxyer? -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Is there a substitute for \thinspace that will not generate an error in elxyer? -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
On 2022-03-07, Murat Yildizoglu via lyx-users wrote: > When I have contacted Alex last year when I was converting my book, I > have understood that he is not continuing to work on this project > anymore. Fortunately, ElyXer continues to be functional with LyX. But I > have met some quirks during the translation. I had to correct them by > custom scripts that I execute ex-post, after the first conversion. It > is a pity because Elyxer continues to give the most beautiful output to > my taste. For example, math is beautifully converted using Mathjax. elyxer was last updated at the time LyX 2.1.n was the stable release, hence it fails with features in the lyx file format that are more recent. I was able to fix some/most issues by adapting the settings: In Tools>Settings>File Handling>Converter I set up a converter from: LyX 2.1.x to: HTML (elyxer) converter: elyxer --nofooter --html --directory $$r $$i $$o Now, file>export>HTML (elyxer) uses the route LyX > LyX 2.1.x > HTML automatically. -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
When I have contacted Alex last year when I was converting my book, I have understood that he is not continuing to work on this project anymore. Fortunately, ElyXer continues to be functional with LyX. But I have met some quirks during the translation. I had to correct them by custom scripts that I execute ex-post, after the first conversion. It is a pity because Elyxer continues to give the most beautiful output to my taste. For example, math is beautifully converted using Mathjax. -- Prof. Murat Yildizoglu Université de Bordeaux GREThA (UMR CNRS 5113) Avenue Léon Duguit 33608 Pessac cedex France murat.yildizo...@u-bordeaux.fr http://yildizoglu.fr http://www.twitter.com/yildizoglu Le 7 mars 2022 à 19:02 +0700, Dr Eberhard Lisse via lyx-users , a écrit : > > Ken > > there is a mailing list/news group for elyxer (last traffic 2017) > > elyxer-us...@nongnu.org > gmane.editors.lyx.elyxer > > el > > > On 2022-03-07 04:35 , Ken Kopelson via lyx-users wrote: > [...] > > Speaking of which, I did run into a problem with the LyXHTML export > > from LyX. The other HTML exports from LyX all include the output > > contained in Tex Code insets, while the LyXHTML export does not. This > > creates a problem for using any kind of /lettrine or "initials" > > functionality in your book, which is quite a problem. > > > > What I did to fix the problem is include a configurable table in the > > converter that automatically includes the starting text for each > > paragraph. Anytime I would change the first words of a paragraph, I > > would have to make a change in the converter's configuration file, > > changing the text there also. This is obviously extremely hacky, but > > it does get the job done. If only the LyX team would fix the LyXHTML > > export so it includes any text in a Tex Code block, ideally executing > > the Tex Code so it properly adjusts the text size, that would be > > ideal. The regular HTML export does this, so it should be easy to > > just port that code over to the LyXHTML export. At least, one would > > hope so. > [...] > > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Ken there is a mailing list/news group for elyxer (last traffic 2017) elyxer-us...@nongnu.org gmane.editors.lyx.elyxer el On 2022-03-07 04:35 , Ken Kopelson via lyx-users wrote: [...] Speaking of which, I did run into a problem with the LyXHTML export from LyX. The other HTML exports from LyX all include the output contained in Tex Code insets, while the LyXHTML export does not. This creates a problem for using any kind of /lettrine or "initials" functionality in your book, which is quite a problem. What I did to fix the problem is include a configurable table in the converter that automatically includes the starting text for each paragraph. Anytime I would change the first words of a paragraph, I would have to make a change in the converter's configuration file, changing the text there also. This is obviously extremely hacky, but it does get the job done. If only the LyX team would fix the LyXHTML export so it includes any text in a Tex Code block, ideally executing the Tex Code so it properly adjusts the text size, that would be ideal. The regular HTML export does this, so it should be easy to just port that code over to the LyXHTML export. At least, one would hope so. [...] -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Hi Jürgen, Thank you for the message. As for my time usage, I have already built the external converter, because I have books that are on a publishing schedule, and they need to get out there. My question is where I go from here. I'm not sure if the LyX team realizes just how many self-publishing authors are out there in the world. It is a very large number. When I joined the Self-Publishing School (with thousands of students all writing books), I found that nobody even knew about LyX. I think authors should be using LyX, but it needs to be easier, and EPUB/Kindle is absolutely mandatory. I am willing to talk with the guy who is writing the EPUB output, and help him make it better. Even if only to serve as a consultant, since a) I'm a developer with decades of experience, b) I'm a published book author, and c) I've written a fully-working external converter from LyXHTML to EPUB. Given all of that, I think I can be of service to the LyX project, at least in some capacity. Can you please put me in touch with the individual that I should speak with? Many thanks, *Ken Kopelson* (619) 733-3374 On Sun, Mar 6, 2022 at 1:09 AM Jürgen Spitzmüller via lyx-users < lyx-users@lists.lyx.org> wrote: > Am Samstag, dem 05.03.2022 um 12:47 -0800 schrieb Ken Kopelson via lyx- > users: > > Does anyone know how I can get in touch with the people who are > > working on the EPUB export in version 2.4? > > Via the lyx-devel list. EPUB is Thibaut's field who has re-implemented > DocBook support completely for 2.4.0, and epub on top of that. > > > I want to gauge if it will be worth it for me to put my converter > > out. This will depend on: > > > > 1) When 2.4 will be released > > Nobody can answer this seriously at the moment. 2.4 is basically done, > but there is no release schedule yet and many developers are busy with > their real lifes. > > > 2) How good the EPUB export will be > > I suggest you checkout LyX 2.4.x from the repository yourself, try and > report back. I don't think it has been heavily tested except by the > person you implemented it. > > Generally I'd say your time would be better invested in helping to > improve LyX's own EPUB output than building an external converter. And > feedback on how to improve the epub output is certainly most welcome. > > Best, > Jürgen > > > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users > -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Well, regardless of any other issues, I have a fully working LyXHTML => EPUB/Kindle converter. It was written in Python because a) it was fast to develop, b) it runs plenty fast, and c) Python had the perfect libraries for parsing HTML and generating EPUB. Item (c) then led to FAST TO DEVELOP. I have books to publish, and I can't sit around waiting for some ideal, perfect solution. Speaking of which, I did run into a problem with the LyXHTML export from LyX. The other HTML exports from LyX all include the output contained in Tex Code insets, while the LyXHTML export does not. This creates a problem for using any kind of /lettrine or "initials" functionality in your book, which is quite a problem. What I did to fix the problem is include a configurable table in the converter that automatically includes the starting text for each paragraph. Anytime I would change the first words of a paragraph, I would have to make a change in the converter's configuration file, changing the text there also. This is obviously extremely hacky, but it does get the job done. If only the LyX team would fix the LyXHTML export so it includes any text in a Tex Code block, ideally executing the Tex Code so it properly adjusts the text size, that would be ideal. The regular HTML export does this, so it should be easy to just port that code over to the LyXHTML export. At least, one would hope so. *Ken Kopelson* (619) 733-3374 On Sun, Mar 6, 2022 at 5:31 PM Steve Litt via lyx-users < lyx-users@lists.lyx.org> wrote: > Dr Eberhard Lisse via lyx-users said on Sun, 6 Mar 2022 21:24:57 +0200 > > >Steve, > > > >Since it such a schlepp, why don't you participate in the development > >or support the developers? > > LyX is great software by a great project. Great projects can be very bad > in certain respects, and that doesn't prevent them from being great > projects. As you read my response to your question, please keep in mind > that I'm very grateful to LyX for being the tool that created at least > 8 of the books I currently offer. My responses merely point out how > LyX could be much better in the area of exports. Here are, my answers > are enumerated below. > > 1) The converter must be semantic. It must keep styles as styles til >the very end, not prematurely convert to appearance. The LyX native >format is hostile to that goal, and since 2007 the LyX devs have >shown little interest in that goal. > > 2) File conversion software has no business being written in C++ plus >Qt. Python, Lua, Ruby, Perl or *maybe* simple C are the right way to >go, at least for version 1. If performance became a problem, and I >doubt it would, it could be rewritten in C. Years ago I stopped >using both C++ and Java because, in my opinion, they both suck. > > 3) Simplicity is an asset. Conceptually all that need be done is create >Xhtml5 tags with the same names as the environments and insets. But >that's not what I've seen from the LyX (X)HTML exports in the past >decade. Simplicity is an asset: The conversion software should be >separate and distinct from LyX, with a very thin interface. > > 3.1: Content in semantic Xhtml5 can be converted to anything. > > 4) If I had time to help the LyX devs, I'd have time to singlehandedly >create a Markdown=>Xhtml=>ePub and Markdown=>Xhtml=>PlainTeX=>PDF >software stack. The QOwnNotes software is already a great typing >front end for Markdown, which is why I chose Markdown. With the >Markdown based converter done, I could turn around and easily create >an Asciidoc version. > > 5) I could have, offered to, and would have written the converter for >the LyX project, if only they had followed through with their mid >00's plan of making LyX an XML dialect. They refused to do so. > > Bottom line, in my opinion, the LyX project is the wrong project to > build the LyX to ePub (or to (X)HTML) converter. Alex Fernandez was > right about that when he built eLyXer, and IMHO eLyXer was better than > the native LyX converter at that time, but eLyXer was only half > semantic. > > If the LyX project can export to some completely semantic XML, I'll be > glad to join the team who does the conversion from there. > > > >Never mind that LyX seems to predate the Kindle, this is a LaTeX issue > >rather than a LyX one (which, after all, just a front end). > > Tragically, you've just uncovered the main problem. As long as LyX is > considered a front end to *LaTeX*, there will never be a good, robust > LyX=>ePub. Only when LyX is considered a front end to *everything* > will semantic ePub, as well as conversions to formats we haven't yet > dreamed of, be possible. > > >As written numerous times I am very keen on on the new DocBook format > >but since I use LyX in production in my practice, I can't use two > >different formats, and my staff can't cope with alpha software. > > If it's DocBook *xml* as opposed to sgml, and if the DocBook XML is > merely a representa
Re: EPUB converter
Dr Eberhard Lisse via lyx-users said on Sun, 6 Mar 2022 21:24:57 +0200 >Steve, > >Since it such a schlepp, why don't you participate in the development >or support the developers? LyX is great software by a great project. Great projects can be very bad in certain respects, and that doesn't prevent them from being great projects. As you read my response to your question, please keep in mind that I'm very grateful to LyX for being the tool that created at least 8 of the books I currently offer. My responses merely point out how LyX could be much better in the area of exports. Here are, my answers are enumerated below. 1) The converter must be semantic. It must keep styles as styles til the very end, not prematurely convert to appearance. The LyX native format is hostile to that goal, and since 2007 the LyX devs have shown little interest in that goal. 2) File conversion software has no business being written in C++ plus Qt. Python, Lua, Ruby, Perl or *maybe* simple C are the right way to go, at least for version 1. If performance became a problem, and I doubt it would, it could be rewritten in C. Years ago I stopped using both C++ and Java because, in my opinion, they both suck. 3) Simplicity is an asset. Conceptually all that need be done is create Xhtml5 tags with the same names as the environments and insets. But that's not what I've seen from the LyX (X)HTML exports in the past decade. Simplicity is an asset: The conversion software should be separate and distinct from LyX, with a very thin interface. 3.1: Content in semantic Xhtml5 can be converted to anything. 4) If I had time to help the LyX devs, I'd have time to singlehandedly create a Markdown=>Xhtml=>ePub and Markdown=>Xhtml=>PlainTeX=>PDF software stack. The QOwnNotes software is already a great typing front end for Markdown, which is why I chose Markdown. With the Markdown based converter done, I could turn around and easily create an Asciidoc version. 5) I could have, offered to, and would have written the converter for the LyX project, if only they had followed through with their mid 00's plan of making LyX an XML dialect. They refused to do so. Bottom line, in my opinion, the LyX project is the wrong project to build the LyX to ePub (or to (X)HTML) converter. Alex Fernandez was right about that when he built eLyXer, and IMHO eLyXer was better than the native LyX converter at that time, but eLyXer was only half semantic. If the LyX project can export to some completely semantic XML, I'll be glad to join the team who does the conversion from there. >Never mind that LyX seems to predate the Kindle, this is a LaTeX issue >rather than a LyX one (which, after all, just a front end). Tragically, you've just uncovered the main problem. As long as LyX is considered a front end to *LaTeX*, there will never be a good, robust LyX=>ePub. Only when LyX is considered a front end to *everything* will semantic ePub, as well as conversions to formats we haven't yet dreamed of, be possible. >As written numerous times I am very keen on on the new DocBook format >but since I use LyX in production in my practice, I can't use two >different formats, and my staff can't cope with alpha software. If it's DocBook *xml* as opposed to sgml, and if the DocBook XML is merely a representation of the environments and insets of LyX, that's a perfect point of demarkation between LyX and (HTML | ePub | other). You'd probably use Pandoc for DocBook=>ePub, I'd probably write my own, but either way, it could work if DocBook *XML* and styles are kept as styles. SteveT Steve Litt March 2022 featured book: Making Mental Models: Advanced Edition http://www.troubleshooters.com/mmm -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Steve, Since it such a schlepp, why don't you participate in the development or support the developers? Never mind that LyX seems to predate the Kindle, this is a LaTeX issue rather than a LyX one (which, after all, just a front end). As written numerous times I am very keen on on the new DocBook format but since I use LyX in production in my practice, I can't use two different formats, and my staff can't cope with alpha software. So patience is a virtue on the one hand but trying out stuff like this is interesting. el On 2022-03-06 04:09 , Steve Litt via lyx-users wrote: Hi Ken, I suggest you put it out. The LyX project has a 15 year history of outputting pidgeon HTML incapable of building a *semantic* ePub, claiming what they've done is good enough, and treating with hostility my observations that they're prematurely converting style to appearance. The LyX project is the wrong project to do LyX=>ePub; ePub isn't in their DNA, and until I'm shown otherwise, I'm treating any LyX=>ePub capabilities from the LyX project as vaporware. Where can I download your converter with instructions? Thanks, SteveT [...] -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Am Samstag, dem 05.03.2022 um 12:47 -0800 schrieb Ken Kopelson via lyx- users: > Does anyone know how I can get in touch with the people who are > working on the EPUB export in version 2.4? Via the lyx-devel list. EPUB is Thibaut's field who has re-implemented DocBook support completely for 2.4.0, and epub on top of that. > I want to gauge if it will be worth it for me to put my converter > out. This will depend on: > > 1) When 2.4 will be released Nobody can answer this seriously at the moment. 2.4 is basically done, but there is no release schedule yet and many developers are busy with their real lifes. > 2) How good the EPUB export will be I suggest you checkout LyX 2.4.x from the repository yourself, try and report back. I don't think it has been heavily tested except by the person you implemented it. Generally I'd say your time would be better invested in helping to improve LyX's own EPUB output than building an external converter. And feedback on how to improve the epub output is certainly most welcome. Best, Jürgen signature.asc Description: This is a digitally signed message part -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Hi Steve, I think that not every one of us has the same kind of needs as you. For example, for a basic user like me, a “good enough” converter that gives me the ability to easily create reasonable ePub and Kindle books would definitely be useful. Sometimes PDF is not the most convenient format. I agree that HTML export from LyX is not perfect (even without entering the strict semantical markup area, since I do not have needs that yet pushed me in there, I understand that it is your case) and I had to write a full set of scripts to tweak the output to make it beautiful enough to my eyes and correct some errors generated by Elyxer (I prefer the output by Elyxer to the native one because its author had a keen sense of esthetics and it is beautiful out of the box in my case). I nevertheless use LyX as my main editing platform because it is a fantastic tool and I am sincerely grateful to all the people who have contributed to its development. Consequently, I would be happy to test any ePUB output system to check if it is “good enough” for me. Thank you for your efforts Ken. I think that the lyx-devel list would be a good place to start. Unfortunately, it is a closed list as far as I know. But they also listed to lyx-users and probably some of the developers could give you good pointers towards people in charge of this part of the conversion tools. Best regards, Murat > On 6 March 2022, at 09:09, Steve Litt via lyx-users > wrote: > > Hi Ken, > > I suggest you put it out. The LyX project has a 15 year history of > outputting pidgeon HTML incapable of building a *semantic* ePub, > claiming what they've done is good enough, and treating with hostility > my observations that they're prematurely converting style to appearance. > > The LyX project is the wrong project to do LyX=>ePub; ePub isn't in > their DNA, and until I'm shown otherwise, I'm treating any LyX=>ePub > capabilities from the LyX project as vaporware. > > Where can I download your converter with instructions? > > Thanks, > > SteveT > > > Ken Kopelson via lyx-users said on Sat, 5 Mar 2022 12:47:52 -0800 > >> Does anyone know how I can get in touch with the people who are >> working >> on the EPUB export in version 2.4? I want to gauge if it will be worth >> it for me to put my converter out. This will depend on: >> >> 1) When 2.4 will be released >> 2) How good the EPUB export will be >> >> Any help on this would be appreciated. Even telling who I can contact >> about this. >> >> Many thanks, >> *Ken Kopelson* >> (619) 733-3374 >> >> >> On Thu, Mar 3, 2022 at 5:29 AM Dr Eberhard Lisse via lyx-users < >> lyx-users@lists.lyx.org> wrote: >> >>> Ken, >>> >>> where is the missing link :-)-O? >>> >>> >>> This is great news. >>> >>> I am actually waiting for 2.4 and DocBook to convert my 859 >>> page "handbook" to EPUB so my staff and I can carry it around on our >>> Kindles (App on iPad actually). >>> >>> But, I would be very keen to see how your package works. >>> >>> My little handbook doesn't really need anything fancier than a few >>> images (JPG, PNG and PDF). >>> >>> I also use (in one (common) "include.tex") something like >>> >>> \usepackage{etoolbox} >>> \newbool{business} >>> \boolfalse{business} >>> \newbool{private} >>> \booltrue{private} >>> >>> but if that (see your below remark) were not to work I can address >>> that via a Makefile and different include (front matter) files as >>> you seem to be doing. >>> >>> Maybe you can look into that, because then you can have a single >>> include file by putting something like this into a Makefile >>> >>> bus: >>> @perl -i -p \ >>> -e >>> 's/\\boolfalse\{business\}/\\booltrue\{business\}/g;' \ >>> -e >>> 's/\\booltrue\{private\}/\\boolfalse\{private\}/g;' \ include.tex >>> @lyx -f -e pdf5 handbook.lyx >>> >>> priv: >>> @perl -i -p \ >>> -e >>> 's/\\booltrue\{business\}/\\boolfalse\{business\}/g;' \ >>> -e >>> 's/\\boolfalse\{private\}/\\booltrue\{private\}/g;' \ include.tex >>> @lyx -f -e pdf5 handbook.lyx >>> >>> and then use something like >>> >>> \ifbool{business}{}{\include{business.tex}} >>> \ifbool{private}{\include{private.tex}}{} >>> >>> as ERT. >>> >>> Looks complicated, is complicated, but once it works no further >>> touching required. >>> >>> >>> >>> In the meantime I have pulled >>> >>> http://www.editorium.com/ftp/LyXBookSampler.zip >>> >>> from >>> >>> https://wiki.lyx.org/Layouts/Layouts >>> >>> and will start some RTFM :-)-O >>> >>> greetings, el >>> >>> >>> On 03/03/2022 00:58, Ken Kopelson via lyx-users wrote: Hello LyX users, I am sending this email to let people know that I have produced a converter for LyX that produces an excellent quality EPUB/Kindle file. >>> [...] I love using LyX with the LyXBook theme (
Re: EPUB converter
Hi Ken, I suggest you put it out. The LyX project has a 15 year history of outputting pidgeon HTML incapable of building a *semantic* ePub, claiming what they've done is good enough, and treating with hostility my observations that they're prematurely converting style to appearance. The LyX project is the wrong project to do LyX=>ePub; ePub isn't in their DNA, and until I'm shown otherwise, I'm treating any LyX=>ePub capabilities from the LyX project as vaporware. Where can I download your converter with instructions? Thanks, SteveT Ken Kopelson via lyx-users said on Sat, 5 Mar 2022 12:47:52 -0800 > Does anyone know how I can get in touch with the people who are > working >on the EPUB export in version 2.4? I want to gauge if it will be worth >it for me to put my converter out. This will depend on: > >1) When 2.4 will be released >2) How good the EPUB export will be > >Any help on this would be appreciated. Even telling who I can contact >about this. > >Many thanks, >*Ken Kopelson* >(619) 733-3374 > > >On Thu, Mar 3, 2022 at 5:29 AM Dr Eberhard Lisse via lyx-users < >lyx-users@lists.lyx.org> wrote: > >> Ken, >> >> where is the missing link :-)-O? >> >> >> This is great news. >> >> I am actually waiting for 2.4 and DocBook to convert my 859 >> page "handbook" to EPUB so my staff and I can carry it around on our >> Kindles (App on iPad actually). >> >> But, I would be very keen to see how your package works. >> >> My little handbook doesn't really need anything fancier than a few >> images (JPG, PNG and PDF). >> >> I also use (in one (common) "include.tex") something like >> >> \usepackage{etoolbox} >> \newbool{business} >> \boolfalse{business} >> \newbool{private} >> \booltrue{private} >> >> but if that (see your below remark) were not to work I can address >> that via a Makefile and different include (front matter) files as >> you seem to be doing. >> >> Maybe you can look into that, because then you can have a single >> include file by putting something like this into a Makefile >> >> bus: >> @perl -i -p \ >> -e >> 's/\\boolfalse\{business\}/\\booltrue\{business\}/g;' \ >> -e >> 's/\\booltrue\{private\}/\\boolfalse\{private\}/g;' \ include.tex >> @lyx -f -e pdf5 handbook.lyx >> >> priv: >> @perl -i -p \ >> -e >> 's/\\booltrue\{business\}/\\boolfalse\{business\}/g;' \ >> -e >> 's/\\boolfalse\{private\}/\\booltrue\{private\}/g;' \ include.tex >> @lyx -f -e pdf5 handbook.lyx >> >> and then use something like >> >> \ifbool{business}{}{\include{business.tex}} >> \ifbool{private}{\include{private.tex}}{} >> >> as ERT. >> >> Looks complicated, is complicated, but once it works no further >> touching required. >> >> >> >> In the meantime I have pulled >> >> http://www.editorium.com/ftp/LyXBookSampler.zip >> >> from >> >> https://wiki.lyx.org/Layouts/Layouts >> >> and will start some RTFM :-)-O >> >> greetings, el >> >> >> On 03/03/2022 00:58, Ken Kopelson via lyx-users wrote: >> > Hello LyX users, >> > >> > I am sending this email to let people know that I have produced a >> > converter for LyX that produces an excellent quality EPUB/Kindle >> > file. >> [...] >> > I love using LyX with the LyXBook theme (as it has the greatest >> > number of paragraph formats), and I am able to set up a system of >> > files, having different Front Matter versions. >> [...] >> > I know that the next version of LyX is supposed to produce EPUB, >> [...] >> > As one final problem, the LyXHTML export fails to include anything >> > in the LaTeK code blocks, >> -- >> To email me replace 'nospam' with 'el' >> >> -- >> lyx-users mailing list >> lyx-users@lists.lyx.org >> http://lists.lyx.org/mailman/listinfo/lyx-users >> -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Does anyone know how I can get in touch with the people who are working on the EPUB export in version 2.4? I want to gauge if it will be worth it for me to put my converter out. This will depend on: 1) When 2.4 will be released 2) How good the EPUB export will be Any help on this would be appreciated. Even telling who I can contact about this. Many thanks, *Ken Kopelson* (619) 733-3374 On Thu, Mar 3, 2022 at 5:29 AM Dr Eberhard Lisse via lyx-users < lyx-users@lists.lyx.org> wrote: > Ken, > > where is the missing link :-)-O? > > > This is great news. > > I am actually waiting for 2.4 and DocBook to convert my 859 > page "handbook" to EPUB so my staff and I can carry it around on our > Kindles (App on iPad actually). > > But, I would be very keen to see how your package works. > > My little handbook doesn't really need anything fancier than a few > images (JPG, PNG and PDF). > > I also use (in one (common) "include.tex") something like > > \usepackage{etoolbox} > \newbool{business} > \boolfalse{business} > \newbool{private} > \booltrue{private} > > but if that (see your below remark) were not to work I can address that > via a Makefile and different include (front matter) files as you seem to > be doing. > > Maybe you can look into that, because then you can have a single include > file by putting something like this into a Makefile > > bus: > @perl -i -p \ > -e 's/\\boolfalse\{business\}/\\booltrue\{business\}/g;' > \ > -e 's/\\booltrue\{private\}/\\boolfalse\{private\}/g;' \ > include.tex > @lyx -f -e pdf5 handbook.lyx > > priv: > @perl -i -p \ > -e 's/\\booltrue\{business\}/\\boolfalse\{business\}/g;' > \ > -e 's/\\boolfalse\{private\}/\\booltrue\{private\}/g;' \ > include.tex > @lyx -f -e pdf5 handbook.lyx > > and then use something like > > \ifbool{business}{}{\include{business.tex}} > \ifbool{private}{\include{private.tex}}{} > > as ERT. > > Looks complicated, is complicated, but once it works no further > touching required. > > > > In the meantime I have pulled > > http://www.editorium.com/ftp/LyXBookSampler.zip > > from > > https://wiki.lyx.org/Layouts/Layouts > > and will start some RTFM :-)-O > > greetings, el > > > On 03/03/2022 00:58, Ken Kopelson via lyx-users wrote: > > Hello LyX users, > > > > I am sending this email to let people know that I have produced a > > converter for LyX that produces an excellent quality EPUB/Kindle file. > [...] > > I love using LyX with the LyXBook theme (as it has the greatest number > > of paragraph formats), and I am able to set up a system of files, > > having different Front Matter versions. > [...] > > I know that the next version of LyX is supposed to produce EPUB, > [...] > > As one final problem, the LyXHTML export fails to include anything in > > the LaTeK code blocks, > -- > To email me replace 'nospam' with 'el' > > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users > -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Thank you for this information. I will be very interested to see the result of this tool in action. Personally I use LyX to produce pdf documents optimised for the screen sizes of Kindle "paper white, voyage" and Kobo e-readers. This of course leads to documents with much larger memory sizes than epub and equivalent formats, but the memory capacity of the e-readers is now very comfortable (> 8 GB) to cope with it very well. I appreciate the fact that I can play with font sizes, put local tables of contents (through code complements in LaTeX) to Parts, Chapters, Sections and navigate between these levels by simply pressing on the top and bottom of the pages. The only regret I have is that LaTex does not offer a Book of Books type of document format so that several volumes can coexist naturally and navigate between them by cross-referencing! But with the Book Koma-Script format and by making the Parts play the role of Books, there are still enough levels of structuring to achieve one's goals. Le mer. 2 mars 2022 à 23:58, Ken Kopelson via lyx-users < lyx-users@lists.lyx.org> a écrit : > Hello LyX users, > I am sending this email to let people know that I have produced a > converter for LyX that produces an excellent quality EPUB/Kindle file. This > converter takes the LyXHTML file exported from LyX, and spits out an EPUB > file that fully supports Kindle importing. This splits the single export > file from LyX into the multiple chapters, supporting Front Matter, Main > Matter, and Back Matter. It builds a List of Figures, Table of Contents, > and moves all Footnotes to become Chapter Endnotes, which Kindle will show > in a separate window at the bottom of the screen. All backlinks are > included also. > > I love using LyX with the LyXBook theme (as it has the greatest number of > paragraph formats), and I am able to set up a system of files, having > different Front Matter versions. Unless you have actually self-published a > book, you will not fully appreciate how important it is to have different > Front Matter versions for a single book. A single published book can have > Hardback, Softcover, PDF, EPUB, and Kindle versions, all of which require > different information at the front of the book. LyX allows me to set up a > system for this. The only problem was, I could not produce an EPUB or > Kindle version from the files, so I had to create my own converter. I use > the LyXHTML export because it has tag classes for each type of element in > the files, allowing me to make the correct decisions for processing and > producing the EPUB or Kindle format. > > I know that the next version of LyX is supposed to produce EPUB, but I > have my doubts that it will be done in a way that produces high-quality > Kindle books, since I have now learned just how to do this. I can tell you > that NONE of the current tools out there for creating EPUBS does this > conversion correctly or completely. The new tool I have created does. Just > so people are aware, there is a large and growing market of people > self-publishing their own books. I am doing my best to get authors turned > on to using LyX as their book-writing tool. If anyone is interested in > helping me get the code I've written out there so that other authors can > have the ability to automatically produce perfect EPUB and Kindle, please > let me know. > > As one final problem, the LyXHTML export fails to include anything in the > LaTeK code blocks, and where this really shows up is with the Lettrine > function for Initials at the start of each Chapter. This initial text is > just omitted from the export file. The other HTML export includes them, but > it does not have any of the LyX class information for each tag, so it is > useless for conversion. Is there a way this can be fixed? It would be > awesome if this text is not excluded, since it is very much part of the > material. I had to come up with a very kludgy workaround for this in my > converter, which really should not be there. > > I am happy to work with whoever is doing the EPUB portion of the next > release. My problem was, I could not wait for that to come out. Life must > go on, as they say :) > > All the Best, > *Ken Kopelson* > (619) 733-3374 > > -- > lyx-users mailing list > lyx-users@lists.lyx.org > http://lists.lyx.org/mailman/listinfo/lyx-users > -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users
Re: EPUB converter
Ken, where is the missing link :-)-O? This is great news. I am actually waiting for 2.4 and DocBook to convert my 859 page "handbook" to EPUB so my staff and I can carry it around on our Kindles (App on iPad actually). But, I would be very keen to see how your package works. My little handbook doesn't really need anything fancier than a few images (JPG, PNG and PDF). I also use (in one (common) "include.tex") something like \usepackage{etoolbox} \newbool{business} \boolfalse{business} \newbool{private} \booltrue{private} but if that (see your below remark) were not to work I can address that via a Makefile and different include (front matter) files as you seem to be doing. Maybe you can look into that, because then you can have a single include file by putting something like this into a Makefile bus: @perl -i -p \ -e 's/\\boolfalse\{business\}/\\booltrue\{business\}/g;' \ -e 's/\\booltrue\{private\}/\\boolfalse\{private\}/g;' \ include.tex @lyx -f -e pdf5 handbook.lyx priv: @perl -i -p \ -e 's/\\booltrue\{business\}/\\boolfalse\{business\}/g;' \ -e 's/\\boolfalse\{private\}/\\booltrue\{private\}/g;' \ include.tex @lyx -f -e pdf5 handbook.lyx and then use something like \ifbool{business}{}{\include{business.tex}} \ifbool{private}{\include{private.tex}}{} as ERT. Looks complicated, is complicated, but once it works no further touching required. In the meantime I have pulled http://www.editorium.com/ftp/LyXBookSampler.zip from https://wiki.lyx.org/Layouts/Layouts and will start some RTFM :-)-O greetings, el On 03/03/2022 00:58, Ken Kopelson via lyx-users wrote: Hello LyX users, I am sending this email to let people know that I have produced a converter for LyX that produces an excellent quality EPUB/Kindle file. [...] I love using LyX with the LyXBook theme (as it has the greatest number of paragraph formats), and I am able to set up a system of files, having different Front Matter versions. [...] I know that the next version of LyX is supposed to produce EPUB, [...] As one final problem, the LyXHTML export fails to include anything in the LaTeK code blocks, -- To email me replace 'nospam' with 'el' -- lyx-users mailing list lyx-users@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-users