A shell script for ordinary LaTeX compilation

Source: Internet
Author: User

When using Biber I usually follow the order of Pdflatex→biber→pdflatex→pdflatex, which are not an available option of Many IDEs.

#! /bin/bash# # author:luglio# Date: -/ A/ -# Version:0.1.1# # prerequisites# LaTeX suite with Biber, sam2p# settings# Mode:latex, PDF, XE # Bib:no-No biber/biblatex# Yes-Use Biber (would run Tex forTimes ) # Pic:no-no picture converted to. epsfile# Yes-run sam2p to Convertmode="PDF"BIB="No"PIC="No"FILENAME=${1%.*}if["$MODE"x ="Latex"x] ThenMode="LaTeX"Prog="Latex"elif["$MODE"x ="PDF"x] ThenMode="Pdflatex"Prog="Pdflatex"elif["$MODE"x ="XE"x] ThenMode="Xelatex"Prog="Xelatex"ElseMode="UNKNOWN"Prog="Pdflatex"fiif["$BIB"x ="No"x] ThenBib=" out"elif["$BIB"x ="Yes"x] ThenBib=""ElseBib=" out"fiif["$PIC"x ="No"x] Thenpic=" not"elif["$PIC"x ="Yes"x] Thenpic=""Elsepic=" not"fiEcho "This was LaTeX make."Echo "Run in $mode mode, with$bib biber, pictures are$pic to being converted to. eps files."# sam2p (from Apt-get)if["$pic"x =""x] Then     forFormatinch. jpg. jpeg. bmp. png; Do         forPictureinch*${format}; Dosam2p ${picture} ${picture%.*}.eps Done     Donefi# Biber Preconditionif["$bib"x =""x] ThenEval"${prog} ${filename}.tex"Biber ${filename}.tex Eval"${prog} ${filename}.tex"fi# Run Texeval"${prog}-synctex=-1 ${filename}.tex"# DVI-PDFif["$prog"x ="Latex"x] ThenDVIPDFMX ${filename}.dvifi

A shell script for ordinary LaTeX compilation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.