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'm currently trying to setup a document with the bibliography made with biblatex. I have used the template/example from this website khirevich.

Everything seems to be going fine, but in his template you either cite a reference with 1, [2] and so on, or with a superscript number, and then the reference as a footnote. I would like to have an inline reference, like: (Number, Author, year) or something like that. But not just the number, and not as a footnote.

My example code is currently this right now:

%%%%%%%%%%%%%%%
%   \cite (citation number of normal size in square brackets, no cite info in footnote);
%   \superfullcite (superscript citation number, full cite info in footnote);
%   \sjcitep (superscript citation number, short cite info in footnote).
%%%%%%%%%%%%%%%

\documentclass[a4paper,12pt]{article}

\usepackage[danish]{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin=1.4in]{geometry}
\usepackage{amsmath, amsthm, amssymb, amsbsy}
\usepackage{lmodern}
\usepackage[T1]{fontenc}

\usepackage[hyperref=true,
            url=false,
            isbn=false,
            backref=true,
            style=custom-numeric-comp,
            maxcitenames=3,
            maxbibnames=100,
            backend=bibtex, % while checking on one of my (newest) systems, this option was needed to generate bibliography
            block=none]{biblatex}

\usepackage{hyperref}

% back reference text preceding the page number ("see p.")
\DefineBibliographyStrings{english}{%
    backrefpage  = {se s.}, % for single page number
    backrefpages = {se ss.} % for multiple page numbers
}

% the followings activate 'custom-english-ordinal-sscript.lbx'
% in order to print ordinal 'edition' suffixes as superscripts,
% and adjusts (reduces) spacing between suffix and following "ed."
\DeclareLanguageMapping{english}{custom-english-ordinal-sscript}
\DeclareFieldFormat{edition}%
                   {\ifinteger{#1}%
                    {\mkbibordedition{#1}\addthinspace{}ed.}%
                    {#1\isdot}}

% removes period at the very end of bibliographic record
\renewcommand{\finentrypunct}{}

% removes period after DOI and suppresses capitalization
% of the word following DOI ("See p. xx" -> "see p. xx")
\renewcommand{\newunitpunct}{\addspace\midsentence}

\DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title with comma
\DeclareFieldFormat[inbook,thesis]{title}{\mkbibemph{#1}\addperiod} % italic title with period
\DeclareFieldFormat[article]{title}{#1} % title of journal article is printed as normal text
\DeclareFieldFormat[article]{volume}{\textbf{#1}\addcolon\space} % makes volume of journal bold and adds colon

%%%%%%%%%
% the command \sjcitep defined below prints footnote citation above punctuation
\newlength{\spc} % declare a variable to save spacing value
\newcommand{\sjcitep}[2][]{% new command with two arguments: optional (#1) and mandatory (#2)
        \settowidth{\spc}{#1}% set value of \spc variable to the width of #1 argument
        \addtolength{\spc}{-1.8\spc}% subtract from \spc about two (1.8) of its values making its magnitude negative
        #1% print the optional argument
        \hspace*{\spc}% print an additional negative spacing stored in \spc after #1
        \supershortnotecite{#2}}% print (cite) the mandatory argument
%%%%%%%%%

\bibliography{example_ref_list}  % includes file "example_ref_list.bib" with data on the cited references

\title{Title}
\author{Name}


\begin{document}
\maketitle

\section*{Aronova}
Text text


% prints author names as small caps
\renewcommand{\mkbibnamefirst}[1]{\textsc{#1}}
\renewcommand{\mkbibnamelast}[1]{\textsc{#1}}
\renewcommand{\mkbibnameprefix}[1]{\textsc{#1}}
\renewcommand{\mkbibnameaffix}[1]{\textsc{#1}}

\printbibliography

\end{document} 

Sorry for all the comments, but I'm still trying to figure out using this :) So does anyone know what I have to to in order to get inline cites, and not just numbers or footnote references.

Thanks in advance.

share|improve this question
1  
Maybe I'm missing something but why don't you use one of biblatexs standard authoryear styles? Instead custom-numeric-comp simply use authoryear (or one of its varieties). –  Simifilm Sep 25 '13 at 13:22
2  
Just a sidenote: you are going to run into issues if you use backend=bibtex. I would look into getting biber up and running as a matter of priority, then the rest of BibLaTeX should work exactly as advertised. –  Sean Allred Sep 25 '13 at 14:04
    
Simifilm is exactly right: It does not make much sense to declare a numeric bib/cite style and then use inline (Number, Author, Year) it seems redundant. Either use numeric and if necessary (for example for emphasis on the author) add the author (can be done via numeric's or \citeauthor etc.) or use a "proper" author year style (authoryear springs to mind). –  moewe Sep 25 '13 at 18:22

1 Answer 1

up vote 5 down vote accepted

Even in a numeric style it might sometimes be helpful to be able to refer to a source by (#, Author, year) not just [#]. The following defines a new cite command to deliver exactly this additional information. This command is as of now neither capable of compressing (authors, numbers) nor ibidem functions.

You can add the following code to your preamble.

\DeclareCiteCommand{\morecite}[\mkbibparens]%
  {\usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{%
     \printfield{prefixnumber}%
     \printfield{labelnumber}%
     \ifbool{bbx:subentry}
       {\printfield{entrysetcount}}
       {}}%
   \ifnameundef{labelname}%
    {}
    {\setunit{\addcomma\space}%
     \printnames{labelname}}%
   \setunit{\addcomma\space}%
   \printfield{labelyear}}
  {\multicitedelim}%
  {\usebibmacro{postnote}}%

This will declare a new cite command called \morecite that displays the label number, author and year. There is no fancy year disambiguation etc. (if you want those authoryear or friends is for you), since the label number is the ultimate way to identify the sources.

\documentclass[a4paper,american]{article}

\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{csquotes}
\usepackage[style=custom-numeric-comp,backend=biber]{biblatex}
\usepackage{hyperref}

\ExecuteBibliographyOptions{labelyear}

\DeclareCiteCommand{\morecite}[\mkbibparens]%
  {\usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
   \printtext[bibhyperref]{%
     \printfield{prefixnumber}%
     \printfield{labelnumber}%
     \ifbool{bbx:subentry}
       {\printfield{entrysetcount}}
       {}}%
   \ifnameundef{labelname}%
    {}
    {\setunit{\addcomma\space}%
     \printnames{labelname}}%
   \setunit{\addcomma\space}%
   \printfield{labelyear}}
  {\multicitedelim}%
  {\usebibmacro{postnote}}%

\addbibresource{biblatex-examples.bib}  % includes file "example_ref_list.bib" with data on the cited references

\begin{document}
\morecite{westfahl:space} and \morecite{westfahl:frontier}

\printbibliography
\end{document} 

yields

enter image description here

share|improve this answer

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.