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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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