On 2009-04-06, rgheck wrote: > Vito De Tullio wrote: >> 1) Can I use a custom OutputType? LyX tells me:
> No. The allowed types are hardcoded. However, the OutputType literate has been "hijacked" to work with sweave (see the wiki and archives for details). However, I would like to see this restriction on OutputType lifted, so that LyX can be told to generate "latex + specials" output for a pre-processor like: special.module: OutputType latex-special Style Special LatexName specialcmd LatexType environment PassThru true FreeSpacing true ... End The "latex-special" document format and a LaTeX-Special->LaTeX converter would be defined in the FORMATS and CONVERTERS sections. The end-user would simply use a module and request View PDF (or similar), and LyX would * output the document to "latex-special" * convert to LaTeX * proceed as usual > LyX will generate tex if it thinks it needs to do so. If you want to > convert TeX to something else, you can define a converter for that. The problem is that some latex extensions/packages, like * noweb, * lilybook, * pst-pdf * frontespizio produce "latex+special" and expect pre-processing before the LaTeX run, e.g. The package pst-pdf simplifies the use of graphics from PSTricks and other PostScript code in PDF documents. As in building a bibliography with BibTEX additional external programmes are being invoked. In this case they are used to create a PDF file (\PDFcontainer) that will contain all this graphics material. In the final document this contents will be inserted instead of the original PostScript code. While it is possible to do: 1. let LyX export "latex+special" as tex 2. define file format "PDF (from latex+special)" 3. define converter LaTeX -> PDF (from latex+special) this has several drawbacks: * You have to remember that compiling a document with Style "special" needs to be done with View/Export to PDF (from latex+special) (Compiling the latex+special file "the normal way" will not give the expected result but LyX does not know this.) * If you want several end formats (PDF(pdflatex), PDF(dvips), PS) you have to define a "... (from latex+special)" version for each of them. Günter