LaTeX, Emacs and Ubuntu Linux
Syntax Highlighting LaTeX within Emacs
Syntax highlighting by default in Emacs both colours the text, and for section headers changes the font size. I like the coloured text but not the change in font size. To turn off the font size changes, set the variablefont-latex-fontify-sectioning
to color
:
M-x set-variable
font-latex-fontify-sectioning
color
Including Your Own LaTeX Style Files
Assuming you have your own style files to be used in LaTeX, you can have them included by setting theTEX_INPUTS
environment variable.
export TEX_INPUTS=${TEX_INPUTS}:~/doc/style
See how to automatically run this command on login.
Setting Path (and other variables) in Bash under Ubuntu
Use theexport
command to set environment variables in Bash. For example, the PATH
environment variable can be set with:
export PATH=${PATH}:/home/user/mybin
And you can put these commands in ~/.bash_login
(executed when the specific user logs in) or /etc/bash.bashrc
if you want it set for all users.
Setting Local Time Zone for Version Control in Emacs
I often use RCS for version control of files (especially, LaTeX source files). Emacs provides an interface to RCS, so that you can check-in/out the file via the editor. When recording and displaying the date of check-in/out I prefer to see the local tmie (rather than GMT). In Emacs, you can set the time zone using:
M-x
set-variable
vc-checkin-switches
"-zLT"
You should do the same with vc-checkout-switches
. The next time you check-in the file, the local time will be used.
Saving your Emacs Custom Options
Sometimes you will set options in Emacs to customize the behaviour. Normally, the variables you set are not saved when you close Emacs. In order to save the variable values for future sessions, then go to the Options -> Customize Emacs menu and select Options Matching Regexp. Search for the variables you have previously set and you can change the values and also select Save For Future Sessions. This will save the values in your~/.emacs
file.
Using RCS, Emacs and Ubuntu
I like to set the initial version to 0.1 (whereas, by default, RCS uses 1.1). Therefore I force the version number when first registering the file by usingci
on the command line:
ci -r0.1 file.tex
Then you can use the Emacs check-in/out commands to update new versions. To move from version 0.x to 1.y, again use the command line.
Created on Mon, 02 Apr 2007, 1:05pm
Last changed on Mon, 02 Apr 2007, 4:36pm