2

I was wondering if it is possible to change the size of the caption generated by the thebibliography environment. Changing the actual text size can be accomplished by putting thebibliography environment between \begin{small} \end{small} (or whatever textsize is needed), but that doesn't seem to affect the caption.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage[german,german]{babel}
\addto\captionsgerman{\renewcommand{\refname}{Referenzen}}
\renewcommand{\refname}{Referenzen}

\usepackage[justification=justified,singlelinecheck=false]{caption}
\renewcommand{\arraystretch}{1.5}
\usepackage{ulem}
\usepackage[labelfont=bf,textfont=footnotesize]{caption}

\begin{document}

\begin{footnotesize}

\begin{thebibliography}{5}
    \bibitem{Hon89} Honig, M. G. and Hume, R. I. {\em Dil and diO: versatile fluorescent dyes for neuronal labelling and pathway tracing} Trends in Neuroscience 12, Nr.9 (1989):333-5,340-1.
    \bibitem{WoAmPh} {\em Nervous system, neuronal support cells}. \url{http://wormatlas.org/hermaphrodite/neuronalsupport/jump.html?newLink=mainframe.htm&newAnchor=Phasmidsensilla36}. Access: 31.12.17, 11:59.
\end{thebibliography}

\end{footnotesize}

\end{document}

With \addto\captionsgerman{\renewcommand{\refname}{Referenzen}} and \renewcommand{\refname}{Referenzen}, I was able to change the caption text, but I'm not sure how to change the fontsize. Thanks in advance!

  • Welcome to TeX - LaTeX! It is not a "caption" but a "heading" and is just set as an ordinary \section*. See the answer tex.stackexchange.com/a/69239/15925 to tex.stackexchange.com/q/69224/15925 for a way to change this. Putting font changing commands in \refname is not recommended as it affects subsequent headers. – Andrew Swann Dec 31 '17 at 13:09
  • Thank you! And thanks for pointing out the misnaming, I'm yet to get used to the terms. I will try to use the other tips to edit the bibliography heading. – S. Frank Dec 31 '17 at 13:21
0

I guess that your aim is to have the bibliography section in smaller type. Adding footnotesize and changing manually the size for the title is not the solution.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{caption}
\usepackage{url}
\usepackage{etoolbox}

\captionsetup{
  justification=justified,
  singlelinecheck=false,
  labelfont=bf,
  textfont=footnotesize,
}
\addto\captionsngerman{\renewcommand{\refname}{Referenzen}}
\apptocmd{\thebibliography}{\footnotesize}{}{} % bibliography in footnote size
\patchcmd{\thebibliography}{\refname}{\normalsize\refname}{}{}

%\renewcommand{\arraystretch}{1.5}% <--- ???

\begin{document}

\section*{A section}

Some text to see what happens with the bibliography.

\begin{thebibliography}{5}

\bibitem{Hon89}
Honig, M. G. and Hume, R. I. \emph{Dil and diO: versatile fluorescent 
  dyes for neuronal labelling and pathway tracing}.
  Trends in Neuroscience 12, Nr.9 (1989):333-5,340-1.

\bibitem{WoAmPh}
\emph{Nervous system, neuronal support cells}. 
\url{http://wormatlas.org/hermaphrodite/neuronalsupport/jump.html?newLink=mainframe.htm&newAnchor=Phasmidsensilla36}. Access: 31.12.17, 11:59.

\end{thebibliography}

\end{document}

Some notes.

  1. I removed the underlining: it's a don't-do-it in good typography
  2. Bibliography items should be followed by a blank line
  3. Loading caption twice is not the best way to specify multiple options
  4. I used ngerman (Neue Rechtschreibung) instead of german
  5. I commented out the setting to \arraystretch, not understanding what it's supposed to do

enter image description here

With a further patch one can remove the vertical space between bibliography items.

\documentclass[12pt]{article}
\usepackage[T1]{fontenc} 
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{caption}
\usepackage{url}
\usepackage{etoolbox}

\captionsetup{
  justification=justified,
  singlelinecheck=false,
  labelfont=bf,
  textfont=footnotesize,
}
\addto\captionsngerman{\renewcommand{\refname}{Referenzen}}
\apptocmd{\thebibliography}{\footnotesize}{}{} % bibliography in footnote size
\patchcmd{\thebibliography}{\refname}{\normalsize\refname}{}{}
\patchcmd{\thebibliography}
  {\leftmargin}
  {\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}\leftmargin}
  {}{}

%\renewcommand{\arraystretch}{1.5}% <--- ???

\begin{document}

\section*{A section}

Some text to see what happens with the bibliography.

\begin{thebibliography}{5}

\bibitem{Hon89}
Honig, M. G. and Hume, R. I. \emph{Dil and diO: versatile fluorescent 
  dyes for neuronal labelling and pathway tracing}.
  Trends in Neuroscience 12, Nr.9 (1989):333-5,340-1.

\bibitem{WoAmPh}
\emph{Nervous system, neuronal support cells}. 
\url{http://wormatlas.org/hermaphrodite/neuronalsupport/jump.html?newLink=mainframe.htm&newAnchor=Phasmidsensilla36}. Access: 31.12.17, 11:59.

\end{thebibliography}

\end{document}

enter image description here

  • Thank you, I deleted the ulem package. The commands work just fine. But I've got a little problem with the space I have to list the references. Is there a way to delet the blank line between the listed items? – S. Frank Dec 31 '17 at 17:02
  • @S.Frank I added a further patch – egreg Dec 31 '17 at 17:22
1

You can do it by adding the desired font size to the macro that redefines \refname like below:

\addto\captionsgerman{\renewcommand{\refname}{\fontsize{40}{46}\selectfont Referenzen}}

enter image description here

  • Thank you very much for your quick response! It worked out fine for me. May I aks what the second number after \fontsize defines? I changed it, but it doesn't seem to change anything in the document. – S. Frank Dec 31 '17 at 13:13
  • Your welcome, see the following tex.stackexchange.com/a/48277/85327. – javadr Dec 31 '17 at 13:22
  • 2
    What if you have too use refname elsewhere in the document? – Bernard Dec 31 '17 at 13:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.