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.

How can I make \parencite produce an uppercase output, but normal case for \textcite?

Result:

\parencite{CARNAP1934} -> (CARNAP, 1934)

\textcite{CARNAP1934} -> Carnap (1934)

MWE:

\documentclass[12pt,a4paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}


\usepackage[citestyle=authoryear,bibstyle=authortitle,labelnumber,natbib=true,firstinits=true,isbn=false,babel=other,language=brazilian,backend=biber]{biblatex}


\addbibresource{test.bib}
\begin{document}


\section{Intro}

\textcite{CARNAP1937}

\section{Conclusion}

\parencite{CARNAP1935}

\parencite{SCHICKORE2006}

\printbibliography

\end{document}

The .bib:

@book{CARNAP1935,
Address = {London},
Author = {Carnap, Rudolf},
Publisher = {Kegan Paul, Trench, Trubner \& Co.},
Title = {Philosophy and Logical Syntax},
Year = {1935}}

@book{CARNAP1937,
Address = {London},
Author = {Carnap, Rudolf},
Note = {Transl. Amethe Smeaton (Countess von Zeppelin)},
Publisher = {Kegan Paul},
Title = {The Logical Syntax of Language},
Year = 1937}

@book{SCHICKORE2006,
Address = {Dordrecht},
Author = {Schickore, J. and Steinle, F.},
Publisher = {Kluwer Academic Pub},
Title = {Revisiting discovery and justification: historical and philosophical perspectives on the context distinction},
Volume = {14},
Year = {2006}}
share|improve this question
    
Welcome to TeX.sx! –  Peter Jansson Mar 9 '13 at 15:20
    
@PeterJansson The capitalization tag would have been appropriate. –  lockstep Mar 9 '13 at 15:22

1 Answer 1

up vote 4 down vote accepted

I think the only way is the redefinition of the cite command. In the example below I defined a new macro named uppercite which formats the name via the redefinition of \mkbibnamelast:

\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
  \usebibmacro{uppercite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\newbibmacro*{uppercite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\addspace}}
       {\def\mkbibnamelast##1{\MakeUppercase{##1}}\printnames{labelname}%
        \setunit{\nameyeardelim}}%
     \usebibmacro{cite:labelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}

The complete MWE is:

\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@book{CARNAP1935,
Address = {London},
Author = {Carnap, Rudolf},
Publisher = {Kegan Paul, Trench, Trubner \& Co.},
Title = {Philosophy and Logical Syntax},
Year = {1935}}

@book{CARNAP1937,
Address = {London},
Author = {Carnap, Rudolf},
Note = {Transl. Amethe Smeaton (Countess von Zeppelin)},
Publisher = {Kegan Paul},
Title = {The Logical Syntax of Language},
Year = 1937}

@book{SCHICKORE2006,
Address = {Dordrecht},
Author = {SCHICKORE, J. and STEINLE, F.},
Date-Added = {2012-07-19 08:53:43 +0000},
Date-Modified = {2013-03-09 19:03:37 +0000},
Publisher = {Kluwer Academic Pub},
Title = {Revisiting discovery and justification: historical and philosophical perspectives on the context distinction},
Volume = {14},
Year = {2006}}
\end{filecontents*}
\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[citestyle=authoryear,bibstyle=authortitle,labelnumber,natbib=true,firstinits=true,isbn=false,babel=other,language=brazilian,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}
\DeclareCiteCommand{\parencite}[\mkbibparens]
  {\usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
  \usebibmacro{uppercite}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\newbibmacro*{uppercite}{%
  \iffieldundef{shorthand}
    {\ifthenelse{\ifnameundef{labelname}\OR\iffieldundef{labelyear}}
       {\usebibmacro{cite:label}%
        \setunit{\addspace}}
       {\def\mkbibnamelast##1{\MakeUppercase{##1}}\printnames{labelname}%
        \setunit{\nameyeardelim}}%
     \usebibmacro{cite:labelyear+extrayear}}
    {\usebibmacro{cite:shorthand}}}

\begin{document}
\verb+\textcite{CARNAP1937}+\quad\textcite{CARNAP1937}


\verb+\parencite{CARNAP1935}+\quad\parencite{CARNAP1935}

\verb+\parencite{SCHICKORE2006}+\quad\parencite{SCHICKORE2006}

\verb+\parencite{CARNAP1935}\parencite{SCHICKORE2006}+\parencite{CARNAP1935}\parencite{SCHICKORE2006}

\verb+\parencite{CARNAP1935,SCHICKORE2006}+\parencite{CARNAP1935,SCHICKORE2006}

\printbibliography
\end{document}

enter image description here

share|improve this answer
    
This solved my problem, but create another: the citations with multiple names remain displayed as: (SCHICKORESTEINLE, 2006) and not (SCHICKORE; STEINLE, 2006) as expected. –  Gilson Olegario Mar 9 '13 at 19:57
    
I will edit the question to include the problem. –  Gilson Olegario Mar 9 '13 at 20:09
    
Result expected: (SCHICKORE; STEINLE, 2006). Not (SCHICKORESTEINLE, 2006). –  Gilson Olegario Mar 9 '13 at 20:42
    
@GilsonOlegario: Fixed it. –  Marco Daniel Mar 9 '13 at 21:03

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.