Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I use the acronym package for displaying acronyms, such as "KFC". As most of the acronyms are common knowledge, I use \acs{kfc}, which only presents the short form. Also, the siuntix package can be used to display units, such as "km".

To ensure consistency (spacing and appearance) throughout a document, should one:

  • Use the acronym package to define abbreviations, such as "e.g.", "BC", and "Mr."?
  • Use the acronym package together with siunitx to define units, such as "km"?

Update:

The solutions explain when to use the acronym package and when to use siunitx. Are there any packages for displaying abbreviations?

share|improve this question
    
With regard to macros for abreviations like "e.g.", see tex.stackexchange.com/questions/25820/… –  lockstep Dec 11 '11 at 1:59
4  
"Mr." and "e.g." are not acronyms and shouldn't be treated as such. For genuine acronyms use acronym or glossaries. For units, which are not acronyms either, always use siunitx, in text and math mode. Conceptually there is a big difference between the three types of abbreviation you're using, so this shouldn't be hard for you to determine. –  qubyte Dec 11 '11 at 2:49

2 Answers 2

In answer to your edit about abbreviations, in my experience (with French language, that is), abbreviations are almost impossible to define through a single macro because they will require manual tweaking in most instances, and I have not yet found a package that deals with them well enough.

Some of them will require ties (within the abbreviation or at its end) and some of them will require that you simply use the xspace package. Some of them, such as "e.g." are so well known that you do not need to explain them, whereas others will have to be inserted into whatever list of shorthands you put in your document. The only thing they have in common is that you do not need to define them on first use, but some abbreviations are not to be used in every place, hence you should have a means to force LaTeX to use the full form instead.

Some solutions that you can use would include:

Defining abbreviations manually

\usepackage{xspace}
\newcommand{\eg}{e.g.\@\xspace}
\newcommand{\Prof}{Prof.~}

This is the obvious solution, although it may require some additional macro to insert the abbreviations in the list of shorthands where needed. There are several ways to do so, but if you are using the BibLaTeX tweak (below), an "eg" custom entry, and then a simple \nocite{eg} will do the trick. You may need to add the abbreviations to a special category that is not printed in the general bibliography.

Tweaking BibLaTeX (Aka: the "not so trivial" solution)

In order to define abbreviations, I have been using this tweak: How to combine Shorthands of bibliographcal entries with acronyms in text?

If you also use it, as suggested, for acronyms and journal titles, you obtain a consistent tool, although you will need to use several entry types ("customa", "customb", etc.) depending on the result you want to achieve. The drawback is that you indeed need several files (well, preferably) in order to coordinate everything, it requires a lot of tweaking around with BibLaTeX, and you need both a citation entry and a manual abbreviation for all abbreviations.

Hence, my solution is a bit minimalist in the sense that there are probably other things you will need to tweak for it to display what you want… but it really depends on your settings for the bibliography.

I will only explain how to apply this mechanism to abbreviations, that is, bits of text that have the nasty habit of ending with a dot – which must not be repeated when used in text.

First, you need to define your abbreviation without the final dot. For instance:

@customa{Cciv,
    Shorthand = {C.~civ},
    Title = {Code civil}}

In order to display the abbreviation, we will define some macros.

\xdot, much like xspace, will add a dot only if needed:

\usepackage{xspace}
\newcommand*{\xdot}{%
    \@ifnextchar{.}%
        {}%
        {.\@\xspace}%
}

We then define \abbrv, a macro that will use the abbreviation if the citation command is starred (via "cite"), and the full form otherwise (via "citetitle"). You could make it work the other way around, indeed. You may want two such macros (some abbreviations are in short form unless starred, some are in long form unless starred)

Since we are using an actual citation command, we need to put the abbreviations in a special bibliography category (abbrv), and later on we will instruct BibLaTeX not to print it.

\abbrv will use \xdot as a default optional argument, so it will automatically insert a dot where needed, unless instructed otherwise in the citation command.

This is a minimal example, you could indeed add indexing, etc.

\makeatletter
\newcommand{\abbrv}[2][\xdot]{%
    \@ifstar%
        {\addtocategory{abbrv}{#2}\cite{#2}#1}
        {\citetitle{#2}\xspace}}
\makeatother

Now, we define the command that will insert the abbreviation. — The point is: we don't want to use \cite{Cciv}, because it kind of defeats the purpose of abbreviations for the writer.

So, in this case it will be:

\newcommand{\Cciv}{\abbrv{Cciv}}

Then you need to modify your .cbx and .bbx files so they can display your abbreviations and full forms correctly (italics, for instance). There is an example of this in Audrey's answer, cited above, and I won't go over it again. You need to use \DeclareFieldFormat and to create the adequate drivers with \DeclareBibliographyDriver.

You may also need to modify the indexing commands if you are indexing entries. I am only indexing authors, so that problem did not arise in my case, but if you do index titles and you do not want to index abbreviations together with your bibliography, you will have to further redefine the commands.

This might also require you to tweak BibLaTeX's list of shorthands environment a bit, so as to force it to use the style you will have defined for shorthands (I am using "citeshorthand"). You also need to force it to display the abbreviation dot (I haven't so far found a way to do it correctly in BibLaTeX). In my case, all abbreviations and acronyms use dots, so I only needed to specify:

\defbibenvironment{shorthands}
    {\list{\printfield[citeshorthand]{shorthand}\xdot}{%
    \labelwidth\shorthandwidth
    \labelsep\biblabelsep
    \leftmargin\labelwidth
    \advance\leftmargin\labelsep
    \itemsep\bibitemsep
    \parsep\bibparsep
    \def\makelabel##1{##1\hss}}}
    {\endlist}
    {\item}

At the point where the bibliography should be printed, use:

\printbibliography[notcategory=abbrv]

It is not simple, but so far, this is the only solution that has worked for me. It handles dozens of legal abbreviations almost painlessly (that is, once you manage to set it up correctly… and this part isn't exactly painless).

share|improve this answer

Units are not abbreviations: they are symbols which represent a multiplicative factor. It's just like when in LaTeX we say 1.2\linewidth: we don't need to know what number corresponds to \linewidth (which is a number, inside TeX), just to express a multiple of it.

Symbols are to be printed exactly in the same way everywhere they're used. The fact that their shape is obtained by using letters is unimportant. So, "kJ" is not an acronym for "kilo joule" (a strange acronym it would be) but a symbol built according to well defined rules which state, for example, that

kJ = 1000 J

Textual abbreviations are another thing: "e.g." is just a traditional way to write "for instance". The abbreviation "p." can mean either "page" or "pages" according to the context.

Acronyms are something like macros: when I write the acronym UCAS, I have in mind its previously given definition (Ufficio per la Complicazione degli Affari Semplici, in English it would be SMEO, Simple Matter Entanglement Office).

How to distinguish between acronyms and abbreviations? An acronym never has periods; an abbreviations usually has at least one (in British usage it hasn't a period if the abbreviation ends with the final letter of the abbreviated word).

share|improve this answer
    
In the UK, 'UCAS' is the Universities and Colleges Admissions System :-) –  Joseph Wright Dec 11 '11 at 11:39
    
@JosephWright Different languages. :) UCAS is the busiest part of any public administration. In Italy, but perhaps you've got an analog. –  egreg Dec 11 '11 at 11:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.