⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lyxport

📁 用于OMNeT++的模板
💻
📖 第 1 页 / 共 3 页
字号:
Single letter options (preceded by a single dash B<->) can be bundled: B<-pf>is equivalent to B<-p -f>. Long options (preceded by two dashes B<-->) can beabbreviated to as few letters as needed to clear ambiguity.=over=item B<-r --runs> I<NUM>Set number of latex runs by hand (otherwise auto-determined).=item B<-o --opts_l2h> I<'string'>String with options to be passed to B<latex2html>. This string should beprotected by single quotes to allow double quotes inside of it.For example, if you want to pass to B<latex2html> the option B<-info "myinfo"> you can do so with B<lyxport -o ' -info "my info" '> (the extra spacesaround the quote marks are not needed, they are here only for the sake ofclarity).B<latex2html> has I<many> command-line options. For a project you are workingconstantly on, it may be more convenient to permanently set some of thoseoptions via a file called F<.latex2html-init> which B<latex2html> alwaysreads at startup. See the B<latex2html> man page or the excellent onlinedocumentation kept at http://www-texdev.mpce.mq.edu.au/l2h/docs/manual forfull details.=item B<-h --html>Export to HTML.=item B<-p --ps>Export to PostScript.=item B<-f --pdf>Export to PDF. See below the section L<PDF GENERATION> for details on how toobtain nice-looking PDF from your LaTeX sources.If none of the three above options is specified, the default behavior is toexport I<all> three formats. If any is given, then only those formatsexplicitly specified will be produced (e.g. B<-h -f> makes HTML and PDF only,but not PostScript).=item B<-c --clean>Do a clean start export, removing first any html directory, .aux, .logand .toc files which may have been left from previous runs.=item B<-t --tidy>B<lyxport> will tidy up I<after> itself, removing .aux, .log and .toc files leftin the current directory. Use this only for "final" publication of documents, asthose files are otherwise useful to shorten the time of runs.This option is incremental: you can call it twice (you can bundle it asB<-tt>). If called twice, B<lyxport> will remove also the LaTeX fileassociated with your LyX file, but I<only if> B<lyxport> I<itself created itin the same run>. This behavior is meant to be a safety net, so thatB<lyxport> doesn't accidentally remove LaTeX files which you may have manuallymodified in some way.So if this option is called twice, you can start with a LyX file named F<file.lyx>and end up only with your original file plus a single directory named F<file> which will contain F<file.html>, F<file.ps> and F<file.pdf> (plus some ancillary stuff forthe html version). This mode of operation is obviously provided for the neatnessfreaks amongst us.=item B<-d --debug>Debugging mode: B<lyxport> will leave I<all> 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.This option will override any calls made to option B<--tidy>.=item B<-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 toB<latex2html>.=item B<--help>Print this help and quit.=item B<-m --man>Print a complete man page. B<lyxport> is documented using embedded podstrings, so you can see its full documentation using the command B<perldoclyxport>.You can also convert this documentation to other formats using theI<pod2_anything> family of converters (I<pod2html>, I<pod2latex>, I<pod2man>and I<pod2text>). See their respective man pages for details.Note that if you installed B<lyxport> 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 F</usr/local/doc/lyxport-XXX>, whereF<XXX> is the version number. At installation time, you may manually changethe F</usr/local> prefix. Consult your local documents or ask your systemadministrator for details on the specifics of your configuration.=item B<-v --version>Print version information and quit.=item B<filename>The given filename may have a .lyx or .tex extension (or none atall). I<lyxport> will update the tex file from the lyx file if necessary.B<lyxport> accepts only I<one> filename at a time.=back=cut###########################################################################=pod=head1 INTEGRATION WITH LyXIf you find that B<lyxport> is more succesful in exporting your files thanLyX's default calls to B<latex2html> and B<pdflatex>, you can modify LyX touse B<lyxport> as its conversion routine. For LyX versions 1.1.6 and above, goto C<< Edit->Preferences->Converters->Converters >> and specify B<lyxport> as yourconverter for C<< LaTeX->HTML >> and C<< LaTeX->PDF >>. LyX's conventionis to call B<$$i> the current file.For example, if you want to setup B<lyxport> to be your PDF export filterunder LyX, in the C<Converters> dialog, in the C<< LaTeX->PDF(pdflatex) >>option, set:    lyxport --pdf $$iThis way you'll be able to export to pdf directly from within LyX, even ifyour figures are in eps format.LyX's C<Converters> dialog is a bit confusing: after making changes, you mustfirst press the C<Modify> button for your changes to actually be recorded, andthen C<Save>.You can similarly set up B<lyxport> to be your LaTeX to HTML converter.For 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.=cut###########################################################################=pod=head1 PDF GENERATION=head2 FontsNormally PDF 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 I<me> solve thefont problem. Try it, your mileage may vary.=over=item 1In your home directory, make (or modify it if it already exists) a file named F<.dvipsrc> which must contain the lines:    p+ psfonts.cmz    p+ psfonts.amz=item 2Make sure that the LaTeX preamble of your LyX file (or the part before C<\begin{document}> if you are using straight LaTeX files) contains:    \usepackage[T1]{fontenc}    \usepackage{ae,aecompl}This will guarantee that T1 encoded fonts come out looking good in the final PDF.=back=head2 FiguresB<pdflatex> (if I understand correctly) only accepts filenames with a singleB<.> in them, and only uses graphic files with extensions pdf, png, jpg andtif (all lowercase). B<lyxport> will do its best to analyze your latex fileand try to change references to figures to accommodate B<pdflatex>, bycreating temporary copies of your image files if necessary.Ideally, you should be able to have for example a figure called F<fig.1.JPG>along with a F<fig.1.eps> (for B<lyx> to preview it), and B<lyxport> wouldexport a pdf document without leaving any more files after itself, even thoughit temporarily had to create F<fig_1.jpg> to make B<pdflatex> happy. As Isaid, ideally... If things don't quite work, try the B<--debug> option. If youfind a fix for the problem, mail it to me: fperez@pizero.colorado.edu=head2 LinksIn order for URLs and similar elements to produce proper active links in thePDF document, you need to include in your LaTeX preamble the line    \usepackage{hyperref}=cut###########################################################################=pod=head1 REQUIRESB<lyxport> relies on some programs listed below, for the reasons indicated:=over=item B<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).=item B<latex>To produce PostScript and for latex2html to work properly (cross-references).=item B<dvips>For making PostScript output.=item B<latex2html>For generating HTML from latex sources.=item B<pdflatex>For making PDF output from a latex file with proper cross-referencing andinternal document links.=item B<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 B<ps2pdf>.=item B<perl>Well, it's a Perl script after all, isn't it?=backHowever, partial use of B<lyxport> is still possible without some of thesecomponents. If for example you don't have B<latex2html> in your system, youcan still use B<lyxport> to produce PostScript and PDF. Various combinationsare possible.=head2 PortabilityThere are calls in B<lyxport> to some Unix commands like B<rm -rf>. 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...=cut###########################################################################=pod=head1 TO DO=over=item *Build rpm for more convenient installation.=item *Clean up the C<improve_tex4html()> code for readability.=back=cut###########################################################################=pod=head1 VERSIONThis is B<lyxport> version 0.3=cut###########################################################################=pod=head1 AUTHORFernando P閞ez E<lt>fperez@pizero.colorado.eduE<gt>.Please email me with comments, suggestions, bugfixes, etc.The most current version of B<lyxport> should always be available at http://www-hep.colorado.edu/~fperez/lyxport=cut###########################################################################=pod=head1 ACKNOWLEDGEMENTSInspired on the B<lyx2html> script by Steffen EversE<lt>tron@cs.tu-berlin.deE<gt>.  Some of the code is a blatant ripoff ofSteffen's code, using B<s2p> to get Perl versions of his original B<sed>scripts.=cut###########################################################################=pod=head1 COPYRIGHT AND DISCLAIMERThis program is Copyright 2001 by Fernando P閞ez.This program is free software; you can redistribute it and/or modify it underthe terms of the GNU General Public License as published by the Free SoftwareFoundation; either version 2 of the License, or (at your option) any laterversion.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.If you do not have a copy of the GNU General Public License write tothe Free Software Foundation, Inc., 675 Mass Ave, Cambridge,MA 02139, USA.If the author of this software was too lazy to include the full GPL text alongwith the code, you can find it at: http://www.gnu.org/copyleft/gpl.html=cut#************************** end of file <lyxport> **********************

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -