• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

JasonHiebel/latex.makefile: An easily extendable, clean makefile for LaTeX docum ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

JasonHiebel/latex.makefile

开源软件地址(OpenSource Url):

https://github.com/JasonHiebel/latex.makefile

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

A Makefile for LaTeX Documents

This is a makefile for LaTeX documents which seeks to provide a general purpose, easily extendable tool for compiling documents.

Motivation

There are a couple of popular makefiles for LaTeX in existence (1, 2); feel free to search yourself and you'll find many more of various quality. Its been my impression that these makefiles are constructed with the goal of providing a holistic and singularly complete experience. That is, this is the one and only makefile you will ever need for your LaTeX documents. The result of this motivation is, predictably, complexity.

Here I take an alternative approach. Here we seek to provide the cleanest approach to compiling documents which fall under a vast majority of possible use cases. Beyond that, the makefile should be amenable to alteration so that an author can quickly digest and alter the makefile to account for whatever workflow they need for that particular document.

Usage

The makefile makes only the following assumptions about the structure of your project:

  1. the obj/ directory is not to be used. The auxiliary files generated by latex, bibtex, and other tools will be redirected to this folder. Generated DVI, PS, and PDF files will also be placed in this directory, and

  2. any files on which you want to condition recompilation must exist in the directory structure rooted at the directory in which the makefile exists.

Place a copy of the makefile in the root directory of your project. Feel free to rename the file to suit your needs; if you rename it to be "Makefile" or "makefile" so that it will automatically be recognized by make. Alternatively you are free to use make with the -f or --file flags to specify latex.makefile as your makefile.

Next we must specify the name of the main .tex file. This will serve as the project name for the purposes of compilation. Let consider a hypothetical resume document which uses resume.tex as the primary .tex file. At the beginning of the makefile you would add the line

PROJECT = resume

informing the makefile to use resume.tex when compiling the document and will then generate obj/resume.dvi, obj/resume.ps, and obj/resume.pdf.

There are three primary targets defined.

  • default: Compiles the document and converts the result to a PDF file.

  • display: Displays the compiled document in a standard PDF viewer. Linux uses Evince and Mac OSX uses the system specified default (likely Preview).

  • clean: The quintessential target. Removes the obj/ folder and thus removes and generated files.

Customization

The options for each program are defined using environment variables which are aptly named. By default the flags are constructed to favor graphical quality over file size (going far beyond the reasonable, some might say).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap