LaTeX forum ⇒ BibTeX, biblatex and biberChange font size of inline author-year citations Topic is solved

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

Change font size of inline author-year citations

Postby karthikeyak » Tue Aug 26, 2014 11:17 am

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:

  1. {\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
  1. \citep{bibkey}

to
  1. {\footnotesize \citep{bibkey}}


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

Tags:

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

Postby kaiserkarl13 » Fri Aug 29, 2014 5:07 pm

Could you try redefining the citep/citet macros like below?
  1. \documentclass{article}
  2. \usepackage[numbers]{natbib}
  3. \begin{document}
  4. This is the old: \citep{Test} (vs Testing, 2014).
  5. \let\realcitep\citep
  6. \renewcommand*{\citep}[1]{{\footnotesize\realcitep{#1}}}
  7. This is the new: \citep{Test} (vs Testing, 2014).
  8. \begin{thebibliography}{1}
  9. \bibitem{Test}
  10. I. M. A. Test, J. Testing (2001) 1--1029.
  11. \end{thebibliography}
  12. \end{document}

karthikeyak
Posts: 2
Joined: Tue Aug 26, 2014 9:29 am

Postby karthikeyak » Sat Aug 30, 2014 10:31 am

That works splendidly.

Thank you. :-D


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 2 guests