Document Classesproblem with natbib

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
adhikarig
Posts: 12
Joined: Mon Apr 28, 2008 12:34 am

problem with natbib

Post by adhikarig »

Hi everyone

I am using natbib package for bibliography. Could anyone please tell me how to change the font size and position of bibliography title from the default. I am using book class as default one.

I set default chapter title as 14pt garamond font, ragged right.

but in bibliography it shows 18pt normal font.

Is there any option to modify this...

many thanks

gopal

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

problem with natbib

Post by Stefan Kottwitz »

Hi gopal,

see natbib documentation 2.12 Other Formatting Options. There it's described how you can change the heading (\bibsection). If you still have questions just tell us.

Stefan
LaTeX.org admin
adhikarig
Posts: 12
Joined: Mon Apr 28, 2008 12:34 am

Re: problem with natbib

Post by adhikarig »

Hi Stefan

Thanks for your kind reply. I already tried that option with titlesec package as follows

\renewcommand{\bibsection}{%
\titleformat{\chapter} {\normalfont\large\filcenter\bfseries}{}{}{}
\titlespacing*{\chapter} {0pt}{60pt}{18pt}
\chapter*{ \bibname \markboth{\bibname}{\bibname}%
\addcontentsline{toc}{chapter}{\bibname}} }

But it does not work. Is there any other way to modify this....

I have another problem with package titlesec. When i use long section title, it becomes hyphenated. How could I avoid those hyphens in my title...

Thanks

gopal
User avatar
Stefan Kottwitz
Site Admin
Posts: 10308
Joined: Mon Mar 10, 2008 9:44 pm

problem with natbib

Post by Stefan Kottwitz »

Hi gopal,

that should work. When I tried your code and even wrote \tiny instead of \large then the bibliography heading becomes very small. One short working example:

Code: Select all

Code, edit and compile here:
\documentclass[a4paper,10pt]{book}
\usepackage[T1]{fontenc}
\usepackage[urw-garamond]{mathdesign}
\usepackage{natbib}
\usepackage{titlesec}
\renewcommand{\bibsection}{%
\titleformat{\chapter} {\normalfont\tiny\filcenter\bfseries}{}{}{}
\titlespacing*{\chapter} {0pt}{60pt}{18pt}
\chapter*{ \bibname \markboth{\bibname}{\bibname}%
\addcontentsline{toc}{chapter}{\bibname}} }
\begin{document}
\begin{thebibliography}{99}
\bibitem{test} test
\end{thebibliography}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
If it's not working for you then post here a compilable minimal working example that shows the unwanted behaviour. We could compile, test and perhaps correct it.

Stefan
LaTeX.org admin
adhikarig
Posts: 12
Joined: Mon Apr 28, 2008 12:34 am

Re: problem with natbib

Post by adhikarig »

Hi Stefan

I also tried that option. But it did not work. so I attached my class file here with.

Thanks for your help.

Gopal
Attachments
rosePhDthesis.cls
(16.54 KiB) Downloaded 410 times
alexbowers
Posts: 1
Joined: Wed Sep 10, 2008 4:49 pm

Re: problem with natbib

Post by alexbowers »

Have you tried using \newcommand{\bibfont}{\tiny}?

There is quite a good guide to natbib here: http://www.mps.mpg.de/software/latex/lo ... natbib.pdf
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

problem with natbib

Post by localghost »

alexbowers wrote:[...] There is quite a good guide to natbib here: http://www.mps.mpg.de/software/latex/lo ... natbib.pdf
This is the official user guide of natbib which can also be found on CTAN.


Best regards
Thorsten¹
Post Reply