Today I discovered a nice tool for improving your scientific writing: Neil Spring’s style-check.rb. In a primitive but effective way (and aware of LaTeX markup!), it checks your document for the occurrence of typical style or syntax errors. These are implemented as a configurable list of regular expressions. style-check.rb reports any encountered errors like a compiler, with line and column number, according to the developer’s philosophy that writing is just a special case of coding. When executing the script manually, its output is somewhat hard to “process” for a human, so I thought, why not integrate it into Emacs. Emacs is prepared for dealing with compiler output, so the solution was straightforward: (more…)
Posts Tagged ‘emacs’
Scientific writing with Emacs: style-check and writegood-mode
Saturday, February 25th, 2012Citing URLs with BibLaTeX and AUCTeX
Monday, December 7th, 2009I recently switched to BibLaTeX and also convinced Michael. Key advantages are: a huge supply of entry types and fields, comprehensive customizability, better Unicode awareness, and an exhaustive documentation. Among the best features is that one can now properly cite URLs. Not only is the url field supported (and displayed!) for almost all entry types, but also there is a standard way of saying when you last visited a URL – either a combination of the fields urlyear, urlmonth and urlday, or alternatively urldate = {YYYY-MM-DD}. The only tedium that remains is entering such dates. Users who, like me, use the AUCTeX Emacs mode for editing LaTeX and BibTeX, might find the following macro helpful. It is ready to be used in your ~/.emacs file:
(defun bibtex-insert-current-urldate ()
(interactive)
(bibtex-make-field
'("urldate" "" (lambda () (format-time-string "%Y-%m-%d" (current-time))))
t))
The following line binds it to the keyboard shortcut C-c u:
(add-hook 'bibtex-mode-hook '(lambda () (define-key bibtex-mode-map [(control c) ?u] 'bibtex-insert-current-urldate)))
With the default BibLaTeX style, the urldate field will render as (visited on MM/DD/YYYY).