Batch Bat common commands

Source: Internet
Author: User

The first two days of being hooked on latex, I think it's convenient to compile a PDF using Batch command.

So there was:

Type Main.tex | Find "\def\usewhat{dvipspdf}" && goto Dvipspdftype Main.tex | Find "\DEF\USEWHAT{DVIPDFMX}" && goto Dvipdfmxtype Main.tex | Find "\def\usewhat{pdflatex}" && goto Pdflatextype Main.tex | Find "\def\usewhat{xelatex}" && goto Xelatextype Main.tex | Find "\def\usewhat{yap}" && goto Yap:dvipspdfdel main_dvipspdf.pdf main.dvi Main.pslatex Main.texbibtex Mainlatex main.texgbk2uni Main.outlatex main.texdvips-g0-ta4 main.dvips2pdf main.ps main_dvipspdf.pdfdel *.aux *.bbl *. BLG *.out *.thm *.toc *.lof *.fen *.toe *.lot *.ten *.log *.ps *.dvi *.loa/sstart Main_dvipspdf.pdfexit:dvipdfmxdel main_ Dvipdfm.pdf Main.dvilatex Main.texbibtex Mainlatex main.texgbk2uni main.outlatex main.texdvipdfmx-p A4 Main.dviren Main  .pdf main_dvipdfmx.pdfdel *.aux *.bbl *.blg *.out *.thm *.toc *.lof *.fen *.toe *.lot *.ten *.log *.ps *.dvi *.loa /sstart Main_dvipdfmx.pdfexit:pdflatexdel Main_pdflatex.pdfpdflatex Main.tex >> Step1.txtbibtex main >> Step2. Txtpdflatex Main.tex >> step3.txtgbk2uni main.out >> step4.txtpdflatex Main.tex >> Step5.txtren main.pdf main_pdflatex.pdfdel *.aux *.bbl *.blg *.out *.thm *.toc *.lof *.fen *.toe *.lot *.ten *.log *.synctex *.loa /sst Art Main_pdflatex.pdfexit:xelatexdel Main_xelatex.pdfxelatex Main.texbibtex maincopy/b fixbbl.txt+main.bbl Main2.bbldel main.bblren main2.bbl main.bblxelatex main.texxelatex main.texren main.pdf main_xelatex.pdfdel *.aux *.bbl *.blg *.out *.thm *.toc *.lof *.fen *.toe *.lot *.ten *.log *.gz *.gz(busy)*.synctex *.loa /sstart main_xelatex.pdfexit:ya Pdel Main.dvilatex Main.texbibtex mainlatex main.texgbk2uni main.outlatex main.texdel *.aux *.bbl *.blg *.out *.thm *.toc *.lof *.fen *.toe *.lot *.ten *.log *.loa/sstart main.dviexit

  

  • Del *.aux/s
    Removes all aux suffix files from the current directory and all of its subdirectories. Displays the name of the file that is being deleted.

  • ren main.pdf main_dvipdfmx.pdf
    Rename the main.pdf to Main_dvipdfmx.pdf

  • Start 1.jpg
    This image is opened with the system default software 1.jpg

  • Start 1.pdf means to open 1.pdf this file with system default software
  • Start does not add parameters to open a new CMD terminal
  • Exit indicates exiting Terminal

  • Type Log.txt | Find "2011-11-11" |find "Data"
    Shows that the Log.txt file contains both the 2011-11-11 and data rows.

  • find/v/C "Log.txt"
    Number of rows Log.txt the statistics file

  • Dir
    No parameters: View the files and folders that are currently in your directory.
    /w: Displays files and folders in a compact way (5 files on one line).

  • dir/a/s/p
    /A: View all files that include hidden files.
    /s: View the files and folders for which the current directory has all its subdirectories.
    /p: Displayed as paging (automatically pausing after a page is displayed).
    /ah: Only hidden files are displayed.
    |more: The previous symbol is "|" The one above, called the redirect symbol, is the output of one command as a parameter to another command.
  • More is also an order, dir/w |more
    The result is the same as the result of dir/w/p.
    Other parameters you can use: dir/? view

  • Type Main.tex | Find "\def\usewhat{dvipspdf}" && goto dvipspdf
    If you find the string "\def\usewhat{dvipspdf}" in the Main.tex file, execute the program segment: Dvipspdf

  • Pause does not specify a pause time feature.

  • Specify the pause time using the ping command,
    namely: Ping-n-127.1>nul
    Where 30 seconds can be changed to another value, which represents the time that you want to pause and can be modified.
    In addition, >nul is also a non-essential item, where only the effect of shielding Ping's execution results is played.

  • Pdflatex Main.tex >> Step1.txt

  • BibTeX main >> Step2.txt
  • Pdflatex Main.tex >> Step3.txt
  • Gbk2uni main.out >> Step4.txt
  • Pdflatex Main.tex >> Step5.txt
    To view its output, you can output its execution results to a file in step

Batch Bat common commands

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.