In Biblatex: Automatic Vgl. & automatic quote indenting (depending on quote length) lockstep creates a quotation command based on previous contribitions by lockstep and Martin Scharrer that
Whenever it exceeds a certain number of lines in the output (preferably 3), it will be typeset indented.
The citation will automatically be typeset without "Vgl." -- regardless of whether it is the short or the long form.
When the output is a paraphrase or summary (in other words: when the output is no citation) it is typeset with the prenote "Vgl".
It works in biblatex.
The main purpose is to automize both the vgl. (engl. compare) and the line indention.
The question:
- Is it possible to change the 3 lines exceeding version to single spacing (while using
\usepackage{setspace}and\onehalfspacing)? - Is it possible to produce slightly smaller text than in the "proper" text in the 3 line exceeding version?
- Used in a
footnote{}, is it possible to adjust its size to the footnote text when it exceeds 3 lines? - And is anyone able to do it?
The code:
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[style=authoryear,autocite=footnote]{biblatex} % Here, Philip added "autocite=footnote"
\NewBibliographyString{compare}
\DefineBibliographyStrings{ngerman}{%
compare = {vgl\adddot},
}
\newbool{withintextquote}
\renewbibmacro*{multiprenote}{%
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}
{}
{\printfield{prenote}%
\setunit{\prenotedelim}}}%
\iffieldundef{multiprenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{multiprenote}%
\setunit{\prenotedelim}}}
\renewbibmacro*{prenote}{%
\iffieldundef{prenote}{%
\ifbool{withintextquote}{%
}{%
\bibstring{compare}\addspace
}%
}
{\printfield{prenote}%
\setunit{\prenotedelim}}}
\makeatletter
\newcommand{\cquotation}[1]{%
\begingroup
\booltrue{withintextquote}%
% \settowidth doesn't like paragraphs
\setbox\@tempboxa\hbox{%
\def\par{\hspace{3\linewidth}}% If a paragraph is included force long form
%\let\par\space % Ignore paragraphs
\let\footnote\@empty% make sure autocite does not do anything here; this is new
\let\autocite\@empty
#1}%
\ifdim\wd\@tempboxa>3\linewidth
\begin{quote}
\itshape
#1
\end{quote}
\else
{\itshape #1}%
\fi
\endgroup}
\makeatother
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
This is a paraphrase \autocites{A01}{A01} % Added by Philip
This is a paraphrase \autocites{A01}{A01} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{A01}}
\cquotation{This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation.\autocite{A01}}
This is a paraphrase \autocite{A01}
This is a paraphrase with prenote \autocite[siehe hierzu auch][]{A01}
This is a paraphrase \autocite{A01}
This is a paraphrase \autocite{A01}
This is a paraphrase \autocites{A01}{A01} % Added by Philip
This is a paraphrase \autocites{A01}{A01} % Added by Philip
\cquotation{This is a short direct quotation. \autocite{A01}}
This is a paraphrase \autocite{A01}
\footnote{This is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is a \cquotation{This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation. This is a long direct quotation. This is a long direct
quotation.\autocite{A01}} This is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is aThis is a }
\printbibliography
\end{document}
Note: The vgl. code used here is slightly refined by moewe based on the version of lockstep. It avoids strange numbering and a undesired output of the prenote vgl. in autocite=footnote setting in biblatex (the link Biblatex: Problems with vgl. and numbering in dynamic quotation command). In addition, you find a \newbibmacro*{simp:prenote}{... by moewe to avoid confusion with another command (see Biblatex: Combining Dynamic Compare Command with a '\citetitle' Command). And, I added the \usepackage{setspace} and \onehalfspacing.
\iffootnotefor that? – Paul Stanley Mar 12 '14 at 22:04