📄 lyxport.1
字号:
.IX Item "-p --ps"Export to PostScript..Ip "\fB\-f \-\-pdf\fR" 4.IX Item "-f --pdf"Export to \s-1PDF\s0. See below the section the PDF GENERATION entry elsewhere in this document for details on how toobtain nice-looking \s-1PDF\s0 from your LaTeX sources..SpIf none of the three above options is specified, the default behavior is toexport \fIall\fR three formats. If any is given, then only those formatsexplicitly specified will be produced (e.g. \fB\-h \-f\fR makes \s-1HTML\s0 and \s-1PDF\s0 only,but not PostScript)..Ip "\fB\-c \-\-clean\fR" 4.IX Item "-c --clean"Do a clean start export, removing first any html directory, .aux, .logand .toc files which may have been left from previous runs..Ip "\fB\-t \-\-tidy\fR" 4.IX Item "-t --tidy"\&\fBlyxport\fR will tidy up \fIafter\fR itself, removing .aux, .log and .toc files leftin the current directory. Use this only for \*(L"final\*(R" publication of documents, asthose files are otherwise useful to shorten the time of runs..SpThis option is incremental: you can call it twice (you can bundle it as\&\fB\-tt\fR). If called twice, \fBlyxport\fR will remove also the LaTeX fileassociated with your LyX file, but \fIonly if\fR \fBlyxport\fR \fIitself created itin the same run\fR. This behavior is meant to be a safety net, so that\&\fBlyxport\fR doesn't accidentally remove LaTeX files which you may have manuallymodified in some way..SpSo if this option is called twice, you can start with a LyX file named \fIfile.lyx\fRand end up only with your original file plus a single directory named \fIfile\fR which will contain \fIfile.html\fR, \fIfile.ps\fR and \fIfile.pdf\fR (plus some ancillary stuff forthe html version). This mode of operation is obviously provided for the neatnessfreaks amongst us..Ip "\fB\-d \-\-debug\fR" 4.IX Item "-d --debug"Debugging mode: \fBlyxport\fR will leave \fIall\fR temporary files it creates lyingaround. If a particular target refuses to build, you can then try to run therespective commands on the temporary files manually, and possibly diagnose thesource of the problem..SpThis option will override any calls made to option \fB\*(--tidy\fR..Ip "\fB\-l \-\-cld\fR" 4.IX Item "-l --cld"Special command-line debugging mode: only prints (in a rather primitive form)the names and values of all command-line options which were set. Useful forfinding problems with complicated option strings being passed to\&\fBlatex2html\fR..Ip "\fB\*(--help\fR" 4.IX Item "help"Print this help and quit..Ip "\fB\-m \-\-man\fR" 4.IX Item "-m --man"Print a complete man page. \fBlyxport\fR is documented using embedded podstrings, so you can see its full documentation using the command \fBperldoclyxport\fR..SpYou can also convert this documentation to other formats using the\&\fIpod2_anything\fR family of converters (\fIpod2html\fR, \fIpod2latex\fR, \fIpod2man\fRand \fIpod2text\fR). See their respective man pages for details..SpNote that if you installed \fBlyxport\fR properly, you should already have a manpage available, plus html and plain text versions of the documents. These areby default installed to a directory named \fI/usr/local/doc/lyxport-XXX\fR, where\&\fI\s-1XXX\s0\fR is the version number. At installation time, you may manually changethe \fI/usr/local\fR prefix. Consult your local documents or ask your systemadministrator for details on the specifics of your configuration..Ip "\fB\-v \-\-version\fR" 4.IX Item "-v --version"Print version information and quit..Ip "\fBfilename\fR" 4.IX Item "filename"The given filename may have a .lyx or .tex extension (or none atall). \fIlyxport\fR will update the tex file from the lyx file if necessary..Sp\&\fBlyxport\fR accepts only \fIone\fR filename at a time..SH "INTEGRATION WITH LyX".IX Header "INTEGRATION WITH LyX"If you find that \fBlyxport\fR is more succesful in exporting your files thanLyX's default calls to \fBlatex2html\fR and \fBpdflatex\fR, you can modify LyX touse \fBlyxport\fR as its conversion routine. For LyX versions 1.1.6 and above, goto \f(CW\*(C`Edit\->Preferences\->Converters\->Converters\*(C'\fR and specify \fBlyxport\fR as yourconverter for \f(CW\*(C`LaTeX\->HTML\*(C'\fR and \f(CW\*(C`LaTeX\->PDF\*(C'\fR. LyX's conventionis to call \fB$$i\fR the current file..PPFor example, if you want to setup \fBlyxport\fR to be your \s-1PDF\s0 export filterunder LyX, in the \f(CW\*(C`Converters\*(C'\fR dialog, in the \f(CW\*(C`LaTeX\->PDF(pdflatex)\*(C'\fRoption, set:.PP.Vb 1\& lyxport --pdf $$i.VeThis way you'll be able to export to pdf directly from within LyX, even ifyour figures are in eps format..PPLyX's \f(CW\*(C`Converters\*(C'\fR dialog is a bit confusing: after making changes, you mustfirst press the \f(CW\*(C`Modify\*(C'\fR button for your changes to actually be recorded, andthen \f(CW\*(C`Save\*(C'\fR..PPYou can similarly set up \fBlyxport\fR to be your LaTeX to \s-1HTML\s0 converter..PPFor LyX versions earlier than 1.1.6 (which didn't have the new Preferencesdialog) these same options can be configured via your LyX defaults file. Seethe LyX documentation for details..SH "PDF GENERATION".IX Header "PDF GENERATION".Sh "Fonts".IX Subsection "Fonts"Normally \s-1PDF\s0 documents made on Unix-type systems from LaTeX sources producehorrible looking fonts when viewed with Adobe's own Acrobat Reader. I don'tknow the many intricacies of the problem (you can search for the details onyour own). I'll simply list here the trick that has helped \fIme\fR solve thefont problem. Try it, your mileage may vary..Ip "1" 4.IX Item "1"In your home directory, make (or modify it if it already exists) a file named \fI.dvipsrc\fR which must contain the lines:.Sp.Vb 2\& p+ psfonts.cmz\& p+ psfonts.amz.Ve.Ip "2" 4.IX Item "2"Make sure that the LaTeX preamble of your LyX file (or the part before \f(CW\*(C`\ebegin{document}\*(C'\fR if you are using straight LaTeX files) contains:.Sp.Vb 2\& \eusepackage[T1]{fontenc}\& \eusepackage{ae,aecompl}.VeThis will guarantee that T1 encoded fonts come out looking good in the final \s-1PDF\s0..Sh "Figures".IX Subsection "Figures"\&\fBpdflatex\fR (if I understand correctly) only accepts filenames with a single\&\fB.\fR in them, and only uses graphic files with extensions pdf, png, jpg andtif (all lowercase). \fBlyxport\fR will do its best to analyze your latex fileand try to change references to figures to accommodate \fBpdflatex\fR, bycreating temporary copies of your image files if necessary..PPIdeally, you should be able to have for example a figure called \fIfig.1.JPG\fRalong with a \fIfig.1.eps\fR (for \fBlyx\fR to preview it), and \fBlyxport\fR wouldexport a pdf document without leaving any more files after itself, even thoughit temporarily had to create \fIfig_1.jpg\fR to make \fBpdflatex\fR happy. As Isaid, ideally... If things don't quite work, try the \fB\*(--debug\fR option. If youfind a fix for the problem, mail it to me: fperez@pizero.colorado.edu.Sh "Links".IX Subsection "Links"In order for URLs and similar elements to produce proper active links in the\&\s-1PDF\s0 document, you need to include in your LaTeX preamble the line.PP.Vb 1\& \eusepackage{hyperref}.Ve.SH "REQUIRES".IX Header "REQUIRES"\&\fBlyxport\fR relies on some programs listed below, for the reasons indicated:.Ip "\fBlyx\fR" 4.IX Item "lyx"To make LaTeX files from LyX files. Tested with lyx version 1.1.6fix1, should work with earlier versions (perhaps with minor changes to the way LyX is called)..Ip "\fBlatex\fR" 4.IX Item "latex"To produce PostScript and for latex2html to work properly (cross-references)..Ip "\fBdvips\fR" 4.IX Item "dvips"For making PostScript output..Ip "\fBlatex2html\fR" 4.IX Item "latex2html"For generating \s-1HTML\s0 from latex sources..Ip "\fBpdflatex\fR" 4.IX Item "pdflatex"For making \s-1PDF\s0 output from a latex file with proper cross-referencing andinternal document links..Ip "\fBepstopdf\fR" 4.IX Item "epstopdf"A Perl script to automatically generate pdf versions of eps figures includedin lyx files. It is more robust in its handling of various eps quirks than astraight call to \fBps2pdf\fR..Ip "\fBperl\fR" 4.IX Item "perl"Well, it's a Perl script after all, isn't it?.PPHowever, partial use of \fBlyxport\fR is still possible without some of thesecomponents. If for example you don't have \fBlatex2html\fR in your system, youcan still use \fBlyxport\fR to produce PostScript and \s-1PDF\s0. Various combinationsare possible..Sh "Portability".IX Subsection "Portability"There are calls in \fBlyxport\fR to some Unix commands like \fBrm \-rf\fR. For thisreason it is not totally portable. These calls are however reasonably few andcould be eliminated if there is enough demand by replacing them withequivalent Perl code. It's just more work....SH "TO DO".IX Header "TO DO".Ip "\(bu" 4Build rpm for more convenient installation..Ip "\(bu" 4Clean up the \f(CW\*(C`improve_tex4html()\*(C'\fR code for readability..SH "VERSION".IX Header "VERSION"This is \fBlyxport\fR version 0.3.SH "AUTHOR".IX Header "AUTHOR"Fernando P閞ez <fperez@pizero.colorado.edu>..PPPlease email me with comments, suggestions, bugfixes, etc..PPThe most current version of \fBlyxport\fR should always be available at http://www-hep.colorado.edu/~fperez/lyxport.SH "ACKNOWLEDGEMENTS".IX Header "ACKNOWLEDGEMENTS"Inspired on the \fBlyx2html\fR script by Steffen Evers<tron@cs.tu-berlin.de>. Some of the code is a blatant ripoff ofSteffen's code, using \fBs2p\fR to get Perl versions of his original \fBsed\fRscripts..SH "COPYRIGHT AND DISCLAIMER".IX Header "COPYRIGHT AND DISCLAIMER"This program is Copyright 2001 by Fernando P閞ez..PPThis program is free software; you can redistribute it and/or modify it underthe terms of the \s-1GNU\s0 General Public License as published by the Free SoftwareFoundation; either version 2 of the License, or (at your option) any laterversion..PPThis program is distributed in the hope that it will be useful,but \s-1WITHOUT\s0 \s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of\&\s-1MERCHANTABILITY\s0 or \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the\&\s-1GNU\s0 General Public License for more details..PPIf you do not have a copy of the \s-1GNU\s0 General Public License write tothe Free Software Foundation, Inc., 675 Mass Ave, Cambridge,\&\s-1MA\s0 02139, \s-1USA\s0..PPIf the author of this software was too lazy to include the full \s-1GPL\s0 text alongwith the code, you can find it at: http://www.gnu.org/copyleft/gpl.html
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -