Re: Word won't open simplest LyXHTML file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/01/13 23:37, Jerry wrote: On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: Also, I played with pandoc a while back and its conversion of a very simple LyX file to Word was not perfect. I went LyX - LaTeX - docx. I did not investigate setting options very much. I recall that equations made the trip and were editable in Word 2011 (Mac) built-in equation editor, but equation numbers were lost. Today's effort, also on a simple but different document, LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), a .eps file was not found even though it was present, and section labels were translated as literal text. Converting to .odt was worse, and at least once caused it to crash when it was attempting to repair what it thought was a damaged converted file. (But what _doesn't_ cause LibreOffice to crash?) I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. So I would suggest to try the route via xhtml. How did you get from XHTML - docx? Pandoc (according to the first paragraph of the user's manual) does not accept XHTML input files. Jerry Well - using pandoc -o newfile.docx newfile1.xhtml works as expected and produces a docx file. So I can only say it works. I only used the converters and format definitions as mentioned earlier. Truy it: simple lyx file, export to LyXhtml and use above command to convert to docx. Cheers, Rainer Cheers, Rainer You should try both converters (the build in and eLyXe), as they performed differently on different objects. As my document did not contain any equations, I can not comment on that. I must say, that I also used pandoc to convert to odt and then converted the odt to docx with OpenOffice (this was before LibreOffice...) and it also worked well. I can only suggest to try the different paths out and see which works best, and then post your experiences here and add them to http://www.lyx.org/trac/ticket/6042 so that there is some progress with pandoc support in LyX. Cheers, Rainer Jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= =Lwnd -END PGP SIGNATURE-
How to remove underline in a text copied from a document to another document
Dear all, I copied some sections of a lyx document to another lyx document and the copied text is underlined. I could not find any way to remove this text property and would appreciate any help on this. Best regards, Frédéric Parrenin
Re: How to remove underline in a text copied from a document to another document
On 2013-01-23, Frédéric Parrenin wrote: [-- Type: text/plain, Encoding: quoted-printable --] Dear all, I copied some sections of a lyx document to another lyx document and the copied text is underlined. I could not find any way to remove this text property and would appreciate any help on this. Best regards, The most usual reason for this (if it is a blue underline) is, that the copied text is given a language (or language variant) tag that differs from the document default language. (LyX/LaTeX can handle parts in different languages in one document - with correct language-dependent hyphenation and auto-generated text.) You might see language: ... in the status line on the bottom of the LyX window. If the text parts are really in different languages, just leave the line as a reminder (you can also disable the underlingin somewhere in the settings). To unify the language setting, select the underlined text (or the whole document) and change the language setting under EditLanguages (or EditText SettingsCustom ...). Hope this helps. Günter
Re: Word won't open simplest LyXHTML file
Dear Nico, On 2013-01-22, Nico Williams wrote: I think the right approach is to have a LyX XML schema, export to that, then apply an XSL to convert to whatever format you want. I've written a script to convert .lyx to XML using a very simple-minded approach; I don't have a schema defined for this, just well-formed XML output. ... There was a thread about this a while back and the conclusion was that I'm on my own with this, that for now my lyx2xml is not to be part of LyX. Partly there's a desire to consider making XML a native thing in LyX, and partly there's a desire to not add more things into the LyX source tree that might break when new features are added elsewhere in the tree. Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. If you search the archives, you will find that the idea to move the native LyX format to XML is discussed since several years without a consensus between the developers. Therefore I understand the hesitation of the developers to re-open this can of worms and rather concentrate on issues that are agreed on. But this is exactly why I really like your idea of a LyX-XML *in addition* to the current native format. This will give new insight in the advantages as well as problems of such a transition and will be of great value to the XSL freaks independent of the decision whether it should become LyX's default format. I don't know whether it will become possible to have painless LyX-Word conversions at all, because the document models differ widely, but XSL may still be the best route for this conversion. Thanks for your work, Günter
Re: Saving a document as a new default template?
Aha! That's where it was hidden. Thanks Paul. I would suggest editing the Customization help file, section 5.2.4, with that information then. It is seldom used command (or it should be) and people like me would forget where to look for. Best, Stefano On Tue, Jan 22, 2013 at 4:20 PM, Paul A. Rubin ru...@msu.edu wrote: Document Settings... Save as Document Defaults button? Paul -- __ Stefano Franchi Associate Research Professor Department of Hispanic StudiesPh: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 9:15 AM, Guenter Milde mi...@users.sf.net wrote: On 2013-01-22, Nico Williams wrote: There was a thread about this a while back and the conclusion was that I'm on my own with this, that for now my lyx2xml is not to be part of LyX. Partly there's a desire to consider making XML a native thing in LyX, and partly there's a desire to not add more things into the LyX source tree that might break when new features are added elsewhere in the tree. Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I'm not. I soldier one because I want to use LyX and I need XML. In fact, for *my* use cases the script is done. It's not complete however, and I was hoping others would be interested in contributing. Instead it seems I will have to finish my XSLs (I'm doing this in my spare time) and write a nice blog post about all this (with some exposition of XSL code and explanations) to get people interested. I've been surprised at how close .lyx is to being a form of XML, and how irritating some of the ways in which it's not are. (For example, when mixing text styles there's no well-formed-XML-like closing of tags. The most irritating thing by far is the fact that description lists items' title/description are separated by the first breaking space.) I don't know whether it will become possible to have painless LyX-Word conversions at all, because the document models differ widely, but XSL may still be the best route for this conversion. Right, there may be loss of metadata, and it may be that multiple XSLs, or one with many options, will be needed to provide a useful experience. That's to be expected in schema transformations. Nico --
Space allocated for pdf-graphics way too large on linux
Hi, I am happily using lyx 2.0.5 on both linux and windows. Importing pdf graphics works great with the windows version, however on linux lyx allocates a lot of space even for small graphics in the edit view: https://picasaweb.google.com/ceisserer/January23201302?authkey=Gv1sRgCIKHna-167igxgE#5836701347663747378 On the generated pdf, everything looks fine though. Any idea whats going wrong here? Thank you in advance, Clemens
LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I have a question for you... When is somebody going to write a lyx2yaml script? Another question: Instead of having LyX's native format being human-opaque XML, why not make it YAML, the ultimate in human readability and writeability? http://en.wikipedia.org/wiki/Yaml As I understand, the LyX project's preferred scripting language is Python, and PyYaml is an excellent YAML parser and emitter. I don't have time or knowledge to write a lyx2yaml script, but if somebody else takes the captain's chair, I'll for sure help. Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 1:57 PM, Steve Litt sl...@troubleshooters.com wrote: On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I have a question for you... When is somebody going to write a lyx2yaml script? Another question: Instead of having LyX's native format being human-opaque XML, why not make it YAML, the ultimate in human readability and writeability? I want XML because of XSLT (and XPath, and XQuery): I can write XSLs to convert from one schema to another, and this then gets to be completely external to LyX. If the LyX XML schema changes, of course, the XSLs need updating, but it's XSLT code, not C++ or what have you -- it's a simpler update. It's more than that. You can serve XML and XSLs from some web server and let the browser apply the XSLs to create XHTML. And more. There's lots of databases that specialize in XML documents and make it easy to search them in regular ways (i.e., with XPath or XQuery). I'm probably only scratching the surface here. Also, properly formatted XML is not human-opaque, but merely annoying. Don't get me wrong: I'm *not* a fan of XML. I'm a fan of the DSLs and tooling that has been built around XML, which -for me- overcome the downsides to XML itself. Of course, if our world had been built on programming languages with hygienic macro facilities with all the power expect of a Scheme, then we could write these DSLs as needed. XML is so much wheel re-invention, but there's a ton of value in standardizing these DSLs: you can write portable code in them, and you need only know those standard DSLs instead of having to learn and hack on ad-hoc DSLs. In a sense YAML saddens me: it's even more wheel re-invention, but without the DSLs to go with it that XML has. Why would I want this for any purpose other than UI? And why would I want it even for that purpose when LyX *is* the UI? http://en.wikipedia.org/wiki/Yaml I don't really care what it is as long as there's a trivial, *lossless* mapping onto XML. (My script's translation of .lyx to XML is lossless, though the return trip will not obtain the same original .lyx because some things in .lyx content need to get normalized in the conversion to XML. But no data and metadata get lost in the conversion.) As I understand, the LyX project's preferred scripting language is Python, and PyYaml is an excellent YAML parser and emitter. I don't have time or knowledge to write a lyx2yaml script, but if somebody else takes the captain's chair, I'll for sure help. Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. I don't think converting directly from .lyx to YAML is going to be any easier than converting directly to XML is, but if it's *as* easy then FYI you'll still run into pretty much the same issues I did in lyx2xml. Nico --
creating a quiz /multiple choice questions with Lyx
I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek One way or another, you'll need to do some pretty fancy LaTeX coding. I came darn close to doing that once. Basically, you use a different style for the correct question, with that style presenting the exact same appearance *unless* a specific variable is set, and then it's bold or whatever. And of course, you'll need to do the right things with the question and answer counters. I'm almost positive it's doable -- I did a lot of research on that subject. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 17:19:33 -0500, Steve Litt said: On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek One way or another, you'll need to do some pretty fancy LaTeX coding. I came darn close to doing that once. Basically, you use a different style for the correct question, with that style presenting the exact same appearance *unless* a specific variable is set, and then it's bold or whatever. And of course, you'll need to do the right things with the question and answer counters. I'm almost positive it's doable -- I did a lot of research on that subject. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance Good news Vivek, I've already done it and posted it on the web. I had forgotten about that. See these: http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Multiple_Choice_Quizzes:_Conceptual http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Implementation_of_the_Multiple_Choice I'm sure you'll need to improve on what I've done to suit your particular need, but this certainly proves it's doable and gives you a head-start. When you're done with these environments, please post them back to the list so we can all see a professional implementation. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. Well cool, I guess that's one less program I have to write. How close to finished is your converter? Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 5:01 PM, Steve Litt sl...@troubleshooters.com wrote: On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. Well cool, I guess that's one less program I have to write. How close to finished is your converter? It... works. For that subset of LyX that I use. This includes tables, but not math (someone needs to port to Python the LaTeX-MathML code that can be found all over), and who knows what else. You can find it at https://github.com/nicowilliams/lyx/tree/lyxml/lib/lyx2lyx -- look for lyx2xml*. Forgive the sloppy code. If this is of use to you and you need more features and want to contribute them, or maybe tell me what they'd be... we can make this better. Nico --
Re: Word won't open simplest LyXHTML file
On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/01/13 23:37, Jerry wrote: On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: Also, I played with pandoc a while back and its conversion of a very simple LyX file to Word was not perfect. I went LyX - LaTeX - docx. I did not investigate setting options very much. I recall that equations made the trip and were editable in Word 2011 (Mac) built-in equation editor, but equation numbers were lost. Today's effort, also on a simple but different document, LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), a .eps file was not found even though it was present, and section labels were translated as literal text. Converting to .odt was worse, and at least once caused it to crash when it was attempting to repair what it thought was a damaged converted file. (But what _doesn't_ cause LibreOffice to crash?) I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. So I would suggest to try the route via xhtml. How did you get from XHTML - docx? Pandoc (according to the first paragraph of the user's manual) does not accept XHTML input files. Jerry Well - using pandoc -o newfile.docx newfile1.xhtml works as expected and produces a docx file. So I can only say it works. I only used the converters and format definitions as mentioned earlier. Truy it: simple lyx file, export to LyXhtml and use above command to convert to docx. Cheers, Rainer Thanks, Ranier. I have just now tried this on a simple document (two equations, two sections, a footnote, a figure with caption, a greyed comment, and two cross references (to an equation and to a section). As usual, the LyXHTML looks very good. But in the docx, the equations are not rendered and contain spurious text, the figure caption and figure name are separated from the figure and are shown as normal text, spurious text is inserted relating to the image, and all of the cross-references move the cursor to the title rather than to where it should move. The footnote is printed as ordinary text as is the greyed text also. pandoc -o newfile.odt newfile1.xhtml results in a similar result, but with completely nonfunctional cross references and no spurious text relating to the figure image. I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 1.9.4.2. Jerry You should try both converters (the build in and eLyXe), as they performed differently on different objects. As my document did not contain any equations, I can not comment on that. I must say, that I also used pandoc to convert to odt and then converted the odt to docx with OpenOffice (this was before LibreOffice...) and it also worked well. I can only suggest to try the different paths out and see which works best, and then post your experiences here and add them to http://www.lyx.org/trac/ticket/6042 so that there is some progress with pandoc support in LyX. Cheers, Rainer Jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= =Lwnd -END PGP SIGNATURE-
KOMA-script letter2: adding graphic letterhead
The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. With version 1 I could place a float above the recipient's name; with the current version 2 the only float option is 'wrap' which is not what I want. Placing the figure not as a float _almost_ works; I could play with it to center it on the page. But, I'm also getting all sorts of spurious cruft (such as 'URL:') on the preview page; do I comment out all this stuff in the preamble? Typeset letters are much more impressive than are the normal processed words. But, since almost everyone uses e-mail now I just don't send snail-mail letters like I used to do. Hints, clues, and ideas certainly welcomed! Rich
Re: KOMA-script letter2: adding graphic letterhead
Le 24/01/2013 01:53, Rich Shepard a écrit : On Wed, 23 Jan 2013, Rich Shepard wrote: The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. I resolved this issue -- sort of -- by inserting the .pdf version of the letterhead immediately following 'Sender Address:'. But, I get two copies on the preview, one offset from the other and I've not found why or how to fix this. You get two copies because you are using the backaddress in the preamble. You should uncomment the corresponding line in the preamble like this: ,backaddress=false% print the back address? The backaddress is a german specific way of displaying the Sender Address with a tiny font in the enveloppe window on top of the Destination address. It seems to me that adding the letterhead by using the Sender Address is not the right way to do it. You should customize the DIN.lco options file that you are using. Have a look at my NFpro.lco here: http://wiki.lyx.org/Examples/KomaLetter2 I still use KOMA-Script letter2 class from time to time with Lyx version 2. -- jmp
Re: Word won't open simplest LyXHTML file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/01/13 23:37, Jerry wrote: On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: Also, I played with pandoc a while back and its conversion of a very simple LyX file to Word was not perfect. I went LyX - LaTeX - docx. I did not investigate setting options very much. I recall that equations made the trip and were editable in Word 2011 (Mac) built-in equation editor, but equation numbers were lost. Today's effort, also on a simple but different document, LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), a .eps file was not found even though it was present, and section labels were translated as literal text. Converting to .odt was worse, and at least once caused it to crash when it was attempting to repair what it thought was a damaged converted file. (But what _doesn't_ cause LibreOffice to crash?) I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. So I would suggest to try the route via xhtml. How did you get from XHTML - docx? Pandoc (according to the first paragraph of the user's manual) does not accept XHTML input files. Jerry Well - using pandoc -o newfile.docx newfile1.xhtml works as expected and produces a docx file. So I can only say it works. I only used the converters and format definitions as mentioned earlier. Truy it: simple lyx file, export to LyXhtml and use above command to convert to docx. Cheers, Rainer Cheers, Rainer You should try both converters (the build in and eLyXe), as they performed differently on different objects. As my document did not contain any equations, I can not comment on that. I must say, that I also used pandoc to convert to odt and then converted the odt to docx with OpenOffice (this was before LibreOffice...) and it also worked well. I can only suggest to try the different paths out and see which works best, and then post your experiences here and add them to http://www.lyx.org/trac/ticket/6042 so that there is some progress with pandoc support in LyX. Cheers, Rainer Jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= =Lwnd -END PGP SIGNATURE-
How to remove underline in a text copied from a document to another document
Dear all, I copied some sections of a lyx document to another lyx document and the copied text is underlined. I could not find any way to remove this text property and would appreciate any help on this. Best regards, Frédéric Parrenin
Re: How to remove underline in a text copied from a document to another document
On 2013-01-23, Frédéric Parrenin wrote: [-- Type: text/plain, Encoding: quoted-printable --] Dear all, I copied some sections of a lyx document to another lyx document and the copied text is underlined. I could not find any way to remove this text property and would appreciate any help on this. Best regards, The most usual reason for this (if it is a blue underline) is, that the copied text is given a language (or language variant) tag that differs from the document default language. (LyX/LaTeX can handle parts in different languages in one document - with correct language-dependent hyphenation and auto-generated text.) You might see language: ... in the status line on the bottom of the LyX window. If the text parts are really in different languages, just leave the line as a reminder (you can also disable the underlingin somewhere in the settings). To unify the language setting, select the underlined text (or the whole document) and change the language setting under EditLanguages (or EditText SettingsCustom ...). Hope this helps. Günter
Re: Word won't open simplest LyXHTML file
Dear Nico, On 2013-01-22, Nico Williams wrote: I think the right approach is to have a LyX XML schema, export to that, then apply an XSL to convert to whatever format you want. I've written a script to convert .lyx to XML using a very simple-minded approach; I don't have a schema defined for this, just well-formed XML output. ... There was a thread about this a while back and the conclusion was that I'm on my own with this, that for now my lyx2xml is not to be part of LyX. Partly there's a desire to consider making XML a native thing in LyX, and partly there's a desire to not add more things into the LyX source tree that might break when new features are added elsewhere in the tree. Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. If you search the archives, you will find that the idea to move the native LyX format to XML is discussed since several years without a consensus between the developers. Therefore I understand the hesitation of the developers to re-open this can of worms and rather concentrate on issues that are agreed on. But this is exactly why I really like your idea of a LyX-XML *in addition* to the current native format. This will give new insight in the advantages as well as problems of such a transition and will be of great value to the XSL freaks independent of the decision whether it should become LyX's default format. I don't know whether it will become possible to have painless LyX-Word conversions at all, because the document models differ widely, but XSL may still be the best route for this conversion. Thanks for your work, Günter
Re: Saving a document as a new default template?
Aha! That's where it was hidden. Thanks Paul. I would suggest editing the Customization help file, section 5.2.4, with that information then. It is seldom used command (or it should be) and people like me would forget where to look for. Best, Stefano On Tue, Jan 22, 2013 at 4:20 PM, Paul A. Rubin ru...@msu.edu wrote: Document Settings... Save as Document Defaults button? Paul -- __ Stefano Franchi Associate Research Professor Department of Hispanic StudiesPh: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 9:15 AM, Guenter Milde mi...@users.sf.net wrote: On 2013-01-22, Nico Williams wrote: There was a thread about this a while back and the conclusion was that I'm on my own with this, that for now my lyx2xml is not to be part of LyX. Partly there's a desire to consider making XML a native thing in LyX, and partly there's a desire to not add more things into the LyX source tree that might break when new features are added elsewhere in the tree. Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I'm not. I soldier one because I want to use LyX and I need XML. In fact, for *my* use cases the script is done. It's not complete however, and I was hoping others would be interested in contributing. Instead it seems I will have to finish my XSLs (I'm doing this in my spare time) and write a nice blog post about all this (with some exposition of XSL code and explanations) to get people interested. I've been surprised at how close .lyx is to being a form of XML, and how irritating some of the ways in which it's not are. (For example, when mixing text styles there's no well-formed-XML-like closing of tags. The most irritating thing by far is the fact that description lists items' title/description are separated by the first breaking space.) I don't know whether it will become possible to have painless LyX-Word conversions at all, because the document models differ widely, but XSL may still be the best route for this conversion. Right, there may be loss of metadata, and it may be that multiple XSLs, or one with many options, will be needed to provide a useful experience. That's to be expected in schema transformations. Nico --
Space allocated for pdf-graphics way too large on linux
Hi, I am happily using lyx 2.0.5 on both linux and windows. Importing pdf graphics works great with the windows version, however on linux lyx allocates a lot of space even for small graphics in the edit view: https://picasaweb.google.com/ceisserer/January23201302?authkey=Gv1sRgCIKHna-167igxgE#5836701347663747378 On the generated pdf, everything looks fine though. Any idea whats going wrong here? Thank you in advance, Clemens
LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I have a question for you... When is somebody going to write a lyx2yaml script? Another question: Instead of having LyX's native format being human-opaque XML, why not make it YAML, the ultimate in human readability and writeability? http://en.wikipedia.org/wiki/Yaml As I understand, the LyX project's preferred scripting language is Python, and PyYaml is an excellent YAML parser and emitter. I don't have time or knowledge to write a lyx2yaml script, but if somebody else takes the captain's chair, I'll for sure help. Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 1:57 PM, Steve Litt sl...@troubleshooters.com wrote: On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. I have a question for you... When is somebody going to write a lyx2yaml script? Another question: Instead of having LyX's native format being human-opaque XML, why not make it YAML, the ultimate in human readability and writeability? I want XML because of XSLT (and XPath, and XQuery): I can write XSLs to convert from one schema to another, and this then gets to be completely external to LyX. If the LyX XML schema changes, of course, the XSLs need updating, but it's XSLT code, not C++ or what have you -- it's a simpler update. It's more than that. You can serve XML and XSLs from some web server and let the browser apply the XSLs to create XHTML. And more. There's lots of databases that specialize in XML documents and make it easy to search them in regular ways (i.e., with XPath or XQuery). I'm probably only scratching the surface here. Also, properly formatted XML is not human-opaque, but merely annoying. Don't get me wrong: I'm *not* a fan of XML. I'm a fan of the DSLs and tooling that has been built around XML, which -for me- overcome the downsides to XML itself. Of course, if our world had been built on programming languages with hygienic macro facilities with all the power expect of a Scheme, then we could write these DSLs as needed. XML is so much wheel re-invention, but there's a ton of value in standardizing these DSLs: you can write portable code in them, and you need only know those standard DSLs instead of having to learn and hack on ad-hoc DSLs. In a sense YAML saddens me: it's even more wheel re-invention, but without the DSLs to go with it that XML has. Why would I want this for any purpose other than UI? And why would I want it even for that purpose when LyX *is* the UI? http://en.wikipedia.org/wiki/Yaml I don't really care what it is as long as there's a trivial, *lossless* mapping onto XML. (My script's translation of .lyx to XML is lossless, though the return trip will not obtain the same original .lyx because some things in .lyx content need to get normalized in the conversion to XML. But no data and metadata get lost in the conversion.) As I understand, the LyX project's preferred scripting language is Python, and PyYaml is an excellent YAML parser and emitter. I don't have time or knowledge to write a lyx2yaml script, but if somebody else takes the captain's chair, I'll for sure help. Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. I don't think converting directly from .lyx to YAML is going to be any easier than converting directly to XML is, but if it's *as* easy then FYI you'll still run into pretty much the same issues I did in lyx2xml. Nico --
creating a quiz /multiple choice questions with Lyx
I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek One way or another, you'll need to do some pretty fancy LaTeX coding. I came darn close to doing that once. Basically, you use a different style for the correct question, with that style presenting the exact same appearance *unless* a specific variable is set, and then it's bold or whatever. And of course, you'll need to do the right things with the question and answer counters. I'm almost positive it's doable -- I did a lot of research on that subject. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 17:19:33 -0500, Steve Litt said: On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek One way or another, you'll need to do some pretty fancy LaTeX coding. I came darn close to doing that once. Basically, you use a different style for the correct question, with that style presenting the exact same appearance *unless* a specific variable is set, and then it's bold or whatever. And of course, you'll need to do the right things with the question and answer counters. I'm almost positive it's doable -- I did a lot of research on that subject. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance Good news Vivek, I've already done it and posted it on the web. I had forgotten about that. See these: http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Multiple_Choice_Quizzes:_Conceptual http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Implementation_of_the_Multiple_Choice I'm sure you'll need to improve on what I've done to suit your particular need, but this certainly proves it's doable and gives you a head-start. When you're done with these environments, please post them back to the list so we can all see a professional implementation. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. Well cool, I guess that's one less program I have to write. How close to finished is your converter? Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 5:01 PM, Steve Litt sl...@troubleshooters.com wrote: On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. Well cool, I guess that's one less program I have to write. How close to finished is your converter? It... works. For that subset of LyX that I use. This includes tables, but not math (someone needs to port to Python the LaTeX-MathML code that can be found all over), and who knows what else. You can find it at https://github.com/nicowilliams/lyx/tree/lyxml/lib/lyx2lyx -- look for lyx2xml*. Forgive the sloppy code. If this is of use to you and you need more features and want to contribute them, or maybe tell me what they'd be... we can make this better. Nico --
Re: Word won't open simplest LyXHTML file
On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/01/13 23:37, Jerry wrote: On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: Also, I played with pandoc a while back and its conversion of a very simple LyX file to Word was not perfect. I went LyX - LaTeX - docx. I did not investigate setting options very much. I recall that equations made the trip and were editable in Word 2011 (Mac) built-in equation editor, but equation numbers were lost. Today's effort, also on a simple but different document, LyX - LaTeX - docx, one equation was not typeset (only the markup appeared), a .eps file was not found even though it was present, and section labels were translated as literal text. Converting to .odt was worse, and at least once caused it to crash when it was attempting to repair what it thought was a damaged converted file. (But what _doesn't_ cause LibreOffice to crash?) I also tried to go the LyX - LaTeX - docx route, but the results were not as usable as via xhtml. So I would suggest to try the route via xhtml. How did you get from XHTML - docx? Pandoc (according to the first paragraph of the user's manual) does not accept XHTML input files. Jerry Well - using pandoc -o newfile.docx newfile1.xhtml works as expected and produces a docx file. So I can only say it works. I only used the converters and format definitions as mentioned earlier. Truy it: simple lyx file, export to LyXhtml and use above command to convert to docx. Cheers, Rainer Thanks, Ranier. I have just now tried this on a simple document (two equations, two sections, a footnote, a figure with caption, a greyed comment, and two cross references (to an equation and to a section). As usual, the LyXHTML looks very good. But in the docx, the equations are not rendered and contain spurious text, the figure caption and figure name are separated from the figure and are shown as normal text, spurious text is inserted relating to the image, and all of the cross-references move the cursor to the title rather than to where it should move. The footnote is printed as ordinary text as is the greyed text also. pandoc -o newfile.odt newfile1.xhtml results in a similar result, but with completely nonfunctional cross references and no spurious text relating to the figure image. I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 1.9.4.2. Jerry You should try both converters (the build in and eLyXe), as they performed differently on different objects. As my document did not contain any equations, I can not comment on that. I must say, that I also used pandoc to convert to odt and then converted the odt to docx with OpenOffice (this was before LibreOffice...) and it also worked well. I can only suggest to try the different paths out and see which works best, and then post your experiences here and add them to http://www.lyx.org/trac/ticket/6042 so that there is some progress with pandoc support in LyX. Cheers, Rainer Jerry -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= =Lwnd -END PGP SIGNATURE-
KOMA-script letter2: adding graphic letterhead
The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. With version 1 I could place a float above the recipient's name; with the current version 2 the only float option is 'wrap' which is not what I want. Placing the figure not as a float _almost_ works; I could play with it to center it on the page. But, I'm also getting all sorts of spurious cruft (such as 'URL:') on the preview page; do I comment out all this stuff in the preamble? Typeset letters are much more impressive than are the normal processed words. But, since almost everyone uses e-mail now I just don't send snail-mail letters like I used to do. Hints, clues, and ideas certainly welcomed! Rich
Re: KOMA-script letter2: adding graphic letterhead
Le 24/01/2013 01:53, Rich Shepard a écrit : On Wed, 23 Jan 2013, Rich Shepard wrote: The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. I resolved this issue -- sort of -- by inserting the .pdf version of the letterhead immediately following 'Sender Address:'. But, I get two copies on the preview, one offset from the other and I've not found why or how to fix this. You get two copies because you are using the backaddress in the preamble. You should uncomment the corresponding line in the preamble like this: ,backaddress=false% print the back address? The backaddress is a german specific way of displaying the Sender Address with a tiny font in the enveloppe window on top of the Destination address. It seems to me that adding the letterhead by using the Sender Address is not the right way to do it. You should customize the DIN.lco options file that you are using. Have a look at my NFpro.lco here: http://wiki.lyx.org/Examples/KomaLetter2 I still use KOMA-Script letter2 class from time to time with Lyx version 2. -- jmp
Re: Word won't open simplest LyXHTML file
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/01/13 23:37, Jerry wrote: > > On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: > >>> >>> >>> Also, I played with pandoc a while back and its conversion of a very simple >>> LyX file to >>> Word was not perfect. I went LyX -> LaTeX -> docx. I did not investigate >>> setting options >>> very much. I recall that equations made the trip and were editable in Word >>> 2011 (Mac) >>> built-in equation editor, but equation numbers were lost. Today's effort, >>> also on a simple >>> but different document, LyX -> LaTeX -> docx, one equation was not typeset >>> (only the >>> markup appeared), a .eps file was not found even though it was present, and >>> section labels >>> were translated as literal text. Converting to .odt was worse, and at least >>> once caused it >>> to crash when it was attempting to repair what it thought was a damaged >>> converted file. >>> (But what _doesn't_ cause LibreOffice to crash?) >> >> I also tried to go the LyX -> LaTeX -> docx route, but the results were not >> as usable as via >> xhtml. So I would suggest to try the route via xhtml. > > How did you get from XHTML -> docx? Pandoc (according to the first paragraph > of the user's > manual) does not accept XHTML input files. Jerry Well - using pandoc -o newfile.docx newfile1.xhtml works as expected and produces a docx file. So I can only say it works. I only used the converters and format definitions as mentioned earlier. Truy it: simple lyx file, export to LyXhtml and use above command to convert to docx. Cheers, Rainer Cheers, Rainer > >> You should try both converters (the build in and eLyXe), as they performed >> differently on >> different objects. As my document did not contain any equations, I can not >> comment on that. >> >> I must say, that I also used pandoc to convert to odt and then converted the >> odt to docx >> with OpenOffice (this was before LibreOffice...) and it also worked well. >> >> I can only suggest to try the different paths out and see which works best, >> and then post >> your experiences here and add them to http://www.lyx.org/trac/ticket/6042 >> so that there is >> some progress with pandoc support in LyX. >> >> Cheers, >> >> Rainer >> >> >>> >>> Jerry > > -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= =Lwnd -END PGP SIGNATURE-
How to remove underline in a text copied from a document to another document
Dear all, I copied some sections of a lyx document to another lyx document and the copied text is underlined. I could not find any way to remove this text property and would appreciate any help on this. Best regards, Frédéric Parrenin
Re: How to remove underline in a text copied from a document to another document
On 2013-01-23, Frédéric Parrenin wrote: > [-- Type: text/plain, Encoding: quoted-printable --] > Dear all, > I copied some sections of a lyx document to another lyx document and the > copied text is underlined. > I could not find any way to remove this text property and would appreciate > any help on this. > Best regards, The most usual reason for this (if it is a blue underline) is, that the copied text is given a language (or language variant) tag that differs from the document default language. (LyX/LaTeX can handle parts in different languages in one document - with correct language-dependent hyphenation and auto-generated text.) You might see "language: ..." in the status line on the bottom of the LyX window. If the text parts are really in different languages, just leave the line as a reminder (you can also disable the underlingin somewhere in the settings). To "unify" the language setting, select the underlined text (or the whole document) and change the language setting under Edit>Languages (or Edit>Text Settings>Custom ...). Hope this helps. Günter
Re: Word won't open simplest LyXHTML file
Dear Nico, On 2013-01-22, Nico Williams wrote: > I think the right approach is to have a LyX XML schema, export to > that, then apply an XSL to convert to whatever format you want. I've > written a script to convert .lyx to XML using a very simple-minded > approach; I don't have a schema defined for this, just well-formed XML > output. ... > There was a thread about this a while back and the conclusion was that > I'm on my own with this, that for now my lyx2xml is not to be part of > LyX. Partly there's a desire to consider making XML a native thing in > LyX, and partly there's a desire to not add more things into the LyX > source tree that might break when new features are added elsewhere in > the tree. Please don't be discouraged to continue the work on and publication of the lyx2xml script. I think it is a useful addition to LyX. If you search the archives, you will find that the idea to move the native LyX format to XML is discussed since several years without a consensus between the developers. Therefore I understand the hesitation of the developers to re-open this can of worms and rather concentrate on issues that are agreed on. But this is exactly why I really like your idea of a LyX-XML *in addition* to the current native format. This will give new insight in the advantages as well as problems of such a transition and will be of great value to the "XSL freaks" independent of the decision whether it should become LyX's default format. I don't know whether it will become possible to have "painless" LyX<->Word conversions at all, because the document models differ widely, but XSL may still be the best route for this conversion. Thanks for your work, Günter
Re: Saving a document as a new default template?
Aha! That's where it was hidden. Thanks Paul. I would suggest editing the Customization help file, section 5.2.4, with that information then. It is seldom used command (or it should be) and people like me would forget where to look for. Best, Stefano On Tue, Jan 22, 2013 at 4:20 PM, Paul A. Rubinwrote: > Document > Settings... > Save as Document Defaults button? > > Paul > > -- __ Stefano Franchi Associate Research Professor Department of Hispanic StudiesPh: +1 (979) 845-2125 Texas A University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 9:15 AM, Guenter Mildewrote: > On 2013-01-22, Nico Williams wrote: >> There was a thread about this a while back and the conclusion was that >> I'm on my own with this, that for now my lyx2xml is not to be part of >> LyX. Partly there's a desire to consider making XML a native thing in >> LyX, and partly there's a desire to not add more things into the LyX >> source tree that might break when new features are added elsewhere in >> the tree. > > Please don't be discouraged to continue the work on and publication of > the lyx2xml script. I think it is a useful addition to LyX. I'm not. I soldier one because I want to use LyX and I need XML. In fact, for *my* use cases the script is done. It's not complete however, and I was hoping others would be interested in contributing. Instead it seems I will have to finish my XSLs (I'm doing this in my spare time) and write a nice blog post about all this (with some exposition of XSL code and explanations) to get people interested. I've been surprised at how close .lyx is to being a form of XML, and how irritating some of the ways in which it's not are. (For example, when mixing text styles there's no well-formed-XML-like closing of "tags". The most irritating thing by far is the fact that description lists items' title/description are separated by the first breaking space.) > I don't know whether it will become possible to have "painless" LyX<->Word > conversions at all, because the document models differ widely, but XSL may > still be the best route for this conversion. Right, there may be loss of metadata, and it may be that multiple XSLs, or one with many options, will be needed to provide a useful experience. That's to be expected in schema transformations. Nico --
Space allocated for pdf-graphics way too large on linux
Hi, I am happily using lyx 2.0.5 on both linux and windows. Importing pdf graphics works great with the windows version, however on linux lyx allocates a lot of space even for small graphics in the edit view: https://picasaweb.google.com/ceisserer/January23201302?authkey=Gv1sRgCIKHna-167igxgE#5836701347663747378 On the generated pdf, everything looks fine though. Any idea whats going wrong here? Thank you in advance, Clemens
LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: > Please don't be discouraged to continue the work on and publication of > the lyx2xml script. I think it is a useful addition to LyX. I have a question for you... When is somebody going to write a lyx2yaml script? Another question: Instead of having LyX's native format being human-opaque XML, why not make it YAML, the ultimate in human readability and writeability? http://en.wikipedia.org/wiki/Yaml As I understand, the LyX project's preferred scripting language is Python, and PyYaml is an excellent YAML parser and emitter. I don't have time or knowledge to write a lyx2yaml script, but if somebody else takes the captain's chair, I'll for sure help. Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 1:57 PM, Steve Littwrote: > On Wed, 23 Jan 2013 15:15:15 + (UTC), Guenter Milde said: >> Please don't be discouraged to continue the work on and publication of >> the lyx2xml script. I think it is a useful addition to LyX. > > I have a question for you... > > When is somebody going to write a lyx2yaml script? > > Another question: Instead of having LyX's native format being > human-opaque XML, why not make it YAML, the ultimate in human > readability and writeability? I want XML because of XSLT (and XPath, and XQuery): I can write XSLs to convert from one schema to another, and this then gets to be completely external to LyX. If the LyX XML schema changes, of course, the XSLs need updating, but it's XSLT code, not C++ or what have you -- it's a simpler update. It's more than that. You can serve XML and XSLs from some web server and let the browser apply the XSLs to create XHTML. And more. There's lots of databases that specialize in XML documents and make it easy to search them in regular ways (i.e., with XPath or XQuery). I'm probably only scratching the surface here. Also, properly formatted XML is not human-opaque, but merely annoying. Don't get me wrong: I'm *not* a fan of XML. I'm a fan of the DSLs and tooling that has been built around XML, which -for me- overcome the downsides to XML itself. Of course, if our world had been built on programming languages with hygienic macro facilities with all the power expect of a Scheme, then we could write these DSLs as needed. XML is so much wheel re-invention, but there's a ton of value in standardizing these DSLs: you can write portable code in them, and you need only know those standard DSLs instead of having to learn and hack on ad-hoc DSLs. In a sense YAML saddens me: it's even more wheel re-invention, but without the DSLs to go with it that XML has. Why would I want this for any purpose other than UI? And why would I want it even for that purpose when LyX *is* the UI? > http://en.wikipedia.org/wiki/Yaml I don't really care what it is as long as there's a trivial, *lossless* mapping onto XML. (My script's translation of .lyx to XML is lossless, though the return trip will not obtain the same original .lyx because some things in .lyx content need to get normalized in the conversion to XML. But no data and metadata get lost in the conversion.) > As I understand, the LyX project's preferred scripting language is > Python, and PyYaml is an excellent YAML parser and emitter. > > I don't have time or knowledge to write a lyx2yaml script, but if > somebody else takes the captain's chair, I'll for sure help. Well, there's http://yaxml.rubyforge.org/ , which is a tool that converts between (in both directions) YAXML and YAML. Pair this with my lyx2xml script and you have a way to convert to YAML. I don't think converting directly from .lyx to YAML is going to be any easier than converting directly to XML is, but if it's *as* easy then FYI you'll still run into pretty much the same issues I did in lyx2xml. Nico --
creating a quiz /multiple choice questions with Lyx
I would like to create a MCQ list at the end of a presentation with ability to display correct answers/ and a score at end of the test. Is it possible to do so in lyx? or Latex is the way to go. Lyx and latex gurus help me. Vivek
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: > I would like to create a MCQ list at the end of a presentation with > ability to display correct answers/ and a score at end of the test. > > Is it possible to do so in lyx? or Latex is the way to go. > > Lyx and latex gurus help me. > > Vivek > One way or another, you'll need to do some pretty fancy LaTeX coding. I came darn close to doing that once. Basically, you use a different style for the correct question, with that style presenting the exact same appearance *unless* a specific variable is set, and then it's bold or whatever. And of course, you'll need to do the right things with the question and answer counters. I'm almost positive it's doable -- I did a lot of research on that subject. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: creating a quiz /multiple choice questions with Lyx
On Wed, 23 Jan 2013 17:19:33 -0500, Steve Litt said: > On Wed, 23 Jan 2013 21:24:16 + (UTC), Vivek said: > > I would like to create a MCQ list at the end of a presentation with > > ability to display correct answers/ and a score at end of the test. > > > > Is it possible to do so in lyx? or Latex is the way to go. > > > > Lyx and latex gurus help me. > > > > Vivek > > > > One way or another, you'll need to do some pretty fancy LaTeX coding. > I came darn close to doing that once. Basically, you use a different > style for the correct question, with that style presenting the exact > same appearance *unless* a specific variable is set, and then it's > bold or whatever. > > And of course, you'll need to do the right things with the question > and answer counters. > > I'm almost positive it's doable -- I did a lot of research on that > subject. > > SteveT > > Steve Litt* http://www.troubleshooters.com/ > * http://twitter.com/stevelitt > Troubleshooting Training * Human Performance Good news Vivek, I've already done it and posted it on the web. I had forgotten about that. See these: http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Multiple_Choice_Quizzes:_Conceptual http://www.troubleshooters.com/linux/lyx/ownlists.htm#_Implementation_of_the_Multiple_Choice I'm sure you'll need to improve on what I've done to suit your particular need, but this certainly proves it's doable and gives you a head-start. When you're done with these environments, please post them back to the list so we can all see a professional implementation. SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: > Well, there's http://yaxml.rubyforge.org/ , which is a tool that > converts between (in both directions) YAXML and YAML. Pair this with > my lyx2xml script and you have a way to convert to YAML. Well cool, I guess that's one less program I have to write. How close to finished is your converter? Thanks SteveT Steve Litt* http://www.troubleshooters.com/ * http://twitter.com/stevelitt Troubleshooting Training * Human Performance
Re: LyX2YAML: was Re: Word won't open simplest LyXHTML file
On Wed, Jan 23, 2013 at 5:01 PM, Steve Littwrote: > On Wed, 23 Jan 2013 14:20:57 -0600, Nico Williams said: > >> Well, there's http://yaxml.rubyforge.org/ , which is a tool that >> converts between (in both directions) YAXML and YAML. Pair this with >> my lyx2xml script and you have a way to convert to YAML. > > Well cool, I guess that's one less program I have to write. How close > to finished is your converter? It... works. For that subset of LyX that I use. This includes tables, but not math (someone needs to port to Python the LaTeX->MathML code that can be found all over), and who knows what else. You can find it at https://github.com/nicowilliams/lyx/tree/lyxml/lib/lyx2lyx -- look for lyx2xml*. Forgive the sloppy code. If this is of use to you and you need more features and want to contribute them, or maybe tell me what they'd be... we can make this better. Nico --
Re: Word won't open simplest LyXHTML file
On Jan 23, 2013, at 1:02 AM, Rainer M Krug wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 22/01/13 23:37, Jerry wrote: >> >> On Jan 22, 2013, at 1:38 AM, Rainer M Krug wrote: >> Also, I played with pandoc a while back and its conversion of a very simple LyX file to Word was not perfect. I went LyX -> LaTeX -> docx. I did not investigate setting options very much. I recall that equations made the trip and were editable in Word 2011 (Mac) built-in equation editor, but equation numbers were lost. Today's effort, also on a simple but different document, LyX -> LaTeX -> docx, one equation was not typeset (only the markup appeared), a .eps file was not found even though it was present, and section labels were translated as literal text. Converting to .odt was worse, and at least once caused it to crash when it was attempting to repair what it thought was a damaged converted file. (But what _doesn't_ cause LibreOffice to crash?) >>> >>> I also tried to go the LyX -> LaTeX -> docx route, but the results were not >>> as usable as via >>> xhtml. So I would suggest to try the route via xhtml. >> >> How did you get from XHTML -> docx? Pandoc (according to the first paragraph >> of the user's >> manual) does not accept XHTML input files. Jerry > > Well - using > > pandoc -o newfile.docx newfile1.xhtml > > works as expected and produces a docx file. > > So I can only say it works. I only used the converters and format definitions > as mentioned earlier. > > > Truy it: > > simple lyx file, export to LyXhtml and use above command to convert to docx. > > Cheers, > > Rainer Thanks, Ranier. I have just now tried this on a simple document (two equations, two sections, a footnote, a figure with caption, a greyed comment, and two cross references (to an equation and to a section). As usual, the LyXHTML looks very good. But in the docx, the equations are not rendered and contain spurious text, the figure caption and figure name are separated from the figure and are shown as normal text, spurious text is inserted relating to the image, and all of the cross-references move the cursor to the title rather than to where it should move. The footnote is printed as ordinary text as is the greyed text also. pandoc -o newfile.odt newfile1.xhtml results in a similar result, but with completely nonfunctional cross references and no spurious text relating to the figure image. I'm using OS X, LyX 2.0.5, Word 2011, LibreOffice 4.0.0.1, and pandoc 1.9.4.2. Jerry >> >>> You should try both converters (the build in and eLyXe), as they performed >>> differently on >>> different objects. As my document did not contain any equations, I can not >>> comment on that. >>> >>> I must say, that I also used pandoc to convert to odt and then converted >>> the odt to docx >>> with OpenOffice (this was before LibreOffice...) and it also worked well. >>> >>> I can only suggest to try the different paths out and see which works best, >>> and then post >>> your experiences here and add them to http://www.lyx.org/trac/ticket/6042 >>> so that there is >>> some progress with pandoc support in LyX. >>> >>> Cheers, >>> >>> Rainer >>> >>> Jerry >> >> > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.11 (GNU/Linux) > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > iQEcBAEBAgAGBQJQ/5kMAAoJENvXNx4PUvmCrMcIAKPlUM39ihrVVGfAWgbyyv9B > eqNmrpj4VvAgkUppfDmjwD2kK1TMjuvJA7ImQ+zx5/M3mz8otXgQOZIbJzzzYq0u > NRjsBvIGmrYAPToC8gjcaTkn0S+qoWVO80gmrDVorSutIkZDAzpefgdLIeNQecz7 > 927loMioyZtLhikxtI6WeZfpI423zY7RT0tdQZW1MpNVOXxqP1XU5Dob3ljJe5ZW > wHDTovgg85r1BEaJX+SfkIkhJOiKu/uPfLbKw3+APlrSKIlZpWGUrvfnKYweCbtr > dnbFg21rJPlG2gwK+uoatxOAsCLIA+Ybd5eS9l19SxCx5nSNrSk2gWEFgwa9sBU= > =Lwnd > -END PGP SIGNATURE- >
KOMA-script letter2: adding graphic letterhead
The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. With version 1 I could place a float above the recipient's name; with the current version 2 the only float option is 'wrap' which is not what I want. Placing the figure not as a float _almost_ works; I could play with it to center it on the page. But, I'm also getting all sorts of spurious cruft (such as 'URL:') on the preview page; do I comment out all this stuff in the preamble? Typeset letters are much more impressive than are the normal processed words. But, since almost everyone uses e-mail now I just don't send snail-mail letters like I used to do. Hints, clues, and ideas certainly welcomed! Rich
Re: KOMA-script letter2: adding graphic letterhead
Le 24/01/2013 01:53, Rich Shepard a écrit : On Wed, 23 Jan 2013, Rich Shepard wrote: The last time I used the KOMA-Script letter2 class in LyX was with version 1; probably 8 or 9 years ago. Now I want to use it for a letter but cannot figure out how, in version 2, I can add my letterhead (as an .eps file) at the top of the page. I resolved this issue -- sort of -- by inserting the .pdf version of the letterhead immediately following 'Sender Address:'. But, I get two copies on the preview, one offset from the other and I've not found why or how to fix this. You get two copies because you are using the backaddress in the preamble. You should uncomment the corresponding line in the preamble like this: ,backaddress=false% print the back address? The backaddress is a german specific way of displaying the Sender Address with a tiny font in the enveloppe window on top of the "Destination address". It seems to me that adding the letterhead by using the "Sender Address" is not the right way to do it. You should customize the "DIN.lco" options file that you are using. Have a look at my NFpro.lco here: http://wiki.lyx.org/Examples/KomaLetter2 I still use KOMA-Script letter2 class from time to time with Lyx version 2. -- jmp