LyX documentation. The exact details depend upon how you can call LyX itself from the command line on your platform try lyx --help , but if we ignore that, then what you want is:. See the File Formats pane in LyX's preferences dialog for a list of the available formats. This --export will create the output file in the same directory as the input file. To specify the output file and path, use --export-to , or -E e. Often the point of exporting from the commandline is to build different variants of the document.

Author:Brataur Felrajas
Language:English (Spanish)
Published (Last):22 January 2017
PDF File Size:14.80 Mb
ePub File Size:18.92 Mb
Price:Free* [*Free Regsitration Required]

LyX documentation. LyX can be set up to export to OpenDocument. This page explains how to do so using one of the main third-party converters, Pandoc. Pandoc is a free, open-source, multi-platform tool and, as of , actively developed. Some limitations of Pandoc are listed below. These are subject to change as Pandoc is further developed. If your export using Pandoc is unsatisfactory you should try exporting to RTF format using latex2rtf to see if the output is better.

LyX version 2. As of however, some setup is required for Pandoc to take account bibliography BibTeX files. That is detailed below. Additional configuration to process bibliographies is explained in the next section.

Note for Mac OS X users. There are two ways to install pandoc: an installer package and using "Homebrew". The first is quick but requires you to download and install the package again to get pandoc updates. The second is best because it allows for easy updates and it is needed anyway to install further tools, notably Latex2rtf, the other word processor converter for LyX. Here are the steps for the latter option note that, as of , the last step is missing on pandoc's installation webpage :.

That is easier with current versions of LyX 2. To upgrade to the current version go to LyX's webpage. That takes a few moments during which LyX scans your system and finds what tools and formats it can use. If all goes well it will detect Pandoc and Latex2rtf if you installed it and configure itself for using it and Latex2rtf.

When the process is over, LyX displays a message that says that you must restart it to use the new configuration. Open or create a LyX document. It's best to test with a simple one first not many pages, no modules, customised LaTeX code or preamble etc. A processing wheel and processing messages should appear at the bottom of your LyX window.

If all goes well, the last message displayed at the bottom of the window should be something like "Export successful". You should see a file with the same name but a. Try an open it with a word processor to see if the conversion worked. That's most likely because LyX is not sending Pandoc a file with the proper encoding. Try exporting again.

If that works now, then encoding was the problem. See the Troubleshooting section for a way to ensure that all your new LyX documents have the proper encoding setting.

If you still get the warning message, see Troubleshooting below. The default configuration above does not handle separate bibliography files. However Pandoc does support them and it is possible to setup LyX to include the bibliography in the conversion. By default the bibliography will be formatted in the Chicago manual of style author-year style. Some further setup is needed if you want to generate bibliographies in other formats. The first section below gives some background on bibliography files, you can skip it if you know what a BibTeX bibliography is.

If your LyX documents typically include a bibliography you are or should be using a BibTeX bibliography file. Perhaps that's a good thing, as bibliography files with the wrong encoding can cause an error that the average user will have a hard time to uncover see below, utf8 encoding issue. Below are the steps to allow exports with bibliography. See step " Try exporting " above.

Of course you should try a LyX document that uses a separate bibliography file. It's good to try with a simple e. The bibliography file must be in the so-called "utf8" encoding, otherwise you will get an error message "Error while processing pandoc To make sure your bibliography file is in the proper encoding see the Troubleshooting section. As of the configuration above will export your bibliography, but it will ignore your choice of bibliography style. That is, the converted document will use Pandoc's default style for bibliographies, namely the Chicago Manual of Style author-year model.

However, there are fairly easy ways to get Pandoc to generate a document with pretty much any bibliography style. Two options are detailed below. The first uses LyX only, the second uses the command line. The first step is common to both. Go to Zotero's style repository and search for the bibliography format you want. Click on the name of the style you choose to download a. The file is a description of the format in the "Citation Style Language" that can be used by Pandoc.

Below we use the file mybibformatfile. Save or copy the. That is not necessary see below for putting having. This method is good if you want to export a LyX file several times, or export several LyX files and use the same bibliography format for all. Its downside is that each time you want to change bibliography format, you have to change the LyX converter command.

The second is selected by the commands above --csl mybibformatfile. This method is good if you want to try several bibliographic formats quickly on the same file and if you're comfortable with the command line.

For more information of the command line do an online search with "command line" and the name of your system. Its downside is that each time you edit your text you need to export it again and switch from LyX to the terminal.

The methods above assume that your mybibformatfile. That's inconvenient if you're converting several documents scattered over several folders. Ideally, you'd want to have all your. For instance, a folder that also contains your.

This can be done in one of the two ways below. This method is good if you're using LyX on one computer only and your. First, find the "full path" of mybibformatfile. You should see the "path" or "location" there:. Copy the whole path.

Choose one of the method of the step 3. Note that double quotes " have been added around the full path. These are necessary if the full path contains spaces.

If the path doesn't contain spaces, as in the Linux and OS X examples above, you don't need them. If you adopt the command-line method to use bibliography formats, this method can save you some typing. If you adopt the Lyx-only method to use bibliography formats, this method is useful in two settings:.

Note if you're using the LyX-only method. To be able to export several all your LyX files with the same converter setting, these files should all have the same "relative position" relative to your. If they aren't you need to change the converter command whenever you switch to a LyX file with a different relative position relative to your. In most cases, this means that all the LyX files in question should be at the same "depth" in your directories.

If you're using the command-line method for exporting, that's less of a problem, as you have to enter a command for each export anyway. The first contains your bibliography file, mybibliography. Identify the relative path from your LyX file to your. In the example above the relative path is:. Here's how we find it. Start with the desired LyX document, say, wombat1.

We look at the steps needed to move from there, folder by folder, to reach mybibformatstyle. Namely, we would need to:.

Moving up one directory is marked.. Picking up a file is marked by the file name. So we need:. Put these together you get.. That is the "relative path" from wombat1. Note that you would do the very same steps to go from otter1. So that is also the relative path from otter1. To use that relative path, we choose one of the method of the step 3. That is most likely the result of encoding issues.



LyX documentation. LyX can be set up to export to OpenDocument. This page explains how to do so using one of the main third-party converters, Pandoc. Pandoc is a free, open-source, multi-platform tool and, as of , actively developed.



By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service. It only takes a minute to sign up. Now, instead, no pdf exports work. It reports that it was successful, but no actual output is created. Exporting to. Sign up to join this community.

Related Articles