file input not updating.
I'm using the lyx file input control to input a child.lyx document within a master foo.lyx The child is being worked on and updated elswhere. The only way I can get the master, foo.pdf, output to find changes in the child.lyx is to restart lyx. q. Is there an easier way? Rob
file input not updating.
I'm using the lyx file input control to input a child.lyx document within a master foo.lyx The child is being worked on and updated elswhere. The only way I can get the master, foo.pdf, output to find changes in the child.lyx is to restart lyx. q. Is there an easier way? Rob
file input not updating.
I'm using the lyx "file input" control to input a child.lyx document within a master foo.lyx The child is being worked on and updated elswhere. The only way I can get the master, foo.pdf, output to find changes in the child.lyx is to restart lyx. q. Is there an easier way? Rob
Re: APA6 class with LyX?
Hi Wolfgang, I'm glad they were helpful: On Tue, 2012-12-11 at 10:36 +0100, Wolfgang Engelmann wrote: Am Montag, 10. Dezember 2012, 21:31:25 schrieben Sie: Hi, Rob, has this been done already: TeXLive 2009 is included with Ubuntu 10.04, if you are able to update your Linux distribution. If not, it is possible to install newer versions of TeXLive alongside an existing install. I am currently working on a blog post that explains how this is done and I will post it when finished. A lot of those entries have gotten a bit long in the tooth (though I think everything is still applicable, one of the really nice thing about TeX and LyX, it never feels like there is a system of planned obsolescence). Regarding how to upgrade TeX Live, I did write a post describing how to do it: http://blog.oak-tree.us/index.php/2010/07/15/latex-custom Though it talks about LaTeX 2010, the instructions can be adapted to nearly any LaTeX distribution, as far as I know. I used the same procedure recently to install TeXLive 2012. (Speaking of which, if you use TeXLive 2012 and luaTeX, be very careful. They've made some big changes, and it's caused a bunch of things to break. Or, at least none of my luaTeX documents will compile anymore; both from LyX and pure TeX. I haven't yet had time to sort out where the problem is.) I'd love to link to a more updated set of instructions. When you finish your post, let me know, I'll to post a link. Cheers, Rob
Re: APA6 class with LyX?
Hi Wolfgang, I'm glad they were helpful: On Tue, 2012-12-11 at 10:36 +0100, Wolfgang Engelmann wrote: Am Montag, 10. Dezember 2012, 21:31:25 schrieben Sie: Hi, Rob, has this been done already: TeXLive 2009 is included with Ubuntu 10.04, if you are able to update your Linux distribution. If not, it is possible to install newer versions of TeXLive alongside an existing install. I am currently working on a blog post that explains how this is done and I will post it when finished. A lot of those entries have gotten a bit long in the tooth (though I think everything is still applicable, one of the really nice thing about TeX and LyX, it never feels like there is a system of planned obsolescence). Regarding how to upgrade TeX Live, I did write a post describing how to do it: http://blog.oak-tree.us/index.php/2010/07/15/latex-custom Though it talks about LaTeX 2010, the instructions can be adapted to nearly any LaTeX distribution, as far as I know. I used the same procedure recently to install TeXLive 2012. (Speaking of which, if you use TeXLive 2012 and luaTeX, be very careful. They've made some big changes, and it's caused a bunch of things to break. Or, at least none of my luaTeX documents will compile anymore; both from LyX and pure TeX. I haven't yet had time to sort out where the problem is.) I'd love to link to a more updated set of instructions. When you finish your post, let me know, I'll to post a link. Cheers, Rob
Re: APA6 class with LyX?
Hi Wolfgang, I'm glad they were helpful: On Tue, 2012-12-11 at 10:36 +0100, Wolfgang Engelmann wrote: > Am Montag, 10. Dezember 2012, 21:31:25 schrieben Sie: > > Hi, Rob, > > has this been done already: > > TeXLive 2009 is included with Ubuntu 10.04, if you are able to update your > Linux distribution. If not, it is possible to install newer versions of > TeXLive alongside an existing install. I am currently working on a blog > post that explains how this is done and I will post it when finished. A lot of those entries have gotten a bit long in the tooth (though I think everything is still applicable, one of the really nice thing about TeX and LyX, it never feels like there is a system of planned obsolescence). Regarding how to upgrade TeX Live, I did write a post describing how to do it: http://blog.oak-tree.us/index.php/2010/07/15/latex-custom Though it talks about LaTeX 2010, the instructions can be adapted to nearly any LaTeX distribution, as far as I know. I used the same procedure recently to install TeXLive 2012. (Speaking of which, if you use TeXLive 2012 and luaTeX, be very careful. They've made some big changes, and it's caused a bunch of things to break. Or, at least none of my luaTeX documents will compile anymore; both from LyX and pure TeX. I haven't yet had time to sort out where the problem is.) I'd love to link to a more updated set of instructions. When you finish your post, let me know, I'll to post a link. Cheers, Rob
Re: APA6 class with LyX?
If you're going to go the customization route, this might be of help: http://blog.oak-tree.us/index.php/2009/11/02/custom-lyx-nih It talks about creating a custom layout for an existing document class. Related posts with more examples can be found at: http://blog.oak-tree.us/index.php/2009/11/14/customize-lyx-character-styles (Character styles) http://blog.oak-tree.us/index.php/2010/05/19/latex-cv-part4 (Second example of how to create a layout for an existing document class. The other posts in the same series how to write a custom document class.) Best of luck in the endeavor!
Re: APA6 class with LyX?
If you're going to go the customization route, this might be of help: http://blog.oak-tree.us/index.php/2009/11/02/custom-lyx-nih It talks about creating a custom layout for an existing document class. Related posts with more examples can be found at: http://blog.oak-tree.us/index.php/2009/11/14/customize-lyx-character-styles (Character styles) http://blog.oak-tree.us/index.php/2010/05/19/latex-cv-part4 (Second example of how to create a layout for an existing document class. The other posts in the same series how to write a custom document class.) Best of luck in the endeavor!
Re: APA6 class with LyX?
If you're going to go the customization route, this might be of help: http://blog.oak-tree.us/index.php/2009/11/02/custom-lyx-nih It talks about creating a custom layout for an existing document class. Related posts with more examples can be found at: http://blog.oak-tree.us/index.php/2009/11/14/customize-lyx-character-styles (Character styles) http://blog.oak-tree.us/index.php/2010/05/19/latex-cv-part4 (Second example of how to create a layout for an existing document class. The other posts in the same series how to write a custom document class.) Best of luck in the endeavor!
Re: Getting rid of You cannot type two spaces this way message?
On Wed, 2012-11-21 at 16:36 +0100, Liviu Andronic wrote: On Wed, Nov 21, 2012 at 4:08 PM, Alan R. Bleier ar...@cornell.edu wrote: I agree completely with Trevor. I completely disagree with Trevor. Hitting double space [to get a full stop] is as unnatural and unhelpful as it gets. This may make some sense for a mobile platform, but is utterly unneeded on the desktop. I very much hope that LyX doesn't go the way of the iThingies. It isn't just unhelpful, it's also wrong. From a typographical, stylistic, and grammatical point of view (see Grammar girl's take, who also cites the Chicago Manual of Style, the AP stylebook, and MLA to back herself up [1]). One of the things I particularly like about LyX is that it forces me into structure. I've invested enough time to create templates, modules, and classes for my work. LyX makes my writing fit into those classes, which saves me lots and lots of time. Little things, like not typing two spaces, are a feature as far as I'm concerned. If I need the ability to type multiple spaces, this can be created via a special style. LyX code, for example, allows control over white space; which means it's there when I need it. I would much prefer that LyX default to the stylistically accepted way of things, with other methods available via styles. Which is to say, I like how it works now. [1] http://grammar.quickanddirtytips.com/spaces-period-end-of-sentence.aspx
Re: Getting rid of You cannot type two spaces this way message?
On Wed, 2012-11-21 at 16:36 +0100, Liviu Andronic wrote: On Wed, Nov 21, 2012 at 4:08 PM, Alan R. Bleier ar...@cornell.edu wrote: I agree completely with Trevor. I completely disagree with Trevor. Hitting double space [to get a full stop] is as unnatural and unhelpful as it gets. This may make some sense for a mobile platform, but is utterly unneeded on the desktop. I very much hope that LyX doesn't go the way of the iThingies. It isn't just unhelpful, it's also wrong. From a typographical, stylistic, and grammatical point of view (see Grammar girl's take, who also cites the Chicago Manual of Style, the AP stylebook, and MLA to back herself up [1]). One of the things I particularly like about LyX is that it forces me into structure. I've invested enough time to create templates, modules, and classes for my work. LyX makes my writing fit into those classes, which saves me lots and lots of time. Little things, like not typing two spaces, are a feature as far as I'm concerned. If I need the ability to type multiple spaces, this can be created via a special style. LyX code, for example, allows control over white space; which means it's there when I need it. I would much prefer that LyX default to the stylistically accepted way of things, with other methods available via styles. Which is to say, I like how it works now. [1] http://grammar.quickanddirtytips.com/spaces-period-end-of-sentence.aspx
Re: Getting rid of "You cannot type two spaces this way" message?
On Wed, 2012-11-21 at 16:36 +0100, Liviu Andronic wrote: > On Wed, Nov 21, 2012 at 4:08 PM, Alan R. Bleierwrote: > > I agree completely with Trevor. > > > I completely disagree with Trevor. Hitting double space [to get a full > stop] is as unnatural and unhelpful as it gets. This may make some > sense for a mobile platform, but is utterly unneeded on the desktop. I > very much hope that LyX doesn't go the way of the iThingies. It isn't just unhelpful, it's also wrong. From a typographical, stylistic, and grammatical point of view (see Grammar girl's take, who also cites the Chicago Manual of Style, the AP stylebook, and MLA to back herself up [1]). One of the things I particularly like about LyX is that it forces me into structure. I've invested enough time to create templates, modules, and classes for my work. LyX makes my writing fit into those classes, which saves me lots and lots of time. Little things, like not typing two spaces, are a feature as far as I'm concerned. If I need the ability to type multiple spaces, this can be created via a special style. LyX code, for example, allows control over white space; which means it's there when I need it. I would much prefer that LyX default to the stylistically accepted way of things, with other methods available via styles. Which is to say, I like how it works now. [1] http://grammar.quickanddirtytips.com/spaces-period-end-of-sentence.aspx
LaTeX Question
Dear Group, This is more of a LaTeX question rather than a LyX question, but I know there are many LaTeX experts here, too, so here goes. I'm currently working with a set of fluids equations which have both velocity and volume terms. Given how frequently the variable v appears in both (by convention), I would like to somehow distinguish them in my notes. (Right now, I've been using an uppercase V for volume and lowercase v for velocity.) I've seen several texts use a variant of the V character, however, to make the distinction more clear. Any idea how this might be done? What is the best way to use a variant character in a math expression, or is there a standard LaTeX symbol for volume? (Regular V appears to be used for velocity, variant V for volume.) I've already looked through the general LaTeX symbols list and the LyX menus, but wasn't able to find the symbols used in the text. Any thoughts would be appreciated. Cheers, Rob
LaTeX Question
Dear Group, This is more of a LaTeX question rather than a LyX question, but I know there are many LaTeX experts here, too, so here goes. I'm currently working with a set of fluids equations which have both velocity and volume terms. Given how frequently the variable v appears in both (by convention), I would like to somehow distinguish them in my notes. (Right now, I've been using an uppercase V for volume and lowercase v for velocity.) I've seen several texts use a variant of the V character, however, to make the distinction more clear. Any idea how this might be done? What is the best way to use a variant character in a math expression, or is there a standard LaTeX symbol for volume? (Regular V appears to be used for velocity, variant V for volume.) I've already looked through the general LaTeX symbols list and the LyX menus, but wasn't able to find the symbols used in the text. Any thoughts would be appreciated. Cheers, Rob
LaTeX Question
Dear Group, This is more of a LaTeX question rather than a LyX question, but I know there are many LaTeX experts here, too, so here goes. I'm currently working with a set of fluids equations which have both velocity and volume terms. Given how frequently the variable v appears in both (by convention), I would like to somehow distinguish them in my notes. (Right now, I've been using an uppercase V for volume and lowercase v for velocity.) I've seen several texts use a variant of the V character, however, to make the distinction more clear. Any idea how this might be done? What is the best way to use a variant character in a math expression, or is there a standard LaTeX symbol for volume? (Regular V appears to be used for velocity, variant V for volume.) I've already looked through the general LaTeX symbols list and the LyX menus, but wasn't able to find the symbols used in the text. Any thoughts would be appreciated. Cheers, Rob
Re: SageTeX and LyX
Hi Scott, On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote: I've been meaning to checkout SAGE + LyX so if no one comes along to help you I might take a look. I appreciate the offer. After some quality time looking into how the module works and how SageTeX processes documents, I was able to get it up and running. I found this page to be extremely helpful: http://www.sagemath.org/doc/tutorial/sagetex.html Of course, like all things, I was hoping to get a quick response via the list. I decided last year that I wanted to go back to school to improve my mechanical engineering skills and was hoping to get Sage working for a lab report. (Why I decided more education would be desirable is completely beyond me. I've forgotten how thoroughly miserable it is to be a student. While I frequently have to work late, it's been years since I've had to pull an all-night session to finish homework. It's every bit as bad as I remember. It might even be worse, if you factor in age.) How did you install SAGE? In the past I've compiled from source which was very smooth but took a while. There is also a PPA: https://launchpad.net/~aims/+archive/sagemath To get Sage installed, I used the PPA. I thought about compiling from source so that I could integrate it with the system Python, and then thought better of it. The installation from the PPA was quick and I haven't had any issues, so far. To install the SageTeX module (which has to be done separately from installing Sage), I copied the sagetex folder into my LaTeX path and ran texhash. Which version do you have installed? I'm running version 5.1. Does the terminal output or View Messages toolbar give any useful output that you could share? The output was helpful, but didn't make much sense until I read more about how SageTeX works. Sage processes files in two steps. You write your document, then you run LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This creates a second file, with the Sage processing instructions in it. This has a *.sagetex.sage file extension. At this point, you have to run Sage on this secondary file, which generates your equations, plots and other elements so that they can be incorporated into your original LaTeX file. At that point, you run LaTeX on the original file a second time to produce the typeset document. The problem I was having is that I was only running LaTeX on my new documents. The converters I set up didn't follow the appropriate pathway of LaTeX - Sage - LaTeX. Once I added in the Sage processing step, everything started to work. Do you have a minimum working example that you could send or link to? Absolutely, attached is a simple example that I'm working up into a template. I'm just getting started with Sage, but now that it's working, I'm quite impressed with what I've seen. For the past 10 years or so, I've been using aging copies of Maple for symbolic computation, and this looks like it will allow me to modernize. (I don't actually have to do much symbolic math, so it hasn't been that big of a deal.) Being able to work from within LyX, in a manner very similar to the way I work with R code via Knitr/Sweave, is going to be very nice. Knowing that it's all open is even better. Cheers, Rob PS, when I get time, I'm going to try and update the instructions on the Wiki to make a couple of things clearer. I'll also probably write a blog post about it, just so I've got a record of how I got things working. If you'd like, I'll send you a link when it's finished. Sage Report.lyx Description: application/lyx
Re: SageTeX and LyX
Hi Scott, On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote: I've been meaning to checkout SAGE + LyX so if no one comes along to help you I might take a look. I appreciate the offer. After some quality time looking into how the module works and how SageTeX processes documents, I was able to get it up and running. I found this page to be extremely helpful: http://www.sagemath.org/doc/tutorial/sagetex.html Of course, like all things, I was hoping to get a quick response via the list. I decided last year that I wanted to go back to school to improve my mechanical engineering skills and was hoping to get Sage working for a lab report. (Why I decided more education would be desirable is completely beyond me. I've forgotten how thoroughly miserable it is to be a student. While I frequently have to work late, it's been years since I've had to pull an all-night session to finish homework. It's every bit as bad as I remember. It might even be worse, if you factor in age.) How did you install SAGE? In the past I've compiled from source which was very smooth but took a while. There is also a PPA: https://launchpad.net/~aims/+archive/sagemath To get Sage installed, I used the PPA. I thought about compiling from source so that I could integrate it with the system Python, and then thought better of it. The installation from the PPA was quick and I haven't had any issues, so far. To install the SageTeX module (which has to be done separately from installing Sage), I copied the sagetex folder into my LaTeX path and ran texhash. Which version do you have installed? I'm running version 5.1. Does the terminal output or View Messages toolbar give any useful output that you could share? The output was helpful, but didn't make much sense until I read more about how SageTeX works. Sage processes files in two steps. You write your document, then you run LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This creates a second file, with the Sage processing instructions in it. This has a *.sagetex.sage file extension. At this point, you have to run Sage on this secondary file, which generates your equations, plots and other elements so that they can be incorporated into your original LaTeX file. At that point, you run LaTeX on the original file a second time to produce the typeset document. The problem I was having is that I was only running LaTeX on my new documents. The converters I set up didn't follow the appropriate pathway of LaTeX - Sage - LaTeX. Once I added in the Sage processing step, everything started to work. Do you have a minimum working example that you could send or link to? Absolutely, attached is a simple example that I'm working up into a template. I'm just getting started with Sage, but now that it's working, I'm quite impressed with what I've seen. For the past 10 years or so, I've been using aging copies of Maple for symbolic computation, and this looks like it will allow me to modernize. (I don't actually have to do much symbolic math, so it hasn't been that big of a deal.) Being able to work from within LyX, in a manner very similar to the way I work with R code via Knitr/Sweave, is going to be very nice. Knowing that it's all open is even better. Cheers, Rob PS, when I get time, I'm going to try and update the instructions on the Wiki to make a couple of things clearer. I'll also probably write a blog post about it, just so I've got a record of how I got things working. If you'd like, I'll send you a link when it's finished. Sage Report.lyx Description: application/lyx
Re: SageTeX and LyX
Hi Scott, On Wed, 2012-10-03 at 06:16 -0400, Scott Kostyshak wrote: > I've been meaning to checkout SAGE + LyX so if no one comes along to > help you I might take a look. I appreciate the offer. After some quality time looking into how the module works and how SageTeX processes documents, I was able to get it up and running. I found this page to be extremely helpful: http://www.sagemath.org/doc/tutorial/sagetex.html Of course, like all things, I was hoping to get a quick response via the list. I decided last year that I wanted to go back to school to improve my mechanical engineering skills and was hoping to get Sage working for a lab report. (Why I decided more education would be desirable is completely beyond me. I've forgotten how thoroughly miserable it is to be a student. While I frequently have to work late, it's been years since I've had to pull an all-night session to finish homework. It's every bit as bad as I remember. It might even be worse, if you factor in age.) > How did you install SAGE? In the past > I've compiled from source which was very smooth but took a while. > There is also a PPA: https://launchpad.net/~aims/+archive/sagemath To get Sage installed, I used the PPA. I thought about compiling from source so that I could integrate it with the system Python, and then thought better of it. The installation from the PPA was quick and I haven't had any issues, so far. To install the SageTeX module (which has to be done separately from installing Sage), I copied the sagetex folder into my LaTeX path and ran texhash. > Which version do you have installed? I'm running version 5.1. > Does the terminal output or View Messages toolbar give any useful > output that you could share? The output was helpful, but didn't make much sense until I read more about how SageTeX works. Sage processes files in two steps. You write your document, then you run LaTeX (pdflatex, xelatex, lualatex, or regular latex) on it. This creates a second file, with the Sage processing instructions in it. This has a *.sagetex.sage file extension. At this point, you have to run Sage on this secondary file, which generates your equations, plots and other elements so that they can be incorporated into your original LaTeX file. At that point, you run LaTeX on the original file a second time to produce the typeset document. The problem I was having is that I was only running LaTeX on my new documents. The converters I set up didn't follow the appropriate pathway of LaTeX -> Sage -> LaTeX. Once I added in the Sage processing step, everything started to work. > Do you have a minimum working example that you could send or link to? Absolutely, attached is a simple example that I'm working up into a template. I'm just getting started with Sage, but now that it's working, I'm quite impressed with what I've seen. For the past 10 years or so, I've been using aging copies of Maple for symbolic computation, and this looks like it will allow me to modernize. (I don't actually have to do much symbolic math, so it hasn't been that big of a deal.) Being able to work from within LyX, in a manner very similar to the way I work with R code via Knitr/Sweave, is going to be very nice. Knowing that it's all open is even better. Cheers, Rob PS, when I get time, I'm going to try and update the instructions on the Wiki to make a couple of things clearer. I'll also probably write a blog post about it, just so I've got a record of how I got things working. If you'd like, I'll send you a link when it's finished. Sage Report.lyx Description: application/lyx
SageTeX and LyX
Dear LyX Users, I've just started playing around with SAGE (www.sagemath.org) and was very happy to see that there is a module which can be used with LyX. However, in trying to get the module to work, I've run into a snag. I have it installed, and I can even successfully compile the example document from the Wiki. However, when I try and create my own documents, it appears as though I'm not getting any output back from SAGE. Other than adding the module to a new LyX document, is there some configuration step that I am missing? Also, any explanation as to why the example would appear to compile, but new documents might not? I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011 install. Cheers, Rob
SageTeX and LyX
Dear LyX Users, I've just started playing around with SAGE (www.sagemath.org) and was very happy to see that there is a module which can be used with LyX. However, in trying to get the module to work, I've run into a snag. I have it installed, and I can even successfully compile the example document from the Wiki. However, when I try and create my own documents, it appears as though I'm not getting any output back from SAGE. Other than adding the module to a new LyX document, is there some configuration step that I am missing? Also, any explanation as to why the example would appear to compile, but new documents might not? I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011 install. Cheers, Rob
SageTeX and LyX
Dear LyX Users, I've just started playing around with SAGE (www.sagemath.org) and was very happy to see that there is a module which can be used with LyX. However, in trying to get the module to work, I've run into a snag. I have it installed, and I can even successfully compile the example document from the Wiki. However, when I try and create my own documents, it appears as though I'm not getting any output back from SAGE. Other than adding the module to a new LyX document, is there some configuration step that I am missing? Also, any explanation as to why the example would appear to compile, but new documents might not? I'm using LyX 2.1 (SVN) on Ubuntu 12.04, with a custom TeX Live 2011 install. Cheers, Rob
Re: Longtable captions
On 5/8/2012 8:45 AM, John Tapsell wrote: At the moment adding captions to longtables requires manually adding lyx code. Hi John, While the offer is much appreciated, in this case, it's unnecessary. You *can* add captions to longtables. It's available from the Table properties dialog. Right click on the Table Settings Longtable (Tab). From there, you'll see an option for Caption at the bottom of the Row settings. Just enable Use long table box, and then click on the Caption box. It will add in a label for you to fill out. Hope that helps. Cheers, Rob PS, if you post other annoyances to the list, I'm sure that the developers would be happy to jump on them.
Re: Longtable captions
On 5/8/2012 8:45 AM, John Tapsell wrote: At the moment adding captions to longtables requires manually adding lyx code. Hi John, While the offer is much appreciated, in this case, it's unnecessary. You *can* add captions to longtables. It's available from the Table properties dialog. Right click on the Table Settings Longtable (Tab). From there, you'll see an option for Caption at the bottom of the Row settings. Just enable Use long table box, and then click on the Caption box. It will add in a label for you to fill out. Hope that helps. Cheers, Rob PS, if you post other annoyances to the list, I'm sure that the developers would be happy to jump on them.
Re: Longtable captions
On 5/8/2012 8:45 AM, John Tapsell wrote: > At the moment adding captions to longtables requires manually adding lyx > code. Hi John, While the offer is much appreciated, in this case, it's unnecessary. You *can* add captions to longtables. It's available from the Table properties dialog. Right click on the Table > Settings > Longtable (Tab). >From there, you'll see an option for Caption at the bottom of the "Row" settings. Just enable "Use long table" box, and then click on the "Caption" box. It will add in a label for you to fill out. Hope that helps. Cheers, Rob PS, if you post other annoyances to the list, I'm sure that the developers would be happy to jump on them.
Re: Spaces in the title of descriptions
Hi Manolo, On 4/20/2012 9:34 AM, Manolo Martínez wrote: This has probably been discussed before, although I don't quite recall the suggestion I'm about to make. As most LyXers, I use a short space (C-Space) as a substitute for spaces in the title of descriptions in LyX. As many, I take this to be not the most beautiful of hacks. I was wondering if the following would not be a better solution: telling LyX, MarkDown-style, that whatever goes into the first, outermost pair of brackets in a definition is its title. One would write: (Title) This is blah. If one needs brackets in the title, she should write: ((Title in Brackets)) Blah. This would provide cleaner .tex files. If a description does not start with a bracketed title, LyX would complain. I largely agree with your point that the way we handle spaces in the list and description environments is suboptimal (control-space isn't the most intuitive way of adding a space to a description title, to my own embarrassment I only learned about it recently). With that said ... (my apologies up front, this email comes dangerously close to rant) I much prefer it to needing to make use of markup or markdown in an environment that is otherwise WYSIWYG. By much prefer, I mean to say, I think it would be a horrible thing if we suddenly start requiring users to make use of syntax in a visual environment. I am very sympathetic to the need for clean output. (I've ranted about some of the choices made in XHTML export, for example.) But, to me, that's secondary to the cleanliness of the writing experience. If LyX is complaining because I'm not including parentheses or brackets, that is not a step forward. We don't use them anywhere else inside of LyX, and I don't think we should. If I wanted to write with markup (any markup), I would write with markup directly. That would give me the exact representation of my thoughts that I want. I use LyX so that I don't have to do that and can still have a high level of control over the output. It also seems as though there is a solution to this issue that doesn't require the use of markup inside LyX itself: add a TeX inset to the title. Once added, I can type a title without needing to control-space and it produces very clean TeX output. E.g.: \begin{description} \item [{Item Title}] This is the first item. ... \end{description} There are also several other places where I am *very* particular about my markup. In all of these places, you can use the TeX inset to produce exactly what you want to appear in the output. It's still a workaround, but I think it's much cleaner than requiring markup/markdown/chickenscratch inside of LyX (even if the option is complete optional controlled by a deeply buried preference somewhere). Cheers, Rob
Re: Spaces in the title of descriptions
Hi Manolo, On 4/20/2012 9:34 AM, Manolo Martínez wrote: This has probably been discussed before, although I don't quite recall the suggestion I'm about to make. As most LyXers, I use a short space (C-Space) as a substitute for spaces in the title of descriptions in LyX. As many, I take this to be not the most beautiful of hacks. I was wondering if the following would not be a better solution: telling LyX, MarkDown-style, that whatever goes into the first, outermost pair of brackets in a definition is its title. One would write: (Title) This is blah. If one needs brackets in the title, she should write: ((Title in Brackets)) Blah. This would provide cleaner .tex files. If a description does not start with a bracketed title, LyX would complain. I largely agree with your point that the way we handle spaces in the list and description environments is suboptimal (control-space isn't the most intuitive way of adding a space to a description title, to my own embarrassment I only learned about it recently). With that said ... (my apologies up front, this email comes dangerously close to rant) I much prefer it to needing to make use of markup or markdown in an environment that is otherwise WYSIWYG. By much prefer, I mean to say, I think it would be a horrible thing if we suddenly start requiring users to make use of syntax in a visual environment. I am very sympathetic to the need for clean output. (I've ranted about some of the choices made in XHTML export, for example.) But, to me, that's secondary to the cleanliness of the writing experience. If LyX is complaining because I'm not including parentheses or brackets, that is not a step forward. We don't use them anywhere else inside of LyX, and I don't think we should. If I wanted to write with markup (any markup), I would write with markup directly. That would give me the exact representation of my thoughts that I want. I use LyX so that I don't have to do that and can still have a high level of control over the output. It also seems as though there is a solution to this issue that doesn't require the use of markup inside LyX itself: add a TeX inset to the title. Once added, I can type a title without needing to control-space and it produces very clean TeX output. E.g.: \begin{description} \item [{Item Title}] This is the first item. ... \end{description} There are also several other places where I am *very* particular about my markup. In all of these places, you can use the TeX inset to produce exactly what you want to appear in the output. It's still a workaround, but I think it's much cleaner than requiring markup/markdown/chickenscratch inside of LyX (even if the option is complete optional controlled by a deeply buried preference somewhere). Cheers, Rob
Re: Spaces in the title of descriptions
Hi Manolo, On 4/20/2012 9:34 AM, Manolo Martínez wrote: > This has probably been discussed before, although I don't quite recall the > suggestion I'm about to make. > > As most LyXers, I use a short space (C-Space) as a substitute for spaces in > the > title of descriptions in LyX. As many, I take this to be not the most > beautiful > of hacks. > > I was wondering if the following would not be a better solution: telling LyX, > MarkDown-style, that whatever goes into the first, outermost pair of brackets > in a definition is its title. One would write: > > (Title) This is blah. > > If one needs brackets in the title, she should write: > > ((Title in Brackets)) Blah. > > This would provide cleaner .tex files. If a description does not start with a > bracketed title, LyX would complain. I largely agree with your point that the way we handle spaces in the list and description environments is suboptimal (control-space isn't the most intuitive way of adding a space to a description title, to my own embarrassment I only learned about it recently). With that said ... (my apologies up front, this email comes dangerously close to rant) I much prefer it to needing to make use of markup or markdown in an environment that is otherwise WYSIWYG. By much prefer, I mean to say, I think it would be a horrible thing if we suddenly start requiring users to make use of syntax in a visual environment. I am very sympathetic to the need for clean output. (I've ranted about some of the choices made in XHTML export, for example.) But, to me, that's secondary to the cleanliness of the writing experience. If LyX is complaining because I'm not including parentheses or brackets, that is not a step forward. We don't use them anywhere else inside of LyX, and I don't think we should. If I wanted to write with markup (any markup), I would write with markup directly. That would give me the exact representation of my thoughts that I want. I use LyX so that I don't have to do that and can still have a high level of control over the output. It also seems as though there is a solution to this issue that doesn't require the use of markup inside LyX itself: add a TeX inset to the title. Once added, I can type a title without needing to control-space and it produces very clean TeX output. E.g.: \begin{description} \item [{Item Title}] This is the first item. ... \end{description} There are also several other places where I am *very* particular about my markup. In all of these places, you can use the TeX inset to produce exactly what you want to appear in the output. It's still a workaround, but I think it's much cleaner than requiring markup/markdown/chickenscratch inside of LyX (even if the option is complete optional controlled by a deeply buried preference somewhere). Cheers, Rob
Re: LyX on Ubuntu Precise (12.04): big download size!
On 4/3/2012 10:01 AM, BOB Merhebi wrote: Hello all, I've been testing Ubuntu12.04 lately just now I was thinking of using LyX on it. TO my big surprise the LyX requires a large download of ~450 MB+. I am shocked!!! IS that the true size? If not mistaken I recall that on 10.04 it required ~ 25MB. Am I mistaken? Is there something wrong? Hi Bob, The download from Ubuntu was probably a debug build. These are much larger than the release build. You might want to contact the Ubuntu project and let them know that the build is much larger than expected. Liviu Andronic manages a PPA with an unofficial build, which might be less damaging to your Internet quota (https://launchpad.net/~lyx-devel/+archive/release). I'm not sure he's added support for Precise Penguin, yet, though. Another idea is that they may have changed the LaTeX dependencies. If so, it might be downloading a lot of extra TeX packages that aren't needed. Regardless, I would definitely get in touch with the Ubuntu project. To the best of my knowledge, they don't subscribe to this list, and it's something that they will want to hear about. Cheers, Rob
Re: LyX on Ubuntu Precise (12.04): big download size!
On 4/3/2012 10:01 AM, BOB Merhebi wrote: Hello all, I've been testing Ubuntu12.04 lately just now I was thinking of using LyX on it. TO my big surprise the LyX requires a large download of ~450 MB+. I am shocked!!! IS that the true size? If not mistaken I recall that on 10.04 it required ~ 25MB. Am I mistaken? Is there something wrong? Hi Bob, The download from Ubuntu was probably a debug build. These are much larger than the release build. You might want to contact the Ubuntu project and let them know that the build is much larger than expected. Liviu Andronic manages a PPA with an unofficial build, which might be less damaging to your Internet quota (https://launchpad.net/~lyx-devel/+archive/release). I'm not sure he's added support for Precise Penguin, yet, though. Another idea is that they may have changed the LaTeX dependencies. If so, it might be downloading a lot of extra TeX packages that aren't needed. Regardless, I would definitely get in touch with the Ubuntu project. To the best of my knowledge, they don't subscribe to this list, and it's something that they will want to hear about. Cheers, Rob
Re: LyX on Ubuntu Precise (12.04): big download size!
On 4/3/2012 10:01 AM, BOB Merhebi wrote: > Hello all, > > I've been testing Ubuntu12.04 lately & just now I was thinking of > using LyX on it. TO my big surprise the LyX requires a large download > of ~450 MB+. I am shocked!!! IS that the true size? If not mistaken I > recall that on 10.04 it required ~ 25MB. Am I mistaken? Is there > something wrong? Hi Bob, The download from Ubuntu was probably a debug build. These are much larger than the release build. You might want to contact the Ubuntu project and let them know that the build is much larger than expected. Liviu Andronic manages a PPA with an unofficial build, which might be less damaging to your Internet quota (https://launchpad.net/~lyx-devel/+archive/release). I'm not sure he's added support for Precise Penguin, yet, though. Another idea is that they may have changed the LaTeX dependencies. If so, it might be downloading a lot of extra TeX packages that aren't needed. Regardless, I would definitely get in touch with the Ubuntu project. To the best of my knowledge, they don't subscribe to this list, and it's something that they will want to hear about. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/9/2012 7:04 AM, Steve Litt wrote: Can one import HTML, with its styles, into MSWord or Libreoffice? If so, then it sounds to me like eLyXer has already accomplished this, without any added work from you, Alex. You've already done the hard part, and Rob's done the other end of the hard part, and it sounds to me like if there's an MSWord HTML import, it's just a matter of a small script that anybody can do, completely separate from yours and Rob's work. Kind of like my lyx2kindle, three quarters of which is just a front-end to eLyXer. I agree, I don't think that it needs to be very difficult. Writing a Word XML document is a pain, but it's not very hard. There's plenty of well documented examples for supporting a wide variety of features. What it lacks is someone who is willing to pick it up and run with it. I might have a student who would be interested, and I could help with portions. Is there anyone from the users list who might be interested in tackling it? I can provide support on the writing of doc and Alex on the parsing of LyX, it sounds like it's a matter of gluing pieces together. As a first pass, I'd recommend supporting paragraph and character styles, tables, images, and footnotes. Once you've got the basics started, it's pretty to add additional features as you go (or at least, that's what I've found). Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/9/2012 7:04 AM, Steve Litt wrote: Can one import HTML, with its styles, into MSWord or Libreoffice? If so, then it sounds to me like eLyXer has already accomplished this, without any added work from you, Alex. You've already done the hard part, and Rob's done the other end of the hard part, and it sounds to me like if there's an MSWord HTML import, it's just a matter of a small script that anybody can do, completely separate from yours and Rob's work. Kind of like my lyx2kindle, three quarters of which is just a front-end to eLyXer. I agree, I don't think that it needs to be very difficult. Writing a Word XML document is a pain, but it's not very hard. There's plenty of well documented examples for supporting a wide variety of features. What it lacks is someone who is willing to pick it up and run with it. I might have a student who would be interested, and I could help with portions. Is there anyone from the users list who might be interested in tackling it? I can provide support on the writing of doc and Alex on the parsing of LyX, it sounds like it's a matter of gluing pieces together. As a first pass, I'd recommend supporting paragraph and character styles, tables, images, and footnotes. Once you've got the basics started, it's pretty to add additional features as you go (or at least, that's what I've found). Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/9/2012 7:04 AM, Steve Litt wrote: > Can one import HTML, with its styles, into MSWord or Libreoffice? If > so, then it sounds to me like eLyXer has already accomplished this, > without any added work from you, Alex. You've already done the hard > part, and Rob's done the other end of the hard part, and it sounds to > me like if there's an MSWord HTML import, it's just a matter of a > small script that anybody can do, completely separate from yours and > Rob's work. Kind of like my lyx2kindle, three quarters of which is > just a front-end to eLyXer. I agree, I don't think that it needs to be very difficult. Writing a Word XML document is a pain, but it's not very hard. There's plenty of well documented examples for supporting a wide variety of features. What it lacks is someone who is willing to pick it up and run with it. I might have a student who would be interested, and I could help with portions. Is there anyone from the users list who might be interested in tackling it? I can provide support on the writing of doc and Alex on the parsing of LyX, it sounds like it's a matter of gluing pieces together. As a first pass, I'd recommend supporting paragraph and character styles, tables, images, and footnotes. Once you've got the basics started, it's pretty to add additional features as you go (or at least, that's what I've found). Cheers, Rob
Re: word2lyx: Word to LyX Document Converter
On Mar 8, 2012, at 6:56 AM, BH wrote: I'm very interested in this -- thanks for undertaking the project. However, I can't even get it started. On Mac (10.6.8), calling word2lyx from the Terminal, I get the following: ./word2lyx.py ./Example-Word2LyX.docx test.lyx Traceback (most recent call last): File ./word2lyx.py, line 13, in module from docx import read as docxread File /Users/bennett/Downloads/word2lyx/docx/read.py, line 10, in module from parser import ElementTree as etree File /Users/bennett/Downloads/word2lyx/docx/parser.py, line 13, in module class etree_element(ElementTree.Element): TypeError: Error when calling the metaclass bases function() argument 1 must be code, not str No, I think that the problem may be due to the version that you are using. Snow Leopard uses Python 2.6, whereas I tested it against Python 2.7 (which can be found in Lion and in most Linux distributions). The problem is how I'm importing the XML module and needs to be reworked. I'll get to this a little bit later today and post a fix as soon as I can. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On Mar 8, 2012, at 2:21 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would love to agree, but round-trip is what is needed most of the time. An import word2lyx is perfect, but in most cases only half the story. I would use it extensively if the round trip is possible. Obviously, we can not deal with the word-editing side (whatever program is used for that). I'm sympathetic to this point. I understand that having a way to go from one to the other is important. I've deliberately avoided creating an export to Word option, though, because it would essentially require that I recode large portions of LyX in Python. I'm resistant to doing that because it's a a lot of extra code to maintain. There are already two implementations of LyX document parsing libraries: eLyXer and that found in LyX itself. Adding a third and trying to keep it in some sort of synchronization would be a huge pain. I'm looking into using eLyXer for Word conversion from LyX, but that is lesser priority than making Word import work correctly. (At least at the moment.) If there is someone (maybe Alex or another eLyXer dev) who would be interest in collaborating and handling the export part, I'd be happy to coordinate with them so that we're able to round-trip. People will take this as a promise and complain that it does not work well enough. Well - one could state that the round-trip works for MS word version abcd, and other versions can / will / might cause problems which are not in our hands. I've already taken that position. I'm willing to work with Word versions 2007 and 2010, and only files saved in docx. I'm not going to even try and parse doc binary files. word2lyx is about a 1000 lines of code. The doc parsing libraries I've looked at are easily 10 times that long. Python has excellent libraries for parsing XML that do nearly all the heavy lifting. I would have to write my own parsing library for doc. The difference of structure between word and lyx are too important to be able to work in a word-LyX collaboration IMO. There are obviously basic difference in how LyX and word are viewing documents, and these lead to principal differences how the files are saved. But I am thinking that if one can import a docx file into LyX, one should be able to do the reverse. And one should be able to define a robust subset of features which are maintained when doing a round-trip. In the same way that certain features are not converted in word2lyx, lyx2word would also only support a subset of features which are exported. But if these subsets include the most important features used in the editing process on both sides, a round trip should be possible. I agree that it is possible, but there's a lot of code needed to make it work correctly. It's also a larger problem set that I want to right now. Once I've got the Word import working, including track changes and notes (and probably maths, too), I'll be more willing to come back and take a look at it. But as I said earlier, if there's someone who would like to jump on board and work with Word export (lyx2word), I'll be happy to coordinate and work with them, too. Cheers, Rob
word2lyx Fixes: Python Import Error
Dear Users, If you were trying to test word2lyx and got an import error, I've fixed the underlying issue (I hope). You can download the updated sources from http://oak-tree.us/stuff/LyX/word2lyx-01.zip. I've also posted all of the source code and revision history to: https://code.launchpad.net/~lyx-outline-devel/lyx-outline/lyx-word If there is anyone who might be interested in helping work on the code, please let me know and I'll give you access to the repository. merge requests are very welcome. Cheers, Rob
Re: word2lyx: Word to LyX Document Converter
On Mar 8, 2012, at 6:56 AM, BH wrote: I'm very interested in this -- thanks for undertaking the project. However, I can't even get it started. On Mac (10.6.8), calling word2lyx from the Terminal, I get the following: ./word2lyx.py ./Example-Word2LyX.docx test.lyx Traceback (most recent call last): File ./word2lyx.py, line 13, in module from docx import read as docxread File /Users/bennett/Downloads/word2lyx/docx/read.py, line 10, in module from parser import ElementTree as etree File /Users/bennett/Downloads/word2lyx/docx/parser.py, line 13, in module class etree_element(ElementTree.Element): TypeError: Error when calling the metaclass bases function() argument 1 must be code, not str No, I think that the problem may be due to the version that you are using. Snow Leopard uses Python 2.6, whereas I tested it against Python 2.7 (which can be found in Lion and in most Linux distributions). The problem is how I'm importing the XML module and needs to be reworked. I'll get to this a little bit later today and post a fix as soon as I can. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On Mar 8, 2012, at 2:21 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I would love to agree, but round-trip is what is needed most of the time. An import word2lyx is perfect, but in most cases only half the story. I would use it extensively if the round trip is possible. Obviously, we can not deal with the word-editing side (whatever program is used for that). I'm sympathetic to this point. I understand that having a way to go from one to the other is important. I've deliberately avoided creating an export to Word option, though, because it would essentially require that I recode large portions of LyX in Python. I'm resistant to doing that because it's a a lot of extra code to maintain. There are already two implementations of LyX document parsing libraries: eLyXer and that found in LyX itself. Adding a third and trying to keep it in some sort of synchronization would be a huge pain. I'm looking into using eLyXer for Word conversion from LyX, but that is lesser priority than making Word import work correctly. (At least at the moment.) If there is someone (maybe Alex or another eLyXer dev) who would be interest in collaborating and handling the export part, I'd be happy to coordinate with them so that we're able to round-trip. People will take this as a promise and complain that it does not work well enough. Well - one could state that the round-trip works for MS word version abcd, and other versions can / will / might cause problems which are not in our hands. I've already taken that position. I'm willing to work with Word versions 2007 and 2010, and only files saved in docx. I'm not going to even try and parse doc binary files. word2lyx is about a 1000 lines of code. The doc parsing libraries I've looked at are easily 10 times that long. Python has excellent libraries for parsing XML that do nearly all the heavy lifting. I would have to write my own parsing library for doc. The difference of structure between word and lyx are too important to be able to work in a word-LyX collaboration IMO. There are obviously basic difference in how LyX and word are viewing documents, and these lead to principal differences how the files are saved. But I am thinking that if one can import a docx file into LyX, one should be able to do the reverse. And one should be able to define a robust subset of features which are maintained when doing a round-trip. In the same way that certain features are not converted in word2lyx, lyx2word would also only support a subset of features which are exported. But if these subsets include the most important features used in the editing process on both sides, a round trip should be possible. I agree that it is possible, but there's a lot of code needed to make it work correctly. It's also a larger problem set that I want to right now. Once I've got the Word import working, including track changes and notes (and probably maths, too), I'll be more willing to come back and take a look at it. But as I said earlier, if there's someone who would like to jump on board and work with Word export (lyx2word), I'll be happy to coordinate and work with them, too. Cheers, Rob
word2lyx Fixes: Python Import Error
Dear Users, If you were trying to test word2lyx and got an import error, I've fixed the underlying issue (I hope). You can download the updated sources from http://oak-tree.us/stuff/LyX/word2lyx-01.zip. I've also posted all of the source code and revision history to: https://code.launchpad.net/~lyx-outline-devel/lyx-outline/lyx-word If there is anyone who might be interested in helping work on the code, please let me know and I'll give you access to the repository. merge requests are very welcome. Cheers, Rob
Re: word2lyx: Word to LyX Document Converter
On Mar 8, 2012, at 6:56 AM, BH wrote: > I'm very interested in this -- thanks for undertaking the project. > However, I can't even get it started. On Mac (10.6.8), calling > word2lyx from the Terminal, I get the following: > >> ./word2lyx.py ./Example-Word2LyX.docx test.lyx > Traceback (most recent call last): > File "./word2lyx.py", line 13, in >from docx import read as docxread > File "/Users/bennett/Downloads/word2lyx/docx/read.py", line 10, in >from parser import ElementTree as etree > File "/Users/bennett/Downloads/word2lyx/docx/parser.py", line 13, in >class etree_element(ElementTree.Element): > TypeError: Error when calling the metaclass bases >function() argument 1 must be code, not str No, I think that the problem may be due to the version that you are using. Snow Leopard uses Python 2.6, whereas I tested it against Python 2.7 (which can be found in Lion and in most Linux distributions). The problem is how I'm importing the XML module and needs to be reworked. I'll get to this a little bit later today and post a fix as soon as I can. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On Mar 8, 2012, at 2:21 AM, Rainer M Krug wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > I would love to agree, but round-trip is what is needed most of the > time. An import word2lyx is perfect, but in most cases only half the > story. I would use it extensively if the round trip is possible. > Obviously, we can not deal with the word-editing side (whatever > program is used for that). I'm sympathetic to this point. I understand that having a way to go from one to the other is important. I've deliberately avoided creating an export to Word option, though, because it would essentially require that I recode large portions of LyX in Python. I'm resistant to doing that because it's a a lot of extra code to maintain. There are already two implementations of LyX document parsing libraries: eLyXer and that found in LyX itself. Adding a third and trying to keep it in some sort of synchronization would be a huge pain. I'm looking into using eLyXer for Word conversion from LyX, but that is lesser priority than making Word import work correctly. (At least at the moment.) If there is someone (maybe Alex or another eLyXer dev) who would be interest in collaborating and handling the export part, I'd be happy to coordinate with them so that we're able to round-trip. >> People will take this as a promise and complain that it does not >> work well enough. > > Well - one could state that the round-trip works for MS word version > abcd, and other versions can / will / might cause problems which are > not in our hands. I've already taken that position. I'm willing to work with Word versions 2007 and 2010, and only files saved in docx. I'm not going to even try and parse doc binary files. word2lyx is about a 1000 lines of code. The doc parsing libraries I've looked at are easily 10 times that long. Python has excellent libraries for parsing XML that do nearly all the heavy lifting. I would have to write my own parsing library for doc. >> The difference of structure between word and lyx are too important >> to be able to work in a word<->LyX collaboration IMO. > > There are obviously basic difference in how LyX and word are viewing > documents, and these lead to principal differences how the files are > saved. > > But I am thinking that if one can import a docx file into LyX, one > should be able to do the reverse. And one should be able to define a > robust subset of features which are maintained when doing a round-trip. > In the same way that certain features are not converted in word2lyx, > lyx2word would also only support a subset of features which are > exported. But if these subsets include the most important features > used in the editing process on both sides, a round trip should be > possible. I agree that it is possible, but there's a lot of code needed to make it work correctly. It's also a larger problem set that I want to right now. Once I've got the Word import working, including track changes and notes (and probably maths, too), I'll be more willing to come back and take a look at it. But as I said earlier, if there's someone who would like to jump on board and work with Word export (lyx2word), I'll be happy to coordinate and work with them, too. Cheers, Rob
word2lyx Fixes: Python Import Error
Dear Users, If you were trying to test word2lyx and got an import error, I've fixed the underlying issue (I hope). You can download the updated sources from http://oak-tree.us/stuff/LyX/word2lyx-01.zip. I've also posted all of the source code and revision history to: https://code.launchpad.net/~lyx-outline-devel/lyx-outline/lyx-word If there is anyone who might be interested in helping work on the code, please let me know and I'll give you access to the repository. merge requests are very welcome. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/5/2012 2:01 AM, Rainer M Krug wrote: Actualy one more question - it might have been mentioned, but are you also looking into a lyx2word converter which would provide round-trips with track changes and notes? I'd really like to provide for that, yes. However, there is something of a hang-up. Going from Word to LyX is pretty straightforward. It will even be possible to maintain track changes. (I still need to implement this, but it's on the radar for 0.2). Going back to Word from LyX, though, is a bit more complicated. Maintaining fidelity so that you can exchange the same file with a colleague and track the whole change history, that's very, very difficult. Possible, but really hard. Cheers, Rob
word2lyx: Word to LyX Document Converter
Dear Users and Developers, First off, thank you to everyone who sent me documents over the weekend. I was able to make a lot of tweaks to word2lyx based on what you sent me. With that hurdle out of the way, I think it's ready to release it into the wild. If you'd like to download a copy of it, you can download the code from: http://oak-tree.us/stuff/LyX/word2lyx-01.zip A brief write-up of the features and usage can be found at: http://www.oak-tree.us/2012/03/07/word2lyx01-2/ If you download it and find it useful, please let me know. If you download it and have problems, also please let me know. (Mostly so I can fix the problems.) Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/5/2012 2:01 AM, Rainer M Krug wrote: Actualy one more question - it might have been mentioned, but are you also looking into a lyx2word converter which would provide round-trips with track changes and notes? I'd really like to provide for that, yes. However, there is something of a hang-up. Going from Word to LyX is pretty straightforward. It will even be possible to maintain track changes. (I still need to implement this, but it's on the radar for 0.2). Going back to Word from LyX, though, is a bit more complicated. Maintaining fidelity so that you can exchange the same file with a colleague and track the whole change history, that's very, very difficult. Possible, but really hard. Cheers, Rob
word2lyx: Word to LyX Document Converter
Dear Users and Developers, First off, thank you to everyone who sent me documents over the weekend. I was able to make a lot of tweaks to word2lyx based on what you sent me. With that hurdle out of the way, I think it's ready to release it into the wild. If you'd like to download a copy of it, you can download the code from: http://oak-tree.us/stuff/LyX/word2lyx-01.zip A brief write-up of the features and usage can be found at: http://www.oak-tree.us/2012/03/07/word2lyx01-2/ If you download it and find it useful, please let me know. If you download it and have problems, also please let me know. (Mostly so I can fix the problems.) Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
On 3/5/2012 2:01 AM, Rainer M Krug wrote: > Actualy one more question - it might have been mentioned, but are you > also looking into a lyx2word converter which would provide > round-trips with track changes and notes? I'd really like to provide for that, yes. However, there is something of a hang-up. Going from Word to LyX is pretty straightforward. It will even be possible to maintain track changes. (I still need to implement this, but it's on the radar for 0.2). Going back to Word from LyX, though, is a bit more complicated. Maintaining fidelity so that you can exchange the same file with a colleague and track the whole change history, that's very, very difficult. Possible, but really hard. Cheers, Rob
word2lyx: Word to LyX Document Converter
Dear Users and Developers, First off, thank you to everyone who sent me documents over the weekend. I was able to make a lot of tweaks to word2lyx based on what you sent me. With that hurdle out of the way, I think it's ready to release it into the wild. If you'd like to download a copy of it, you can download the code from: http://oak-tree.us/stuff/LyX/word2lyx-01.zip A brief write-up of the features and usage can be found at: http://www.oak-tree.us/2012/03/07/word2lyx01-2/ If you download it and find it useful, please let me know. If you download it and have problems, also please let me know. (Mostly so I can fix the problems.) Cheers, Rob
Import/Export Error Information (word2lyx)
Dear Developers, I'm getting ready to publish the source for Word2LyX, but ran into one last problem. I created an input filter/filetype to completely automate the conversion of Word documents. However, when run, I'm getting an error: An error occurred while running: python inputfile.docx outputfile.lyx Is there any way to look at the debug output to try and track what might be causing the error. Cheers, Rob
Import/Export Error Information (word2lyx)
Dear Developers, I'm getting ready to publish the source for Word2LyX, but ran into one last problem. I created an input filter/filetype to completely automate the conversion of Word documents. However, when run, I'm getting an error: An error occurred while running: python inputfile.docx outputfile.lyx Is there any way to look at the debug output to try and track what might be causing the error. Cheers, Rob
Import/Export Error Information (word2lyx)
Dear Developers, I'm getting ready to publish the source for Word2LyX, but ran into one last problem. I created an input filter/filetype to completely automate the conversion of Word documents. However, when run, I'm getting an error: An error occurred while running: python "inputfile.docx" "outputfile.lyx" Is there any way to look at the debug output to try and track what might be causing the error. Cheers, Rob
word2lyx (Word to LyX Translator): Status Update
Dear Users and Developers, I wanted to give everyone a quick status update on what I've been doing with the Word to LyX importer. Over the past couple of weeks, I've been working on it full steam and it's now pretty functional. It supports: 1. Translating Word paragraph and character styles to LyX paragraph and character styles. In the case of character styles that aren't defined, it will write entries for them into the local layout (including basic LaTeX commands). 2. Importing Word tables, including those with merged rows or columns. It will also do its best with the table borders. 3. Enumerated and itemized lists. 4. Importing images from the Word document. (It skips over embedded objects, such as charts from Excel.) 5. The use of custom templates, which allows you to fine tune importing your documents. I've created templates for article.cls and book.cls. I'll also probably create one for memoir.cls as well. Before release, I still need to implement support for footnotes and endnotes (which is pretty easy). Which brings me to the main reason I'm writing. Before releasing the code, I'd really like to test it on a couple of in the wild documents. It does pretty well on the test documents I've thrown at it from my own library. But ... that's just me. I use Word in a very particular way. If there's anyone who wouldn't mind, I'd really like to throw other test documents at it. If you would be willing to donate one, please let me know. This would allow me to check a wide variety of work and nail down a couple more issues before a public test. I will keep all documents confidential and delete after I've finished testing. If everything goes well, I'll release the 0.1 version (which will still need quite some cleaning up) early next week. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
Hi James, On 3/2/2012 4:18 PM, James Sutherland wrote: This sounds very nice! Thanks. I appreciate that. Any ideas about whether you will be able to support cross references and translate that into LyX/LaTeX labels/references? James Short answer, yes. It's one of the three or four things I still have yet to implement. It will be in the 0.1 release, though. I'm also planning on translating embedded data (such as traveling EndNote bibliographies or Zotero inserts) into BibTeX databases and adding citation commands. That, however, will have to be a 0.2 feature as it requires quite a bit more infrastructure to support. Cheers, Rob
word2lyx (Word to LyX Translator): Status Update
Dear Users and Developers, I wanted to give everyone a quick status update on what I've been doing with the Word to LyX importer. Over the past couple of weeks, I've been working on it full steam and it's now pretty functional. It supports: 1. Translating Word paragraph and character styles to LyX paragraph and character styles. In the case of character styles that aren't defined, it will write entries for them into the local layout (including basic LaTeX commands). 2. Importing Word tables, including those with merged rows or columns. It will also do its best with the table borders. 3. Enumerated and itemized lists. 4. Importing images from the Word document. (It skips over embedded objects, such as charts from Excel.) 5. The use of custom templates, which allows you to fine tune importing your documents. I've created templates for article.cls and book.cls. I'll also probably create one for memoir.cls as well. Before release, I still need to implement support for footnotes and endnotes (which is pretty easy). Which brings me to the main reason I'm writing. Before releasing the code, I'd really like to test it on a couple of in the wild documents. It does pretty well on the test documents I've thrown at it from my own library. But ... that's just me. I use Word in a very particular way. If there's anyone who wouldn't mind, I'd really like to throw other test documents at it. If you would be willing to donate one, please let me know. This would allow me to check a wide variety of work and nail down a couple more issues before a public test. I will keep all documents confidential and delete after I've finished testing. If everything goes well, I'll release the 0.1 version (which will still need quite some cleaning up) early next week. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
Hi James, On 3/2/2012 4:18 PM, James Sutherland wrote: This sounds very nice! Thanks. I appreciate that. Any ideas about whether you will be able to support cross references and translate that into LyX/LaTeX labels/references? James Short answer, yes. It's one of the three or four things I still have yet to implement. It will be in the 0.1 release, though. I'm also planning on translating embedded data (such as traveling EndNote bibliographies or Zotero inserts) into BibTeX databases and adding citation commands. That, however, will have to be a 0.2 feature as it requires quite a bit more infrastructure to support. Cheers, Rob
word2lyx (Word to LyX Translator): Status Update
Dear Users and Developers, I wanted to give everyone a quick status update on what I've been doing with the Word to LyX importer. Over the past couple of weeks, I've been working on it full steam and it's now pretty functional. It supports: 1. Translating Word paragraph and character styles to LyX paragraph and character styles. In the case of character styles that aren't defined, it will write entries for them into the local layout (including basic LaTeX commands). 2. Importing Word tables, including those with merged rows or columns. It will also do its best with the table borders. 3. Enumerated and itemized lists. 4. Importing images from the Word document. (It skips over embedded objects, such as charts from Excel.) 5. The use of custom templates, which allows you to fine tune importing your documents. I've created templates for article.cls and book.cls. I'll also probably create one for memoir.cls as well. Before release, I still need to implement support for footnotes and endnotes (which is pretty easy). Which brings me to the main reason I'm writing. Before releasing the code, I'd really like to test it on a couple of "in the wild" documents. It does pretty well on the test documents I've thrown at it from my own library. But ... that's just me. I use Word in a very particular way. If there's anyone who wouldn't mind, I'd really like to throw other test documents at it. If you would be willing to donate one, please let me know. This would allow me to check a wide variety of work and nail down a couple more issues before a public test. I will keep all documents confidential and delete after I've finished testing. If everything goes well, I'll release the 0.1 version (which will still need quite some cleaning up) early next week. Cheers, Rob
Re: word2lyx (Word to LyX Translator): Status Update
Hi James, On 3/2/2012 4:18 PM, James Sutherland wrote: > This sounds very nice! Thanks. I appreciate that. > Any ideas about whether you will be able to support cross references > and translate that into LyX/LaTeX labels/references? > James Short answer, yes. It's one of the three or four things I still have yet to implement. It will be in the 0.1 release, though. I'm also planning on translating embedded data (such as traveling EndNote bibliographies or Zotero inserts) into BibTeX databases and adding citation commands. That, however, will have to be a 0.2 feature as it requires quite a bit more infrastructure to support. Cheers, Rob
Re: eLyXer for Document Parsing
On 2/9/2012 11:42 AM, Alex Fernandez wrote: Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the LyX document, not of the resulting HTML document. Much tighter this way, IMHO. Is there an example of how I might be able to access the in-memory representation for the LyX document? If possible, I'd like to be able to get some sort of iterable object that could be used to translate the structure into the XML structure used by Microsoft Word. Cheers, Rob
Re: eLyXer for Document Parsing
On 2/9/2012 11:42 AM, Alex Fernandez wrote: Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the LyX document, not of the resulting HTML document. Much tighter this way, IMHO. Is there an example of how I might be able to access the in-memory representation for the LyX document? If possible, I'd like to be able to get some sort of iterable object that could be used to translate the structure into the XML structure used by Microsoft Word. Cheers, Rob
Re: eLyXer for Document Parsing
On 2/9/2012 11:42 AM, Alex Fernandez wrote: > Ah, OK. Always hated DOM. eLyXer's in-memory representation is for the > LyX document, not of the resulting HTML document. Much tighter this > way, IMHO. Is there an example of how I might be able to access the in-memory representation for the LyX document? If possible, I'd like to be able to get some sort of iterable object that could be used to translate the structure into the XML structure used by Microsoft Word. Cheers, Rob
Re: eLyXer for Document Parsing
On Feb 5, 2012, at 2:04 AM, Abdelrazak Younes wrote: Strong suggestion: use LyX proper. I am quite sure you already know that because I saw some patches from you in this area but I'll explain anyway: LyX's html own export is so good and fast because it effectively knows the in-memory representation of the document. You can't be faster nor more accurate than that. I mean, unless you want to rewrite LyX in python. Extremely good point, I'm also more comfortable with the HTML export available in LyX. I initially was interested in eLyXer because I thought I might be able to use it to help with an import filter as well. I'm not sure that it can, though. As you note in your email, it doesn't create a document model. IIUC you want a single module in python for both import and export in python. But I don't think this is a valid argument. As for the word to lyx format conversion, if you want to use this epub library there must be a way to use that in C++ I'm sure… I though about using Python because I'd found a tool capable of generating docx for me. After working with it a little more, though, I'm less enamored with it. docx is a pretty straightforward file format, and there's quite a few things that are sloppily implemented. AFAIK, eLyXer doesn't construct a document model. So you'd better spend this time reading the C++ code for exporting to html/xhtml ;-) Following Steve's suggestion, I decided to try the easy way and directly parse the XHTML created by eLyXer. Turns out that it's not only easy, but probably the best way forward. There are some excellent libraries for reading XML in python. Using lxml, in particular, looks like a good solution. You generate the XHTML, parse it with lxml, and then iterate over the elements, translating as you go. My current script is about 50 lines long, and can be used with either native XHTML or eLyXer. To add new features, you add additional cases describing how to translate the XHTML. Which brings us to an important point: there's already a pretty good LyX - XHTML - LibreOffice - Word pathway for translating documents. Unless I directly implement Word as another backend (which, while a lot of work, isn't difficult), I'm not sure there's much reason for a direct MS Word export. The real need seems to be for an MS Word import, anyway. Cheers, Rob
Re: eLyXer for Document Parsing
On Feb 5, 2012, at 2:04 AM, Abdelrazak Younes wrote: Strong suggestion: use LyX proper. I am quite sure you already know that because I saw some patches from you in this area but I'll explain anyway: LyX's html own export is so good and fast because it effectively knows the in-memory representation of the document. You can't be faster nor more accurate than that. I mean, unless you want to rewrite LyX in python. Extremely good point, I'm also more comfortable with the HTML export available in LyX. I initially was interested in eLyXer because I thought I might be able to use it to help with an import filter as well. I'm not sure that it can, though. As you note in your email, it doesn't create a document model. IIUC you want a single module in python for both import and export in python. But I don't think this is a valid argument. As for the word to lyx format conversion, if you want to use this epub library there must be a way to use that in C++ I'm sure… I though about using Python because I'd found a tool capable of generating docx for me. After working with it a little more, though, I'm less enamored with it. docx is a pretty straightforward file format, and there's quite a few things that are sloppily implemented. AFAIK, eLyXer doesn't construct a document model. So you'd better spend this time reading the C++ code for exporting to html/xhtml ;-) Following Steve's suggestion, I decided to try the easy way and directly parse the XHTML created by eLyXer. Turns out that it's not only easy, but probably the best way forward. There are some excellent libraries for reading XML in python. Using lxml, in particular, looks like a good solution. You generate the XHTML, parse it with lxml, and then iterate over the elements, translating as you go. My current script is about 50 lines long, and can be used with either native XHTML or eLyXer. To add new features, you add additional cases describing how to translate the XHTML. Which brings us to an important point: there's already a pretty good LyX - XHTML - LibreOffice - Word pathway for translating documents. Unless I directly implement Word as another backend (which, while a lot of work, isn't difficult), I'm not sure there's much reason for a direct MS Word export. The real need seems to be for an MS Word import, anyway. Cheers, Rob
Re: eLyXer for Document Parsing
On Feb 5, 2012, at 2:04 AM, Abdelrazak Younes wrote: > Strong suggestion: use LyX proper. I am quite sure you already know that > because I saw some patches from you in this area but I'll explain anyway: > LyX's html own export is so good and fast because it effectively knows the > in-memory representation of the document. You can't be faster nor more > accurate than that. I mean, unless you want to rewrite LyX in python. Extremely good point, I'm also more comfortable with the HTML export available in LyX. I initially was interested in eLyXer because I thought I might be able to use it to help with an import filter as well. I'm not sure that it can, though. As you note in your email, it doesn't create a document model. > IIUC you want a single module in python for both import and export in python. > But I don't think this is a valid argument. As for the word to lyx format > conversion, if you want to use this epub library there must be a way to use > that in C++ I'm sure… I though about using Python because I'd found a tool capable of generating docx for me. After working with it a little more, though, I'm less enamored with it. docx is a pretty straightforward file format, and there's quite a few things that are sloppily implemented. > AFAIK, eLyXer doesn't construct a document model. So you'd better spend this > time reading the C++ code for exporting to html/xhtml ;-) Following Steve's suggestion, I decided to try the "easy" way and directly parse the XHTML created by eLyXer. Turns out that it's not only easy, but probably the best way forward. There are some excellent libraries for reading XML in python. Using lxml, in particular, looks like a good solution. You generate the XHTML, parse it with lxml, and then iterate over the elements, translating as you go. My current script is about 50 lines long, and can be used with either native XHTML or eLyXer. To add new features, you add additional cases describing how to translate the XHTML. Which brings us to an important point: there's already a pretty good LyX -> XHTML -> LibreOffice -> Word pathway for translating documents. Unless I directly implement Word as another backend (which, while a lot of work, isn't difficult), I'm not sure there's much reason for a direct MS Word export. The real need seems to be for an MS Word import, anyway. Cheers, Rob
eLyXer for Document Parsing
Dear eLyXer Users and Developers, I'm still at work on the import/export module for Microsoft Word documents. I'm making pretty good progress. I've got a rough prototype that works pretty well and I'm now starting to refine it. My approach up to now has been to use regular expressions to match portions of the document and then use a library to translate those to the corresponding Word XML structures. It's working pretty well with my simple test documents. Before going too far with this approach, though, I wanted to post (another general query). In the eLyXer library, there is already a robust set of tools used for converting LyX documents to HTML. Does anyone know if the library is written in such as way that getting a generic in-memory representation of the document would be possible? It would be awesome to re-use as much existing code for the Word document export as possible. That would allow me to support a broader number of features, and gives me a framework for working with maths. Any thoughts Alex (and others)? I've downloaded the sources and have begun to work through them, but before spending hours to days trying to wrap my head around them, I thought I would ask. Cheers, Rob
Re: eLyXer for Document Parsing
Hi Steve, Not only possible but easy if you do things the Steve Litt way. eLyXer quickly punches out HTML that's clean enough to read with an XML parser, I think. So, eLyXer converts to HTML, and then your program's DOMbuilder module converts that HTML to in-memory DOM. No muss, no fuss, no bother, no picking apart eLyXer code (it's big and not immediately obvious, not a single weekend task). Thanks for the recommendations. I'll need to look into this further. It's definitely the easiest way to go, and easy is usually the best. So says the Zen of Python (sort of): If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! I was hoping for a slightly more direct route, though. That would allow me to maintain some of the internal data, such as cross-links. But, as I don't have months to implement, easy is always better than hard. One more question: You sure you want to go in-memory? What happens if a guy has a 1200 page book with 100 chapters each containing 10 sections, each containing 10 subsections, and tries to parse it on a machine with 512 MB RAM? I pity this poor man's decision to convert the whole mess to Word, rather than splitting it out into individual chapters. But, I appreciate the voice for reason answer sanity and best practice. Short answer, no, not convinced that I want to go in memory. My first pass was to just to become comfortable with eLyXer to see if it might meet my needs. I'm still try to get comfortable with the structure of LyX documents and .docx documents. I've found a nice little python library with support for basic docx features and was going to try and refine that to something slightly more usable. You in a heap of trouble son. He'll be swapped half way into the next century. If instead you used an event parser (e.g SAX) with a few stacks, it will probably be slower, and it will be much more hard to write, but for practical purposes there won't be an upper limit on input file size. Good points. The python library makes use of lxml, which supports sax. After I've got a better handle on my constraints, I'll spend the time required to design something more robust. Cheers, Rob
eLyXer for Document Parsing
Dear eLyXer Users and Developers, I'm still at work on the import/export module for Microsoft Word documents. I'm making pretty good progress. I've got a rough prototype that works pretty well and I'm now starting to refine it. My approach up to now has been to use regular expressions to match portions of the document and then use a library to translate those to the corresponding Word XML structures. It's working pretty well with my simple test documents. Before going too far with this approach, though, I wanted to post (another general query). In the eLyXer library, there is already a robust set of tools used for converting LyX documents to HTML. Does anyone know if the library is written in such as way that getting a generic in-memory representation of the document would be possible? It would be awesome to re-use as much existing code for the Word document export as possible. That would allow me to support a broader number of features, and gives me a framework for working with maths. Any thoughts Alex (and others)? I've downloaded the sources and have begun to work through them, but before spending hours to days trying to wrap my head around them, I thought I would ask. Cheers, Rob
Re: eLyXer for Document Parsing
Hi Steve, Not only possible but easy if you do things the Steve Litt way. eLyXer quickly punches out HTML that's clean enough to read with an XML parser, I think. So, eLyXer converts to HTML, and then your program's DOMbuilder module converts that HTML to in-memory DOM. No muss, no fuss, no bother, no picking apart eLyXer code (it's big and not immediately obvious, not a single weekend task). Thanks for the recommendations. I'll need to look into this further. It's definitely the easiest way to go, and easy is usually the best. So says the Zen of Python (sort of): If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! I was hoping for a slightly more direct route, though. That would allow me to maintain some of the internal data, such as cross-links. But, as I don't have months to implement, easy is always better than hard. One more question: You sure you want to go in-memory? What happens if a guy has a 1200 page book with 100 chapters each containing 10 sections, each containing 10 subsections, and tries to parse it on a machine with 512 MB RAM? I pity this poor man's decision to convert the whole mess to Word, rather than splitting it out into individual chapters. But, I appreciate the voice for reason answer sanity and best practice. Short answer, no, not convinced that I want to go in memory. My first pass was to just to become comfortable with eLyXer to see if it might meet my needs. I'm still try to get comfortable with the structure of LyX documents and .docx documents. I've found a nice little python library with support for basic docx features and was going to try and refine that to something slightly more usable. You in a heap of trouble son. He'll be swapped half way into the next century. If instead you used an event parser (e.g SAX) with a few stacks, it will probably be slower, and it will be much more hard to write, but for practical purposes there won't be an upper limit on input file size. Good points. The python library makes use of lxml, which supports sax. After I've got a better handle on my constraints, I'll spend the time required to design something more robust. Cheers, Rob
eLyXer for Document Parsing
Dear eLyXer Users and Developers, I'm still at work on the import/export module for Microsoft Word documents. I'm making pretty good progress. I've got a rough prototype that works pretty well and I'm now starting to refine it. My approach up to now has been to use regular expressions to match portions of the document and then use a library to translate those to the corresponding Word XML structures. It's working pretty well with my simple test documents. Before going too far with this approach, though, I wanted to post (another general query). In the eLyXer library, there is already a robust set of tools used for converting LyX documents to HTML. Does anyone know if the library is written in such as way that getting a generic in-memory representation of the document would be possible? It would be awesome to re-use as much existing code for the Word document export as possible. That would allow me to support a broader number of features, and gives me a framework for working with maths. Any thoughts Alex (and others)? I've downloaded the sources and have begun to work through them, but before spending hours to days trying to wrap my head around them, I thought I would ask. Cheers, Rob
Re: eLyXer for Document Parsing
Hi Steve, > Not only possible but easy if you do things the Steve Litt way. eLyXer > quickly punches out HTML that's clean enough to read with an XML > parser, I think. So, eLyXer converts to HTML, and then your program's > DOMbuilder module converts that HTML to in-memory DOM. No muss, no > fuss, no bother, no picking apart eLyXer code (it's big and not > immediately obvious, not a single weekend task). Thanks for the recommendations. I'll need to look into this further. It's definitely the easiest way to go, and easy is usually the best. So says the Zen of Python (sort of): If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! I was hoping for a slightly more direct route, though. That would allow me to maintain some of the internal data, such as cross-links. But, as I don't have months to implement, easy is always better than hard. > One more question: You sure you want to go in-memory? What happens if a > guy has a 1200 page book with 100 chapters each containing 10 sections, > each containing 10 subsections, and tries to parse it on a machine with 512 > MB RAM? I pity this poor man's decision to convert the whole mess to Word, rather than splitting it out into individual chapters. But, I appreciate the voice for reason answer sanity and best practice. Short answer, no, not convinced that I want to go in memory. My first pass was to just to become comfortable with eLyXer to see if it might meet my needs. I'm still try to get comfortable with the structure of LyX documents and .docx documents. I've found a nice little python library with support for basic docx features and was going to try and refine that to something slightly more usable. > You in a heap of trouble son. He'll be swapped half way into the next > century. If > instead you used an event parser (e.g SAX) with a few stacks, it will > probably be slower, and it will be much more hard to write, but for > practical purposes there won't be an upper limit on input file size. Good points. The python library makes use of lxml, which supports sax. After I've got a better handle on my constraints, I'll spend the time required to design something more robust. Cheers, Rob
Re: Import into LyX
Thank you everyone for the comments so far. I really appreciate hearing from others as it helps me to build out a more detailed use-case. In addition to the earlier questions, I have one more: How important is support of .doc? I know that it is the standard upon which the publishing industry is built, but … It's a real pain to parse. In contrast, docx (the default file format in Word 2007 and 2010) is very parse. It's basically an XML document in a zipped folder with assets. I've already got a working prototype that can take a very simple LyX document and converts it to docx. Here's what supported: 1.) Syles 2.) Images/Figures Expanding this prototype is pretty easy. Trying to support doc is hard (painfully hard). There are pretty good import filters for OpenOffice and AbiWord for docx. docx is supported in Microsoft Word 2007 and 2010, and users of 2003 can download a plugin which is capable of reading it. If I go ahead with support for docx, I think I can write a full featured import/export plugin, including: 1.) Bibliographies using Word's native format and (maybe) Endnote (I've found a python library that can parse BibTeX and building export for these two formats is do-able) 2.) Cross-references (I still need to figure out how this is done in Word, but so-far, the docx standard is pretty easy to follow) 3.) Comments and Change Tracking How to deal with maths is still up in the air. LyX offers the ability to typeset nearly anything mathematical, which means there's a very large set of markup to support. Exporting to MathML might be one option, but that would require Word users to install a plugin. Exporting to Office Math Language (the new math language in Office 2007 and 2010) is another, but proprietary. Exporting to MathType is a third, which is both proprietary and requires that users install an add-in (which they have to pay for). I'm not particularly thrilled about any of the above. I'll continue to research and report what I find. In the meantime, hearing about what features should be supported would be very nice. Hearing your opinions about doc support (versus only docx support) would also be very helpful. Cheers, Rob
Re: Import into LyX
On Feb 2, 2012, at 11:26 AM, Les Denham wrote: Supporting Styles and Figures is a major achievement as far as I am concerned. I assume you don't do much in deciphering the fingerpainting favored by most Word users. Such crass formatting is probably best left as Standard in LyX anyway. Right, I'm not getting into the game where I'm going to try and support all of the formatting combinations that Word users can come up with. But I do intend to support styles in all of their incarnations: paragraph, character, and otherwise. To make this possible, what I'll probably do is use the book/article classes as a basis for the import and then generate placeholder entries for other styles in the LyX local layout. That will prevent errors and problems and allow for you to convert to the document class of your choice without problems. Once there, you remove the placeholder entries, or define them further. Cheers, Rob
Request for Feedback (OpenSource Materials)
In addition to the other request for feedback, I was wondering if I might pester the community for one other favor. I'm currently putting together materials for a workshop. It's meant to introduce students (math, science, graduate, medical) to open tools and how they can be used for writing. It's based on the never-ending book project. I'm hoping to use both videos and handouts. All of the workshop materials will be released under the GPL (or the open documentation license, I haven't decided which). Here is a brief outline: 1.) Word processors versus document processors and why you should be using the latter (Workshop Discussion) 2.) Preparing major documents, such as your thesis or book, with LyX and LaTeX (Workshop Discussion) 4.) Setup and installation of LyX, LaTeX, and related tools (R, Sweave, Knitr) (Video Series) 3.) Creating and maintaining a bibliographic database (Zotero, BibTeX) (Video Series) 5.) Collaboration with version control systems, such as Subversion (Handout) While I'm still working on the first four points of the outline, I've managed to get most of the Version Control handout written. I was wondering if I could solicit feedback on what's been produced so far: 1.) Part 1: Why You Should be Using Version Control (http://blog.oak-tree.us/index.php/2009/02/13/subversion1) 2.) Part 2: Advanced Stuff (http://blog.oak-tree.us/index.php/2012/01/20/subversion2) 3.) Part 3.1: Collaboration Fundamentals (http://blog.oak-tree.us/index.php/2012/01/24/subversion31) 4.) Part 3.2: Locks and Idea Ownership (http://blog.oak-tree.us/index.php/2012/01/25/subversion32) 5.) Part 3.3: Communication and Logs (http://blog.oak-tree.us/index.php/2012/01/27/subversion33) 6.) Part 3.4: Using Branches for Review (http://blog.oak-tree.us/index.php/2012/01/30/subversion34) 7.) Part 4: Handling Conflicts and Errors (http://blog.oak-tree.us/index.php/2012/02/01/subversion4) Thoughts related to style, structure, and content would all be appreciated. As the project is only tangentially related to LyX, though, I would appreciate comments on the posts or private mail. (I don't want to spam uninterested parties.) Cheers, Rob
Re: Import into LyX
Thank you everyone for the comments so far. I really appreciate hearing from others as it helps me to build out a more detailed use-case. In addition to the earlier questions, I have one more: How important is support of .doc? I know that it is the standard upon which the publishing industry is built, but … It's a real pain to parse. In contrast, docx (the default file format in Word 2007 and 2010) is very parse. It's basically an XML document in a zipped folder with assets. I've already got a working prototype that can take a very simple LyX document and converts it to docx. Here's what supported: 1.) Syles 2.) Images/Figures Expanding this prototype is pretty easy. Trying to support doc is hard (painfully hard). There are pretty good import filters for OpenOffice and AbiWord for docx. docx is supported in Microsoft Word 2007 and 2010, and users of 2003 can download a plugin which is capable of reading it. If I go ahead with support for docx, I think I can write a full featured import/export plugin, including: 1.) Bibliographies using Word's native format and (maybe) Endnote (I've found a python library that can parse BibTeX and building export for these two formats is do-able) 2.) Cross-references (I still need to figure out how this is done in Word, but so-far, the docx standard is pretty easy to follow) 3.) Comments and Change Tracking How to deal with maths is still up in the air. LyX offers the ability to typeset nearly anything mathematical, which means there's a very large set of markup to support. Exporting to MathML might be one option, but that would require Word users to install a plugin. Exporting to Office Math Language (the new math language in Office 2007 and 2010) is another, but proprietary. Exporting to MathType is a third, which is both proprietary and requires that users install an add-in (which they have to pay for). I'm not particularly thrilled about any of the above. I'll continue to research and report what I find. In the meantime, hearing about what features should be supported would be very nice. Hearing your opinions about doc support (versus only docx support) would also be very helpful. Cheers, Rob
Re: Import into LyX
On Feb 2, 2012, at 11:26 AM, Les Denham wrote: Supporting Styles and Figures is a major achievement as far as I am concerned. I assume you don't do much in deciphering the fingerpainting favored by most Word users. Such crass formatting is probably best left as Standard in LyX anyway. Right, I'm not getting into the game where I'm going to try and support all of the formatting combinations that Word users can come up with. But I do intend to support styles in all of their incarnations: paragraph, character, and otherwise. To make this possible, what I'll probably do is use the book/article classes as a basis for the import and then generate placeholder entries for other styles in the LyX local layout. That will prevent errors and problems and allow for you to convert to the document class of your choice without problems. Once there, you remove the placeholder entries, or define them further. Cheers, Rob
Request for Feedback (OpenSource Materials)
In addition to the other request for feedback, I was wondering if I might pester the community for one other favor. I'm currently putting together materials for a workshop. It's meant to introduce students (math, science, graduate, medical) to open tools and how they can be used for writing. It's based on the never-ending book project. I'm hoping to use both videos and handouts. All of the workshop materials will be released under the GPL (or the open documentation license, I haven't decided which). Here is a brief outline: 1.) Word processors versus document processors and why you should be using the latter (Workshop Discussion) 2.) Preparing major documents, such as your thesis or book, with LyX and LaTeX (Workshop Discussion) 4.) Setup and installation of LyX, LaTeX, and related tools (R, Sweave, Knitr) (Video Series) 3.) Creating and maintaining a bibliographic database (Zotero, BibTeX) (Video Series) 5.) Collaboration with version control systems, such as Subversion (Handout) While I'm still working on the first four points of the outline, I've managed to get most of the Version Control handout written. I was wondering if I could solicit feedback on what's been produced so far: 1.) Part 1: Why You Should be Using Version Control (http://blog.oak-tree.us/index.php/2009/02/13/subversion1) 2.) Part 2: Advanced Stuff (http://blog.oak-tree.us/index.php/2012/01/20/subversion2) 3.) Part 3.1: Collaboration Fundamentals (http://blog.oak-tree.us/index.php/2012/01/24/subversion31) 4.) Part 3.2: Locks and Idea Ownership (http://blog.oak-tree.us/index.php/2012/01/25/subversion32) 5.) Part 3.3: Communication and Logs (http://blog.oak-tree.us/index.php/2012/01/27/subversion33) 6.) Part 3.4: Using Branches for Review (http://blog.oak-tree.us/index.php/2012/01/30/subversion34) 7.) Part 4: Handling Conflicts and Errors (http://blog.oak-tree.us/index.php/2012/02/01/subversion4) Thoughts related to style, structure, and content would all be appreciated. As the project is only tangentially related to LyX, though, I would appreciate comments on the posts or private mail. (I don't want to spam uninterested parties.) Cheers, Rob
Re: Import into LyX
Thank you everyone for the comments so far. I really appreciate hearing from others as it helps me to build out a more detailed use-case. In addition to the earlier questions, I have one more: How important is support of .doc? I know that it is the standard upon which the publishing industry is built, but … It's a real pain to parse. In contrast, docx (the default file format in Word 2007 and 2010) is very parse. It's basically an XML document in a zipped folder with assets. I've already got a working prototype that can take a very simple LyX document and converts it to docx. Here's what supported: 1.) Syles 2.) Images/Figures Expanding this prototype is pretty easy. Trying to support doc is hard (painfully hard). There are pretty good import filters for OpenOffice and AbiWord for docx. docx is supported in Microsoft Word 2007 and 2010, and users of 2003 can download a plugin which is capable of reading it. If I go ahead with support for docx, I think I can write a full featured import/export plugin, including: 1.) Bibliographies using Word's native format and (maybe) Endnote (I've found a python library that can parse BibTeX and building export for these two formats is do-able) 2.) Cross-references (I still need to figure out how this is done in Word, but so-far, the docx standard is pretty easy to follow) 3.) Comments and Change Tracking How to deal with maths is still up in the air. LyX offers the ability to typeset nearly anything mathematical, which means there's a very large set of markup to support. Exporting to MathML might be one option, but that would require Word users to install a plugin. Exporting to Office Math Language (the new math language in Office 2007 and 2010) is another, but proprietary. Exporting to MathType is a third, which is both proprietary and requires that users install an add-in (which they have to pay for). I'm not particularly thrilled about any of the above. I'll continue to research and report what I find. In the meantime, hearing about what features should be supported would be very nice. Hearing your opinions about doc support (versus only docx support) would also be very helpful. Cheers, Rob
Re: Import into LyX
On Feb 2, 2012, at 11:26 AM, Les Denham wrote: > Supporting Styles and Figures is a major achievement as far as I am > concerned. I assume you don't do much in deciphering the fingerpainting > favored by most Word users. Such crass formatting is probably best left > as Standard in LyX anyway. Right, I'm not getting into the game where I'm going to try and support all of the formatting combinations that Word users can come up with. But I do intend to support styles in all of their incarnations: paragraph, character, and otherwise. To make this possible, what I'll probably do is use the book/article classes as a basis for the import and then generate placeholder entries for other styles in the LyX local layout. That will prevent errors and problems and allow for you to convert to the document class of your choice without problems. Once there, you remove the placeholder entries, or define them further. Cheers, Rob
Request for Feedback (OpenSource Materials)
In addition to the other request for feedback, I was wondering if I might pester the community for one other favor. I'm currently putting together materials for a workshop. It's meant to introduce students (math, science, graduate, medical) to open tools and how they can be used for writing. It's based on the never-ending book project. I'm hoping to use both videos and handouts. All of the workshop materials will be released under the GPL (or the open documentation license, I haven't decided which). Here is a brief outline: 1.) Word processors versus document processors and why you should be using the latter (Workshop Discussion) 2.) Preparing major documents, such as your thesis or book, with LyX and LaTeX (Workshop Discussion) 4.) Setup and installation of LyX, LaTeX, and related tools (R, Sweave, Knitr) (Video Series) 3.) Creating and maintaining a bibliographic database (Zotero, BibTeX) (Video Series) 5.) Collaboration with version control systems, such as Subversion (Handout) While I'm still working on the first four points of the outline, I've managed to get most of the Version Control handout written. I was wondering if I could solicit feedback on what's been produced so far: 1.) Part 1: Why You Should be Using Version Control (http://blog.oak-tree.us/index.php/2009/02/13/subversion1) 2.) Part 2: Advanced Stuff (http://blog.oak-tree.us/index.php/2012/01/20/subversion2) 3.) Part 3.1: Collaboration Fundamentals (http://blog.oak-tree.us/index.php/2012/01/24/subversion31) 4.) Part 3.2: Locks and Idea Ownership (http://blog.oak-tree.us/index.php/2012/01/25/subversion32) 5.) Part 3.3: Communication and Logs (http://blog.oak-tree.us/index.php/2012/01/27/subversion33) 6.) Part 3.4: Using Branches for Review (http://blog.oak-tree.us/index.php/2012/01/30/subversion34) 7.) Part 4: Handling Conflicts and Errors (http://blog.oak-tree.us/index.php/2012/02/01/subversion4) Thoughts related to style, structure, and content would all be appreciated. As the project is only tangentially related to LyX, though, I would appreciate comments on the posts or private mail. (I don't want to spam uninterested parties.) Cheers, Rob
Import into LyX
Dear Users and Developers, Some time ago, I was experimenting with importing documents into LyX (specifically about how to crack the import MS Word to LyX nut). In the process, I got really excited about using OpenOffice to convert the word document to HTML, running tidy on the HTML and then importing that way. (The original blog article about this can be found at http://blog.oak-tree.us/index.php/2010/05/14/msword-lyx-import.) Since I'm (re)writing a book chapter about this topic, I thought that I would look at alternative strategies for importing Word (and other file formats) into LyX. While doing research, I came across a (potentially) much better solution. Somewhat recently (in 2010), a group of Python libraries were written that handle document conversions. They are part of the epub-tools library (http://code.google.com/p/epub-tools/). (I've been experimenting with ePub document creation from LyX, which is how I found them.) One of the tools in the library is able to parse Microsoft word documents and convert them to XHTML in preparation for generating an ePub file. I think that the tool can be adapted for directly converting Word docs to LyX. Not to LaTeX and then to LyX, but /directly to LyX/. I'm putting together a library to experiment with direct conversions (this is ostensibly being done for the never-ending book project, but will be released as open code), but before getting too deep into development, I wanted to poll: 1. Is this a tool that would prove useful to yourselves, your collaborators, and others? 2. What features would you consider essential? (Right now, styles based conversion looks pretty easy -- going from Heading 1 in Word to Chapter, for example. But I'm not sure how well it would convert maths. This is something I'll still need to look at, and may require writing an additional module.) 3. What is the best tool to look at for guidance in creating a new script for word2lyx? tex2lyx? 4. Does the script need to support special cases, such as importing Word track changes? 5. Just how important do you consider round-tripping a document, e.g., going from LyX to Word and back to LyX. 6. Is there anyone who might be interested in collaborating on this? Any thoughts would be greatly appreciated. Cheers, Rob Oakes
Import into LyX
Dear Users and Developers, Some time ago, I was experimenting with importing documents into LyX (specifically about how to crack the import MS Word to LyX nut). In the process, I got really excited about using OpenOffice to convert the word document to HTML, running tidy on the HTML and then importing that way. (The original blog article about this can be found at http://blog.oak-tree.us/index.php/2010/05/14/msword-lyx-import.) Since I'm (re)writing a book chapter about this topic, I thought that I would look at alternative strategies for importing Word (and other file formats) into LyX. While doing research, I came across a (potentially) much better solution. Somewhat recently (in 2010), a group of Python libraries were written that handle document conversions. They are part of the epub-tools library (http://code.google.com/p/epub-tools/). (I've been experimenting with ePub document creation from LyX, which is how I found them.) One of the tools in the library is able to parse Microsoft word documents and convert them to XHTML in preparation for generating an ePub file. I think that the tool can be adapted for directly converting Word docs to LyX. Not to LaTeX and then to LyX, but /directly to LyX/. I'm putting together a library to experiment with direct conversions (this is ostensibly being done for the never-ending book project, but will be released as open code), but before getting too deep into development, I wanted to poll: 1. Is this a tool that would prove useful to yourselves, your collaborators, and others? 2. What features would you consider essential? (Right now, styles based conversion looks pretty easy -- going from Heading 1 in Word to Chapter, for example. But I'm not sure how well it would convert maths. This is something I'll still need to look at, and may require writing an additional module.) 3. What is the best tool to look at for guidance in creating a new script for word2lyx? tex2lyx? 4. Does the script need to support special cases, such as importing Word track changes? 5. Just how important do you consider round-tripping a document, e.g., going from LyX to Word and back to LyX. 6. Is there anyone who might be interested in collaborating on this? Any thoughts would be greatly appreciated. Cheers, Rob Oakes
Import into LyX
Dear Users and Developers, Some time ago, I was experimenting with importing documents into LyX (specifically about how to crack the import MS Word to LyX nut). In the process, I got really excited about using OpenOffice to convert the word document to HTML, running tidy on the HTML and then importing that way. (The original blog article about this can be found at http://blog.oak-tree.us/index.php/2010/05/14/msword-lyx-import.) Since I'm (re)writing a book chapter about this topic, I thought that I would look at alternative strategies for importing Word (and other file formats) into LyX. While doing research, I came across a (potentially) much better solution. Somewhat recently (in 2010), a group of Python libraries were written that handle document conversions. They are part of the epub-tools library (http://code.google.com/p/epub-tools/). (I've been experimenting with ePub document creation from LyX, which is how I found them.) One of the tools in the library is able to parse Microsoft word documents and convert them to XHTML in preparation for generating an ePub file. I think that the tool can be adapted for directly converting Word docs to LyX. Not to LaTeX and then to LyX, but /directly to LyX/. I'm putting together a library to experiment with direct conversions (this is ostensibly being done for the never-ending book project, but will be released as open code), but before getting too deep into development, I wanted to poll: 1. Is this a tool that would prove useful to yourselves, your collaborators, and others? 2. What features would you consider essential? (Right now, styles based conversion looks pretty easy -- going from Heading 1 in Word to Chapter, for example. But I'm not sure how well it would convert maths. This is something I'll still need to look at, and may require writing an additional module.) 3. What is the best tool to look at for guidance in creating a new script for word2lyx? tex2lyx? 4. Does the script need to support special cases, such as importing Word "track changes"? 5. Just how important do you consider "round-tripping" a document, e.g., going from LyX to Word and back to LyX. 6. Is there anyone who might be interested in collaborating on this? Any thoughts would be greatly appreciated. Cheers, Rob Oakes
Updated Kindle Tools
Dear LyX Users, Given the recent discussion about publishing to the Kindle format, I thought that this announcement might be of interest to you. Amazon just recently updated its suite of KindleGen tools to support HTML5 and CSS. http://www.amazon.com/gp/feature.html/ref=amb_link_357613402_1?ie=UTF8docId=1000765211pf_rd_m=ATVPDKIKX0DERpf_rd_s=center-3pf_rd_r=0VB74HFFHHNP48JT0NZ3pf_rd_t=1401pf_rd_p=1343256902pf_rd_i=1000729511 The main tool, KindleGen, is both cross platform and command line, which means that it might be possible to add converters to LyX. One of the input formats is HTML/XHTML. It would probably be pretty easy to add a converter for it. Cheers, Rob
Updated Kindle Tools
Dear LyX Users, Given the recent discussion about publishing to the Kindle format, I thought that this announcement might be of interest to you. Amazon just recently updated its suite of KindleGen tools to support HTML5 and CSS. http://www.amazon.com/gp/feature.html/ref=amb_link_357613402_1?ie=UTF8docId=1000765211pf_rd_m=ATVPDKIKX0DERpf_rd_s=center-3pf_rd_r=0VB74HFFHHNP48JT0NZ3pf_rd_t=1401pf_rd_p=1343256902pf_rd_i=1000729511 The main tool, KindleGen, is both cross platform and command line, which means that it might be possible to add converters to LyX. One of the input formats is HTML/XHTML. It would probably be pretty easy to add a converter for it. Cheers, Rob
Updated Kindle Tools
Dear LyX Users, Given the recent discussion about publishing to the Kindle format, I thought that this announcement might be of interest to you. Amazon just recently updated its suite of KindleGen tools to support HTML5 and CSS. http://www.amazon.com/gp/feature.html/ref=amb_link_357613402_1?ie=UTF8=1000765211_rd_m=ATVPDKIKX0DER_rd_s=center-3_rd_r=0VB74HFFHHNP48JT0NZ3_rd_t=1401_rd_p=1343256902_rd_i=1000729511 The main tool, KindleGen, is both cross platform and command line, which means that it might be possible to add converters to LyX. One of the input formats is HTML/XHTML. It would probably be pretty easy to add a converter for it. Cheers, Rob
HTML Footnotes as Endnotes
Dear LyX Developers, I've continued working on some of the challenges to getting clean ePub from LyX and have finished an inset that tentatively allows you to move footnotes to endnotes when exporting to HTML. Attached is a patch implementing the change (or the logic of it, at least). I'd appreciate any comments. Cheers, Rob Oakes htmlendnotelist.diff Description: Binary data
Re: Pass LyX comments through eLyXer?
I for one would like for the topic to remain here. I don't follow the discussion on the eLyXer list, but knowing what developments happen with this topic are useful for things I'm working on. Especially if whatever Steve and Alex create can be adapted to work with the native XHTML modifications I'm trying to make. To move it in a new direction, what tags are most important to Kindle? In what ways could the native LyX output be refined (I can create layouts/modules that fix these for testing purposes)? Where does the current implementation cause problems and for what reasons? (I'm currently looking into the situations raised by Steve.) I've been delving into various ePub resources and I'm cleaning up the HTML based on HTML5 best practices, but it would be useful to know where else I can focus my attention. Cheers, Rob
Re: HTML Footnotes as Endnotes
Hi Richard, Thanks for the feedback, I really appreciate it. On Dec 6, 2011, at 4:39 PM, Richard Heck wrote: I wonder if we'd be better just outputting footnotes as endnotes all the time. The inline version we now use is cool, but maybe it's too cool for it's own good. I actually think that would be a really good thing. It makes everything much easier to work with. (Or at least, that's what I think.) Second, I've been thinking recently about introducing some sort of chapter splitting capability. Not so important for e-books probably, but useful for the good old web. And very useful for eBooks as well. Due to the way that ePub works, at least, smaller HTML files load faster. In that case, one would want to be able to output footnotes per chapter. There might be other cases where people wanted to print endnotes per chapter, even without the splitting. That suggests the idea of collecting the footnotes along the way in some kind of structure, and then emptying it when it comes time to print them, which could then be at any time. Very roughly: In LaTeXFeatures or some such place: std::listInsetFoot const * footlist; In InsetFoot::xhtml(): op.features.footlist.push_back(this); and then in InsetPrintEndnotes::xhtml(): listInsetFoot * footlist = op.features.footlist; while (!footlist.empty()) { InsetFoot const * foot = footlist.front(); footlist.pop_front(); ... // Something like this must be legal // I think this trick should simplify much of your code... xs foot-InsetFootlike::xhtml(); I'll look into implementing this tonight. Having this stuff working for the demo I'm doing tomorrow would be great Cheers, Rob
HTML Footnotes as Endnotes
Dear LyX Developers, I've continued working on some of the challenges to getting clean ePub from LyX and have finished an inset that tentatively allows you to move footnotes to endnotes when exporting to HTML. Attached is a patch implementing the change (or the logic of it, at least). I'd appreciate any comments. Cheers, Rob Oakes htmlendnotelist.diff Description: Binary data
Re: Pass LyX comments through eLyXer?
I for one would like for the topic to remain here. I don't follow the discussion on the eLyXer list, but knowing what developments happen with this topic are useful for things I'm working on. Especially if whatever Steve and Alex create can be adapted to work with the native XHTML modifications I'm trying to make. To move it in a new direction, what tags are most important to Kindle? In what ways could the native LyX output be refined (I can create layouts/modules that fix these for testing purposes)? Where does the current implementation cause problems and for what reasons? (I'm currently looking into the situations raised by Steve.) I've been delving into various ePub resources and I'm cleaning up the HTML based on HTML5 best practices, but it would be useful to know where else I can focus my attention. Cheers, Rob
Re: HTML Footnotes as Endnotes
Hi Richard, Thanks for the feedback, I really appreciate it. On Dec 6, 2011, at 4:39 PM, Richard Heck wrote: I wonder if we'd be better just outputting footnotes as endnotes all the time. The inline version we now use is cool, but maybe it's too cool for it's own good. I actually think that would be a really good thing. It makes everything much easier to work with. (Or at least, that's what I think.) Second, I've been thinking recently about introducing some sort of chapter splitting capability. Not so important for e-books probably, but useful for the good old web. And very useful for eBooks as well. Due to the way that ePub works, at least, smaller HTML files load faster. In that case, one would want to be able to output footnotes per chapter. There might be other cases where people wanted to print endnotes per chapter, even without the splitting. That suggests the idea of collecting the footnotes along the way in some kind of structure, and then emptying it when it comes time to print them, which could then be at any time. Very roughly: In LaTeXFeatures or some such place: std::listInsetFoot const * footlist; In InsetFoot::xhtml(): op.features.footlist.push_back(this); and then in InsetPrintEndnotes::xhtml(): listInsetFoot * footlist = op.features.footlist; while (!footlist.empty()) { InsetFoot const * foot = footlist.front(); footlist.pop_front(); ... // Something like this must be legal // I think this trick should simplify much of your code... xs foot-InsetFootlike::xhtml(); I'll look into implementing this tonight. Having this stuff working for the demo I'm doing tomorrow would be great Cheers, Rob
HTML Footnotes as Endnotes
Dear LyX Developers, I've continued working on some of the challenges to getting clean ePub from LyX and have finished an inset that tentatively allows you to move footnotes to endnotes when exporting to HTML. Attached is a patch implementing the change (or the logic of it, at least). I'd appreciate any comments. Cheers, Rob Oakes htmlendnotelist.diff Description: Binary data
Re: Pass LyX comments through eLyXer?
I for one would like for the topic to remain here. I don't follow the discussion on the eLyXer list, but knowing what developments happen with this topic are useful for things I'm working on. Especially if whatever Steve and Alex create can be adapted to work with the native XHTML modifications I'm trying to make. To move it in a new direction, what tags are most important to Kindle? In what ways could the native LyX output be refined (I can create layouts/modules that fix these for testing purposes)? Where does the current implementation cause problems and for what reasons? (I'm currently looking into the situations raised by Steve.) I've been delving into various ePub resources and I'm cleaning up the HTML based on HTML5 best practices, but it would be useful to know where else I can focus my attention. Cheers, Rob
Re: HTML Footnotes as Endnotes
Hi Richard, Thanks for the feedback, I really appreciate it. On Dec 6, 2011, at 4:39 PM, Richard Heck wrote: > I wonder if we'd be better just outputting footnotes as endnotes > all the time. The inline version we now use is cool, but maybe it's too > cool for it's own good. I actually think that would be a really good thing. It makes everything much easier to work with. (Or at least, that's what I think.) > Second, I've been thinking recently about introducing some sort of > chapter splitting capability. Not so important for e-books probably, but > useful for the good old web. And very useful for eBooks as well. Due to the way that ePub works, at least, smaller HTML files load faster. > In that case, one would want to be able to output footnotes per chapter. > There might be other cases where people > wanted to print endnotes per chapter, even without the splitting. That > suggests the idea of "collecting" the footnotes along the way in some > kind of structure, and then emptying it when it comes time to print > them, which could then be at any time. Very roughly: > > In LaTeXFeatures or some such place: >std::list footlist; > In InsetFoot::xhtml(): >op.features.footlist.push_back(this); > and then in InsetPrintEndnotes::xhtml(): >list & footlist = op.features.footlist; >while (!footlist.empty()) { >InsetFoot const * foot = footlist.front(); >footlist.pop_front(); >... >// Something like this must be legal >// I think this trick should simplify much of your code... >xs << foot->InsetFootlike::xhtml(); I'll look into implementing this tonight. Having this stuff working for the demo I'm doing tomorrow would be great Cheers, Rob
Re: LyX and Kindle books
I am working on an ePub compatible module right now (document class at any rate). It's for a talk I'm giving at a publishing conference next week. I will try and post something about it next week. Does anyone know of a visual CSS editor that is open source? I'm trying to find something that can spit out just CSS code. Sent from Rob's Palm On Dec 2, 2011, at 3:12 AM, Steve Litt sl...@troubleshooters.com wrote: On Friday, December 02, 2011 04:13:53 AM Guenter Milde wrote: On 2011-12-02, Steve Litt wrote: LyX plus eLyXer plus a few other tools can make the PERFECT PERFECT PERFECT authoring tool for flowable text eBooks (Kindle, iPad, etc). The internal HTML output should be usable for eBook creation as well. Any work on eBook modules and backands should be compatible with both HTML writers. OK. I'll make sure any work I do is compatible with both, although I could swear LyX's internal HTML exporter is simply eLyXer, as it outputs eLyXer messages. ... I There needs to be a way to insert all info needed by Kindle into the LyX file, and having eLyXer or other similar executables do things like split out the chapters, split out the table of contents and index, make the .opf file and the .ncx file. It might require a special layout file -- I can create that. Or maybe just layout modules. IMO, LyX (as open source software) should concentrate on supporting the open ePub format. ePub shouldn't be neglected, but it shouldn't be concentrated either. A well employed list is a happy and productive list, and Kindle/iPad provides a revenue stream for authors (most of whom do quite a bit of open contributions). For example, many of the LyX derived print books we discussed in this afternoon's thread are proprietary -- you can't download them and must pay for them. Generating of kindle (or other proprietary) eBook formats would then pick up the relevant information from the ePub document. That sounds good on the surface, but my experience with ePub and Kindle tells me it's a detour where you'd get complex with the ePub, only to unwind the ePub back into simple HTML to be used by kindlegen. What would be excellent is for some loosely formed group of people list all the data needed to generate a Kindle, necessary to generate an iPad book, a Nook book, and an open ePub. If we can get that list complete, then we have a list of what needs to go in the LyX file or possibly a companion file. Once we have those specifications, writing the actual converters would be a secretarial task. As a matter of fact, if the additional data was put in a companion file, then eLyXer and the internal converter wouldn't have to change all that much, and the whole thing might be more modular. Splitting a document into several HTML files is non-trivial, as we need to consider the cross-links. Maybe we can support a set of cross-linked HTML from Master/Child documents? Alex -- how does eLyXer work with Master/Child documents? Thanks Gunter! SteveT Steve Litt Author: The Key to Everyday Excellence http://www.troubleshooters.com/bookstore/key_excellence.htm Twitter: http://www.twitter.com/stevelitt
Re: LyX and Kindle books
I am working on an ePub compatible module right now (document class at any rate). It's for a talk I'm giving at a publishing conference next week. I will try and post something about it next week. Does anyone know of a visual CSS editor that is open source? I'm trying to find something that can spit out just CSS code. Sent from Rob's Palm On Dec 2, 2011, at 3:12 AM, Steve Litt sl...@troubleshooters.com wrote: On Friday, December 02, 2011 04:13:53 AM Guenter Milde wrote: On 2011-12-02, Steve Litt wrote: LyX plus eLyXer plus a few other tools can make the PERFECT PERFECT PERFECT authoring tool for flowable text eBooks (Kindle, iPad, etc). The internal HTML output should be usable for eBook creation as well. Any work on eBook modules and backands should be compatible with both HTML writers. OK. I'll make sure any work I do is compatible with both, although I could swear LyX's internal HTML exporter is simply eLyXer, as it outputs eLyXer messages. ... I There needs to be a way to insert all info needed by Kindle into the LyX file, and having eLyXer or other similar executables do things like split out the chapters, split out the table of contents and index, make the .opf file and the .ncx file. It might require a special layout file -- I can create that. Or maybe just layout modules. IMO, LyX (as open source software) should concentrate on supporting the open ePub format. ePub shouldn't be neglected, but it shouldn't be concentrated either. A well employed list is a happy and productive list, and Kindle/iPad provides a revenue stream for authors (most of whom do quite a bit of open contributions). For example, many of the LyX derived print books we discussed in this afternoon's thread are proprietary -- you can't download them and must pay for them. Generating of kindle (or other proprietary) eBook formats would then pick up the relevant information from the ePub document. That sounds good on the surface, but my experience with ePub and Kindle tells me it's a detour where you'd get complex with the ePub, only to unwind the ePub back into simple HTML to be used by kindlegen. What would be excellent is for some loosely formed group of people list all the data needed to generate a Kindle, necessary to generate an iPad book, a Nook book, and an open ePub. If we can get that list complete, then we have a list of what needs to go in the LyX file or possibly a companion file. Once we have those specifications, writing the actual converters would be a secretarial task. As a matter of fact, if the additional data was put in a companion file, then eLyXer and the internal converter wouldn't have to change all that much, and the whole thing might be more modular. Splitting a document into several HTML files is non-trivial, as we need to consider the cross-links. Maybe we can support a set of cross-linked HTML from Master/Child documents? Alex -- how does eLyXer work with Master/Child documents? Thanks Gunter! SteveT Steve Litt Author: The Key to Everyday Excellence http://www.troubleshooters.com/bookstore/key_excellence.htm Twitter: http://www.twitter.com/stevelitt
Re: LyX and Kindle books
I am working on an ePub compatible module right now (document class at any rate). It's for a talk I'm giving at a publishing conference next week. I will try and post something about it next week. Does anyone know of a visual CSS editor that is open source? I'm trying to find something that can spit out just CSS code. Sent from Rob's Palm On Dec 2, 2011, at 3:12 AM, Steve Littwrote: > On Friday, December 02, 2011 04:13:53 AM Guenter Milde wrote: >> On 2011-12-02, Steve Litt wrote: >>> LyX plus eLyXer plus a few other tools can make the PERFECT >>> PERFECT PERFECT authoring tool for flowable text eBooks (Kindle, >>> iPad, etc). >> >> The internal HTML output should be usable for eBook creation as >> well. >> >> Any work on "eBook" modules and backands should be compatible with >> both HTML writers. > > OK. I'll make sure any work I do is compatible with both, although I > could swear LyX's internal HTML exporter is simply eLyXer, as it > outputs eLyXer messages. > >> >> ... >> I >> >>> There needs to be a way to insert all info needed by Kindle into >>> the LyX file, and having eLyXer or other similar executables do >>> things like split out the chapters, split out the table of >>> contents and index, make the .opf file and the .ncx file. It >>> might require a special layout file -- I can create that. Or >>> maybe just layout modules. >> >> IMO, LyX (as open source software) should concentrate on supporting >> the open ePub format. > > ePub shouldn't be neglected, but it shouldn't be concentrated either. > A well employed list is a happy and productive list, and Kindle/iPad > provides a revenue stream for authors (most of whom do quite a bit of > open contributions). For example, many of the LyX derived print books > we discussed in this afternoon's thread are proprietary -- you can't > download them and must pay for them. > >> Generating of kindle (or other proprietary) >> eBook formats would then pick up the relevant information from the >> ePub document. > > That sounds good on the surface, but my experience with ePub and > Kindle tells me it's a detour where you'd get complex with the ePub, > only to unwind the ePub back into simple HTML to be used by kindlegen. > > What would be excellent is for some loosely formed group of people > list all the data needed to generate a Kindle, necessary to generate > an iPad book, a Nook book, and an open ePub. If we can get that list > complete, then we have a list of what needs to go in the LyX file or > possibly a companion file. Once we have those specifications, writing > the actual converters would be a secretarial task. As a matter of > fact, if the additional data was put in a companion file, then eLyXer > and the internal converter wouldn't have to change all that much, and > the whole thing might be more modular. > >> >> Splitting a document into several HTML files is non-trivial, as we >> need to consider the cross-links. Maybe we can support a set of >> cross-linked HTML from Master/Child documents? > > Alex -- how does eLyXer work with Master/Child documents? > > Thanks Gunter! > > SteveT > > Steve Litt > Author: The Key to Everyday Excellence > http://www.troubleshooters.com/bookstore/key_excellence.htm > Twitter: http://www.twitter.com/stevelitt >
Subfigures in Memoir
Does anyone know if it is possible to use memoir's subfloat environment inside of LyX for subfigures and sub-tables? Or if there is a way to override the loading of the subfig pacakge? There appears to be an incompatability between subfig and many of the font customization macros, and I'm not quite sure what the best way to fix it is (short of preventing the package from loading). Cheers, Rob
Re: LyX-Produced Book
Congratulations on finishing your book. It's beautifully produced and looks very interesting. While I was looking through it, I found myself with a couple of craft questions: Did you write the document class from scratch, or is it based on one of the larger classes (e.g., Koma-Script, Memoir, Standard Book)? How did you end up working with the references? Was BibLaTeX somehow involved? Cheers, Rob
Subfigures in Memoir
Does anyone know if it is possible to use memoir's subfloat environment inside of LyX for subfigures and sub-tables? Or if there is a way to override the loading of the subfig pacakge? There appears to be an incompatability between subfig and many of the font customization macros, and I'm not quite sure what the best way to fix it is (short of preventing the package from loading). Cheers, Rob
Re: LyX-Produced Book
Congratulations on finishing your book. It's beautifully produced and looks very interesting. While I was looking through it, I found myself with a couple of craft questions: Did you write the document class from scratch, or is it based on one of the larger classes (e.g., Koma-Script, Memoir, Standard Book)? How did you end up working with the references? Was BibLaTeX somehow involved? Cheers, Rob