You can define (La)TeX commands in the bib
file via @preamble
and the execute
field. The latter is intended for definitions on a per-entry basis.
New bibliography strings should be initialized elsewhere, in one of:
- User configuration file (
biblatex.cfg
)
- Document preamble (
tex
file)
- All relevant localization modules (
lbx
files)
- Style files (
bbx
or cbx
)
For your case Ulrike's suggestion (the configuration file) seems most appropriate.
Reprints are now best handled with the "related entries" feature in the soon-to-be-released development versions of biblatex
and biber
. Here's an example (using only the tex
file, for simplicity).
\documentclass{article}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[backend=biber]{biblatex}
\usepackage{hyperref}
\NewBibliographyString{reprintin}
\DefineBibliographyStrings{english}{reprintin = {Reprint in}}
\DefineBibliographyStrings{german}{reprintin = {Nachdruck in}}
\renewcommand*{\relatedpunct}{\intitlepunct}
\begin{filecontents}{\jobname.bib}
@article{orwell,
title = {Reflections on Gandhi},
author = {Orwell, George},
year = {1949},
journal = {Partisan Review},
number = {6},
pages = {85--92},
related = {gariepy},
relatedtype = {reprintin}}
@book{gariepy,
title = {Twentieth-Century Literary Criticism},
editor = {Gariepy, Jennifer},
volume = {59},
year = {1995},
publisher = {Gale}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\cite{orwell}
\printbibliography
\end{document}
Related entry information is formatted by the bibliography macro related:default
defined in biblatex.def
. This format can be overridden by defining a bibliography macro related:<relatedtype>
that takes the related entry key as a single argument. The following will emulate the formatting you currently do in the addendum
field.
\newbibmacro*{related:reprintin}[1]{%
\entrydata{#1}{%
\printnames{labelname}%
\setunit{\labelnamepunct}%
\printfield[citetitle]{title}%
\setunit{\addcomma\space}%
\printfield{year}}}
Rather than mess with the interpretation of {
it is probably better to define a command that takes a comma separated list of arguments and encloses each in braces. Some variants below depending on whether you want a brace around the outer list, and whether you want a comma separator. (Beware the space after #1
is needed otherwise the case with as single argument brace group {a,b,c}
does not work as TeX drops the brace.
\documentclass{article}
\makeatletter
\def\sets#1{\@for\tmp:=#1 \do{\{\tmp\}}}
\def\setsb#1{\{\@for\tmp:=#1 \do{\{\tmp\}}\}}
\def\setsc#1{\def\sep{\def\sep{,}}\@for\tmp:=#1 \do{\sep\{\tmp\}}}
\def\setsd#1{\{\def\sep{\def\sep{,}}\@for\tmp:=#1 \do{\sep\{\tmp\}}\}}
\makeatother
\begin{document}
$\sets{a,b,c}$ $\sets{a,{b,c}}$ $\sets{{a,b,c}}$
$\setsb{a,b,c}$ $\setsb{a,{b,c}}$ $\setsb{{a,b,c}}$
$\setsc{a,b,c}$ $\setsc{a,{b,c}}$ $\setsc{{a,b,c}}$
$\setsd{a,b,c}$ $\setsd{a,{b,c}}$ $\setsd{{a,b,c}}$
\end{document}
Best Answer
At its simplest, one can introduce
\skiplines{}
to add blank multiples of\baselineskip
.As David noted in comments, however, except in unusual circumstances, one should not be routinely adding blank space manually. If there is a recurring need, the appropriate amount of space should be added as part of the document format definition (in the preamble, or in the document class itself), rather than in the document text.
Here, in the following MWE, four lines of
\vspace
are embedded in each\question
and may have the number of blank lines varied as the optional argument to\question
.