Year: 2011Makefile for ACM Publications in LaTeXOctober 18, 2011 Below is the Makefile I use for compiling ACM publications. The Makefile LATEX = latex
BIBTEX = bibtex
PDF = ps2pdf
PDF_FLAGS = -dMaxSubsetPct=100 -dCompatibilityLevel=1.2 -dSubsetFonts=true \
-dEmbedAllFonts=true -dEPSCrop=true
PS = dvips
PS_FLAGS = -P cmz -t letter
WORKINGBASE = main
CAMERABASE = final
default: working
working: version $(WORKINGBASE).pdf
camera: $(CAMERABASE).pdf
gs -q -dNOPAUSE -dBATCH -dPDFSETTINGS=/prepress -sDEVICE=pdfwrite \
-sOutputFile=$<.tmp $<
mv $<.tmp $<
version:
svnversion > version.tex
%.pdf: %.ps
$(PDF) $(PDF_FLAGS) $<
.PRECIOUS:%.ps
%.ps: %.dvi
$(PS) $(PS_FLAGS) $< -o $@
$(WORKINGBASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(BIBTEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(CAMERABASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
clean:
rm -rRf *.dvi *.aux *.blg *.log *.ps *~ *.bbl *.pdf *.out
I also set the svn propedit svn:ignore .and add the following: *.aux *.bbl *.blg *.log *.dvi *.ps version.tex main.pdf (Change Categories: Uncategorized Fix X11 Forwarding over SSH in Ubuntu 10.04 (Lucid) October 13, 2011 There is a bug in Ubuntu Lucid’s sshd (SSH server) that causes issues with IPv6-enabled network interfaces preventing X11 forwarding over SSH from working properly. The error in error: Failed to allocate internet-domain X11 display socket. To fix the issue, you need to tell sshd to only listen to IPv4. Add the following line at the top of AddressFamily inet Solution is from: http://www.se.cuhk.edu.hk/~hmleung/wordpress/?p=876 Categories: Linux, Networking Persistent Iptables in Ubuntu September 09, 2011 Fedora defaults to persisting iptables (the Linux firewall) between restarts, but this is not the default case in Ubuntu. To have iptables persist between reboots in Ubuntu, you can install the iptables-persistent package: sudo apt-get install iptables-persistentThe persistent tables will be stored in /etc/iptables/rules by default. You can save the live iptables to the persistent file using: sudo iptables-save< /etc/iptables/rules Solution is from https://help.ubuntu.com/community/IptablesHowTo#Configuration_on_startup Categories: Linux, Networking Focus Window on Mouse Over in Gnome August 11, 2011 To have a window receive focus when you move your mouse over it in Gnome, you need to change a setting in Categories: Linux Tags: gnome Compiling LaTeX Publications for Conference Proceedings July 25, 2011 As a computer science graduate student, compiling LaTeX publications for conferences is a frequent task. For the draft and submission versions, compilation settings are not as particular, but a final camera ready version has certain requirements, such as a PDF with embedded fonts. I have built a Makefile that allows me to compile everything from my early drafts to the final camera-ready version that meets the requirements of typical ACM publications. The Makefile assumes your main LaTeX file is called main.tex (change the value assigned to the
LATEX = latex
BIBTEX = bibtex
PDF = ps2pdf
PDF_FLAGS = -dPDFSETTINGS=/prepress
PS = dvips
PS_FLAGS = -t letter
BASE = main
CAMERABASE = camera
.PRECIOUS:$(CAMERABASE).ps
all: version $(BASE).pdf
camera: $(CAMERABASE).pdf
version:
svnversion > version.tex
%.pdf: %.ps
$(PDF) $(PDF_FLAGS) $<
%.ps: %.dvi
$(PS) $(PS_FLAGS) $< -o $@
$(BASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(BIBTEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(CAMERABASE).dvi: $(wildcard *.tex) $(wildcard *.bib) $(wildcard images/*.eps)
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
$(LATEX) ${@:.dvi=}
clean:
rm -rf *.dvi *.aux *.blg *.log $ *~ *.bbl *.out
rm -rf (BASE).ps $(BASE).pdf $(CAMERABASE).pdf
Categories: Uncategorized Tags: latex, subversion Parse a CSV File Using Awk July 06, 2011 To perform text processing on a CSV file row-by-row, you can use awk. A single row can be split into columns using the cat myfile.csv | awk '{ split($0,a,","); print a[1]","a[3]; }'
It is important to note that awk uses one-based array indexing (not zero-based). Categories: Uncategorized Tags: awk Fixing Gnome Themes in Ubuntu 11.04 (Natty) May 17, 2011 A laptop that was dist upgraded from 10.11 to 11.04 was not applying the correct Gnome themes. Changing the theme in sudo apt-get purge gnome-accessibility-themes sudo apt-get install gnome-themes-standard This blog posted is based on a forum post at: http://ubuntuforums.org/showthread.php?t=1725221&page=2 Categories: Linux Install SNMP on Ubuntu May 06, 2011 To install SNMP on Ubuntu, run the commands below (as root):
apt-get install -y snmpd
CONFIG="/etc/snmp/snmpd.conf"
mv $CONFIG $CONFIG.bak
echo rocommunity public > $CONFIG
echo syslocation "put location here" >> $CONFIG
echo syscontact youremail@yourdomain.com >> $CONFIG
CONFIG="/etc/default/snmpd"
mv $CONFIG $CONFIG.bak
cat $CONFIG.bak | grep -v SNMPDOPTS > $CONFIG
echo "SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -I -smux -p /var/run/snmpd.pid \
-c /etc/snmp/snmpd.conf'" >> $CONFIG
service snmpd restart
echo "Installed snmpd"
If you have a firewall, you will also need to allow UDP traffic on port 161. If you use iptables this can be accomplished with iptables -A INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT You can test if SNMP is working by running snmpwalk from another machine: snmpwalk -v 1 -c public -O e hostname This blog posted is based on documentation at http://www.it-slav.net/blogs/2009/02/05/install-and-configure-snmp-on-ubuntu. Categories: Linux, Networking Ubuntu 11.04 (Natty) Automated Network Installation May 05, 2011 Many sources exist to help with setting up automated network installations of Ubuntu. Below are a list of sources I used to get automated network installations of Ubuntu 11.04 (Natty Narhwal) working.
Categories: Linux Enable Uploads in MediaWiki May 02, 2011 To enable uploads (images and PDFs) in MediaWiki, make the following changes to the LocalSettings.php file for the installation:
Categories: Uncategorized Tags: mediawiki |
SearchCategories
Also see Emily & Aaron's Blog Tagsacm apt awk bash benchwork bibtex c compiz dd-wrt dia dvd eeebuntu eeepc eps excel fedora firefox flash freebsd gnome hostname iptables java kde latex mac os x mail merge mediawiki mercurial mrtg nvidia pdf perl phidgets postscript powerpoint printer putty pxe python R route scenery sed snmp ssh structures subnet subversion sudo ubuntu vegetarian vim visio windows word wrt54gl x11 yum Years |