<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.wiki.mohid.com/index.php?action=history&amp;feed=atom&amp;title=Latex_makefile</id>
		<title>Latex makefile - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.wiki.mohid.com/index.php?action=history&amp;feed=atom&amp;title=Latex_makefile"/>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Latex_makefile&amp;action=history"/>
		<updated>2026-04-05T09:22:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Latex_makefile&amp;diff=397&amp;oldid=prev</id>
		<title>Guillaume: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Latex_makefile&amp;diff=397&amp;oldid=prev"/>
				<updated>2008-12-03T10:27:12Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:27, 3 December 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;' lang='en'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Guillaume</name></author>	</entry>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Latex_makefile&amp;diff=396&amp;oldid=prev</id>
		<title>192.168.20.177: /* Dependencies */</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Latex_makefile&amp;diff=396&amp;oldid=prev"/>
				<updated>2008-02-06T15:14:53Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Dependencies&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Hard-core [[latex]] users may want to compile their postscript and pdf files from the command line and edit their tex files with [[vim]]. However, they'll be obliged to [[Latex#Commandline syntax|call several commands]] before they can get a final pdf file. This is because latex has a [[#Latex DAG diagram|pretty complex dependency diagram]]. For this type of advanced users, a [[bash]] script or a [[makefile]] may come in handy. In this article, we'll discuss a '''generic [[makefile]] solution'''.&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
# Copy/paste the [[#Makefile|makefile snippets]] below and create a [[#Dependencies|dependency file]].&lt;br /&gt;
# Make sure you have tabulations in the [[#Makefile|makefile]]'s rules.&lt;br /&gt;
# Chmod the file (linux only):&lt;br /&gt;
 &amp;gt; chmod 755 [[#Makefile|makefile]]&lt;br /&gt;
&lt;br /&gt;
===Syntax===&lt;br /&gt;
*Build target pdf or postscript files with either one of the following commands:&lt;br /&gt;
 &amp;gt; make -ri&lt;br /&gt;
 &amp;gt; make -ri [[Latex_template#main|main]]&lt;br /&gt;
 &amp;gt; make -ri [[Latex_template#main|main]].pdf&lt;br /&gt;
 &amp;gt; make -ri [[Latex_template#main|main]].ps&lt;br /&gt;
The first couple of lines will produce, each, both a pdf and a ps; whereas the last two lines will produce, each, only one of a kind. So, choose your weapon :)&lt;br /&gt;
*Clean pdf or ps files:&lt;br /&gt;
 &amp;gt; make clean&lt;br /&gt;
*Checkout from subversion repository&lt;br /&gt;
 &amp;gt; make checkout&lt;br /&gt;
*Commit to subversion repository&lt;br /&gt;
 &amp;gt; make commit&lt;br /&gt;
&lt;br /&gt;
==The makefile==&lt;br /&gt;
The [[#Dependencies|dependencies in the dependencies file]] are from [[latex template#tex_files|latex template]]'s.&lt;br /&gt;
&lt;br /&gt;
''NOTE: Make sure you get tabulations(\t) in your makefile's rules when you copy/paste.''&lt;br /&gt;
&lt;br /&gt;
''NOTE2: Make sure you disable all internal rules and ignore errors (&amp;lt;code&amp;gt;make -ri&amp;lt;/code&amp;gt;) when calling the makefile.''&lt;br /&gt;
===Main rules===&lt;br /&gt;
 #--[[#Makefile|make_all.mk]]---------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 MAIN = main&lt;br /&gt;
 &lt;br /&gt;
 .PHONY: all clean&lt;br /&gt;
 &lt;br /&gt;
 all : $(MAIN).pdf $(MAIN).ps&lt;br /&gt;
        @echo Done building $^&lt;br /&gt;
        rm *.aux&lt;br /&gt;
 &lt;br /&gt;
 clean : &lt;br /&gt;
        rm $(MAIN).pdf $(MAIN).ps&lt;br /&gt;
 &lt;br /&gt;
 #-------------------------------------------&lt;br /&gt;
===Svn===&lt;br /&gt;
 #---[[#Makefile|make_svn.mk]]---------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 REPO = https://preopmodel.googlecode.com/svn/trunk/latexsample&lt;br /&gt;
 USER = guillaume.riflet&lt;br /&gt;
 PASS = *******&lt;br /&gt;
 &lt;br /&gt;
 .PHONY = checkout commit&lt;br /&gt;
 &lt;br /&gt;
 checkout:&lt;br /&gt;
        svn $@ $(REPO) . --username $(USER)&lt;br /&gt;
 &lt;br /&gt;
 commit:&lt;br /&gt;
        svn $@ --force-log . &lt;br /&gt;
 &lt;br /&gt;
 #-------------------------------------------&lt;br /&gt;
===Makefile===&lt;br /&gt;
 #!/usr/bin/make -ri&lt;br /&gt;
 SHELL = /bin/sh&lt;br /&gt;
 &lt;br /&gt;
 include [[#Main rules|make_all.mk]]&lt;br /&gt;
 include [[#Svn|make_svn.mk]]&lt;br /&gt;
 &lt;br /&gt;
 #---[[#Makefile|makefile]]---------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 % : %.pdf %.ps&lt;br /&gt;
        @echo Done building $^&lt;br /&gt;
 &lt;br /&gt;
 %.pdf : %.dvi&lt;br /&gt;
        dvipdf $&amp;lt;&lt;br /&gt;
 &lt;br /&gt;
 %.ps : %.dvi&lt;br /&gt;
        dvips $&amp;lt;&lt;br /&gt;
 &lt;br /&gt;
 #Warning: must duplicate the command for cross-references&lt;br /&gt;
 %.dvi : %.blg&lt;br /&gt;
        latex $(&amp;lt;:.blg=.tex)&lt;br /&gt;
        latex $(&amp;lt;:.blg=.tex)&lt;br /&gt;
 &lt;br /&gt;
 %.blg : %.bbl&lt;br /&gt;
        @echo Warning: $@ doesn't exists yet!&lt;br /&gt;
 &lt;br /&gt;
 %.bbl : %.log&lt;br /&gt;
        bibtex $(&amp;lt;:.log=)&lt;br /&gt;
 &lt;br /&gt;
 %.log : %.toc&lt;br /&gt;
        @echo Warning: $@ doesn't exists yet!&lt;br /&gt;
 &lt;br /&gt;
 %.toc : %.aux&lt;br /&gt;
        @echo Warning: $@ doesn't exists yet!&lt;br /&gt;
 &lt;br /&gt;
 %.aux : %.tex&lt;br /&gt;
        latex $&amp;lt;&lt;br /&gt;
 &lt;br /&gt;
 %.tex :&lt;br /&gt;
        @echo Warning: $@ doesn't exists yet!&lt;br /&gt;
 &lt;br /&gt;
 #-------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 include [[#Dependencies|make_dependencies.mk]]&lt;br /&gt;
===Dependencies===&lt;br /&gt;
 #--[[#Makefile|make_dependencies.mk]]------------------------------&lt;br /&gt;
 &lt;br /&gt;
 Z = tex&lt;br /&gt;
 &lt;br /&gt;
 [[Latex_template#main_inc|$(MAIN).$(Z)]] : \&lt;br /&gt;
   [[Latex_template#introduction|introduction.$(Z)]] \&lt;br /&gt;
   [[Latex_template#contents|contents.$(Z)]] \&lt;br /&gt;
   [[Latex_template#conclusion|conclusion.$(Z)]] \&lt;br /&gt;
   [[Latex_template#annex|annex.$(Z)]]&lt;br /&gt;
        touch $@&lt;br /&gt;
 &lt;br /&gt;
 #-------------------------------------------&lt;br /&gt;
&lt;br /&gt;
==Latex DAG diagram==&lt;br /&gt;
&amp;lt;webimage&amp;gt;http://farm3.static.flickr.com/2176/2245479238_b750fcf7e3.jpg?v=0&amp;lt;/webimage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Latex]]&lt;br /&gt;
*[[Makefile]]&lt;br /&gt;
*[[Latex template]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Latex]]&lt;br /&gt;
[[Category:Makefile]]&lt;/div&gt;</summary>
		<author><name>192.168.20.177</name></author>	</entry>

	</feed>
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  ga('create', 'UA-56589921-5', 'auto');
  ga('send', 'pageview');
</script>