Notes from the Library

Sun, 02 Dec 2012

The standard way to do double spacing which everyone recommends as clean and neat is to use the setspace package since it doesn't double-space your footnotes which is generally desired.

Turns out that (a) this isn't the typographical standard of double-spacing (b) it's not the same as Microsoft Word which everyone else's extended essays/dissertations/theses will be written in.

So instead use this:

\usepackage[doublespacing]{setspace}
\setstretch{2}

and if you change the spacing be sure to do it again:

\singlespacing
[...]
\doublespacing\setstretch{2}

(source)

Thu, 06 Sep 2012

This is the easiest way I can find to make LaTeX render my Unicode Hangul characters on Debian.

,# apt-get install ko.tex ko.tex-extra
\usepackage[nonfrench,finemath]{kotex}
\usehangulfontspec{ut}
\SetHangulFonts{utgt}{utgt}{uttz}
\usepackage{dhucs-setspace}
\usepackage{dhucs-gremph}

The \SetHangulFonts line chooses a sans-serif font which I prefer for Korean. There are packages dhucs-enumitem, dhucs-enumerate and dhucs-paralist if you want your lists numbered in Korean too. To get things like "Contents" in Korean, try the hangul and hanja options to the kotex and dhucs-setspace packages above.

For use with Org-mode:

#+LATEX_HEADER: \usepackage[nonfrench,finemath]{kotex} \usehangulfontspec{ut} \SetHangulFonts{utgt}{utgt}{uttz} \usepackage{dhucs-setspace} \usepackage{dhucs-gremph}

Making use of this to make myself a sheet of number vocabulary to learn.

Sat, 10 Dec 2011

I used to cite all my sources in essays but have become lazy this term and my tutor has been (very politely) complaining, so I resolved to learn BiBTeX over this vac to automate the process. Five hours later and I have everything in place and can forget about this.

Wanted to share the code for getting the citation style used in academic philosophy papers, since this is the kind useful to me, and it took me a while to find the information I needed. This isn’t quite perfect: there is a full stop at the end of the citation I can’t remove (it is implied by the ‘oxford’ style, apparently), and I can’t get an ampersand between editor names. Not going to worry about that now; I now have an easy way to obsessively cite everything which is what I wanted.

In the preamble:

\usepackage[%
authorformat=smallcaps,%
titleformat=italic,%
titleformat=commasep,%
commabeforerest,%
ibidem=strictdoublepage,%
citefull=first,%
oxford,%
pages=test,%
idem,%
super,%
opcit,%
% human,%
bibformat=ibidem
]{jurabib}
\makeatletter
\jb@dotfalse
\makeatother

\AddTo\bibsenglish{%
  \def\edbyname{ed.}%
  \def\editorname{(ed.)}%
  \def\editorsname{(eds.)}%
  \def\incollinname{in}%
  \def\inname{in}%
}

\bibliographystyle{jox}

\renewcommand{\jbbtasep}{ \& }
\renewcommand{\jbbstasep}{ \& }
\renewcommand{\jbbtesep}{ \& }
\renewcommand{\jbbstesep}{ \& }
\renewcommand{\bibbtasep}{ \& }
\renewcommand{\bibbstasep}{ \& }
\renewcommand{\bibbtesep}{ \& }
\renewcommand{\bibbstesep}{ \& }

and at the end of the document:

\nobibliography{/home/swhitton/doc/swhittonfhs}

A useful resource I used in building this:

Survey about all jurabib options

It’s possible to integrate Org-mode, RefTeX and ebib to make it easy to edit .bib reference databases and to insert citations. Here is my code, and the relevant pages I’ve found it:

LaTeX Export | Worg

Research Paper Management with Emacs, org-mode and RefTeX | Mathletic

;;; ebib for editing BiBTeX databases

(autoload 'ebib "ebib" "Ebib, a BiBTeX database manager." t)
(setq ebib-preload-bib-files '("~/doc/swhittonfhs.bib"))

;; BiBTeX stuff
;; mainly from http://orgmode.org/worg/org-tutorials/org-latex-export.html

(org-add-link-type "ebib" 'ebib)

(org-add-link-type
 "cite" 'ebib
 (lambda (path desc format)
   (cond
    ((eq format 'html)
     (format "(<cite>%s</cite>)" path))
    ((eq format 'latex)
     (if (or (not desc) (equal 0 (search "cite:" desc)))
         (format "\\cite{%s}" path)
       (format "\\cite[%s][%s]{%s}"
               (cadr (split-string desc ";"))
               (car (split-string desc ";"))  path))))))

(setq org-latex-to-pdf-process '( "pdflatex -interaction nonstopmode -output-directory %o %f" "bibtex %f" "pdflatex -interaction nonstopmode -output-directory %o %f" "pdflatex -interaction nonstopmode -output-directory %o %f" "pdflatex -interaction nonstopmode -output-directory %o %f" ))

;; from http://tincman.wordpress.com/2011/01/04/research-paper-management-with-emacs-org-mode-and-reftex/

(setq reftex-default-bibliography
      (quote
       ("~/doc/swhittonfhs.bib")))

(defun org-mode-reftex-setup ()
  (load-library "reftex")
  (and (buffer-file-name) (file-exists-p (buffer-file-name))
       (progn
                                        ;enable auto-revert-mode to update reftex when bibtex file changes on disk
         (global-auto-revert-mode t)
         (reftex-parse-all)
                                        ;add a custom reftex cite format to insert links
         (reftex-set-cite-format
          "[[cite:%l][]]")
            )))
  (define-key org-mode-map (kbd "C-c )") 'reftex-citation)

(add-hook 'org-mode-hook 'org-mode-reftex-setup)

Edit 11/xii/2011: Surprisingly, since I assumed that only sites for science journals would have this, JSTOR can export articles to .bib for you to include easily.

Mon, 11 Jul 2011

LaTeX notes | Iain Murray

There’s some useful stuff here about getting spacing right, and the microtype package:

\usepackage[protrusion=true,expansion=true]{microtype}

which I’ve now added to all my standard packages (set-it-and-forget-it credit).

Fri, 29 Apr 2011

Bringhurst suggests that normally, an ellipsis should be spaced fore-and-aft to separate it from the text, but when it combines with other punctuation, the leading space disappears and the other punctuation follows. This is the usual practice in typesetting. He provides the following examples:

i … j k…. l…, l l, … l m…? n…!

(source, retrieved 29/iv/2011)

Page 1 of 2  older entries

RSS feed, Atom feed

RSS and Atom feeds limited to pieces of writing

Contact address:
< October 2014
MoTuWeThFrSaSu
   1 2 3 4 5
6 7 8 9101112
13141516171819
20212223242526
2728293031