BibTeX, biblatex and biberChange font size of inline author-year citations

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
karthikeyak
Posts: 2
Joined: Tue Aug 26, 2014 9:29 am

Change font size of inline author-year citations

Post by karthikeyak »

I am using both \citep{bibkey} and \citet{bibkey} references, and I would like them to be 2 font sizes smaller than normal text. By selecting each reference and setting font size, this code is obtained:

Code: Select all

{\footnotesize \citep{bibkey}}
Can this be done for all references automatically in lyx?
If not, can someone help me with regexps for sed to change

Code: Select all

\citep{bibkey}
to

Code: Select all

{\footnotesize \citep{bibkey}}
where the p in \citep and bibkey are variable?
Thank you.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Change font size of inline author-year citations

Post by kaiserkarl13 »

Could you try redefining the citep/citet macros like below?

Code: Select all

\documentclass{article}
\usepackage[numbers]{natbib}
\begin{document}
This is the old:  \citep{Test} (vs Testing, 2014).
\let\realcitep\citep
\renewcommand*{\citep}[1]{{\footnotesize\realcitep{#1}}}
This is the new:  \citep{Test} (vs Testing, 2014).
\begin{thebibliography}{1}
  \bibitem{Test}
I. M. A. Test, J. Testing (2001) 1--1029.
\end{thebibliography}
\end{document}
karthikeyak
Posts: 2
Joined: Tue Aug 26, 2014 9:29 am

Re: Change font size of inline author-year citations

Post by karthikeyak »

That works splendidly.

Thank you. :-D
Post Reply