LATEX_SHOW(1) User Manuals LATEX_SHOW(1) NAME latex_show - run pdflatex, and launche xpdf if pdflatex exit successfully. SYNOPSIS latex_show [ -h ] LATEX_SOURCE DESCRIPTION latex_show is a small wrapper script, to phrase and show your latex file in one step. If you use /etc/bash_completion, it's a god idea to place the following content in a file called /etc/bash_completion.d/latex_show complete -f -X '!*.@(tex|TEX)' latex_show This will help handling the mess of *.tex *.log *.aux and *.pdf EXAMPLES From commandline: latex_show my_letter.tex If you use VIM, you can direct call it without leaving the editor :! latex_show my_letter.tex OPTIONS -h print this help AUTHOR Wulf CoulmannSEE ALSO pdfetex(1) xpdf(1) vim(1) Linux Last change: November 2006
#!/bin/bash # copyright Wulf Coulmann <scripts at gpl.coulmann dot de> # GNU GPL # http://www.gnu.org/licenses/gpl.html # # Download me here: http://gpl.coulmann.de/latex_show USAGE=" Usage: latex_show [ -h ] LATEX_SOURCE" case $1 in *.tex) TEX=$1 DOK=`echo $TEX |sed s/tex$/pdf/` pdflatex $TEX if [ $? == 0 ] ; then xpdf $DOK & fi ;; -h | --help | -help) cat | less << 'EOD' LATEX_SHOW(1) User Manuals LATEX_SHOW(1) NAME latex_show - run pdflatex, and launche xpdf if pdflatex exit successfully. SYNOPSIS latex_show [ -h ] LATEX_SOURCE DESCRIPTION latex_show is a small wrapper script, to phrase and show your latex file in one step. If you use /etc/bash_completion, it's a god idea to place the following content in a file called /etc/bash_completion.d/latex_show complete -f -X '!*.@(tex|TEX)' latex_show This will help handling the mess of *.tex *.log *.aux and *.pdf EXAMPLES From commandline: latex_show my_letter.tex If you use VIM, you can direct call it without leaving the editor :! latex_show my_letter.tex OPTIONS -h print this help AUTHOR Wulf Coulmann <scripts at gpl.coulmann dot de> SEE ALSO pdfetex(1) xpdf(1) vim(1) Linux Last change: November 2006 EOD exit 0 ;; *) echo $USAGE exit 5 ;; esac