Gedit add-ons for LaTeX

The default text editor that comes with the Gnome GNU/Linux desktop is called gedit, and I like using it for editing LaTeX and HTML. I have a few little tweaks I use for a smoother user experience.

Firstly, I can use it as an easy file browser, by going to View > Side Panel, and then clicking on the filing cabinet at the bottom of the panel.

Secondly, gedit has the option of adding little shell scripts that you can set to execute using a keyboard shortcut, by going to Tools > Manage External Tools. I have three useful scripts that I can run on a LaTeX document that I'm currently editing.

Ctrl+Q: TeXCount. Count the number of words in the document, ignoring markup.


#!/bin/sh
NUMWORDS=$(texcount $GEDIT_CURRENT_DOCUMENT_NAME)
exec `zenity --info --title="TeXCount output" --text="$NUMWORDS"`

Ctrl+Alt+W: BibTeX. Insert references into the document.


#!/bin/sh
FULLNAME=$GEDIT_CURRENT_DOCUMENT_NAME
SHORTNAME=${FULLNAME%.tex}
bibtex $SHORTNAME

Ctrl+Alt+Q: PDFLaTeX. Compile the document into a PDF.


#!/bin/sh
pdflatex $GEDIT_CURRENT_DOCUMENT_NAME

I've also had to play around with bibliography styles a bit lately. I've slightly modified the usual abbrv.bst and abbrvnat.bst bibliography style files (which are usually this and this), to stop them from displaying the month:

no-month.bst
no-monthnat.bst

To use, just download the file and put it in the same directory as your document, and then put either:

\bibliographystyle{no-month}

or

\bibliographystyle{no-monthnat}

in the markup.

I'm really glad I get to use LaTeX for everything. It can be a bit of a struggle to enact specific changes to the formatting, but in general it's easy to get a beautiful document while enjoying the portability and robustness of simple text files.

...