BibTeX, biblatex and biberNatbib incompatible with Book documentclass??

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Re: Natbib incompatible with Book documentclass??

Post by Tissie »

Ok, I will uninstall 2.7 and install 2.8 and return to you after that.

Recommended reading 2024:

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

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

Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Natbib incompatible with Book documentclass??

Post by Tissie »

Ok, 2.8 installed and all packages updated.

So, when I try, as you suggested, to compile the original without the grthesis package it fail to work completely.

I then added fancyhdr package, and then it complained about line 91

Code: Select all

\normalpagestyle
I deleted this line, and it worked. However, now with altered chapter title size, and it is not centered. No header underlining etc.

If possible I would like it to look exactly as it does with the grthesis. Of course, I dont care if we make it look the same way without actually using grthesis - and with working references ;-) hehe.

Any further suggestions?


EDIT::

I have just uploaded a pdf showing you the result of the omitting of grthesis, adding fancyhdr, and removing line 91. It is almost as the grthesis, can we modify the chapter title to be as in grthesis? and add a line under the header?
Attachments
Main.pdf
(29.63 KiB) Downloaded 436 times
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: Natbib incompatible with Book documentclass??

Post by gmedina »

I'll do the necessary changes; right now I'm busy, but as soon as I can I'll post the result.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Re: Natbib incompatible with Book documentclass??

Post by Tissie »

Once again thank you for the kind help. I am looking forward to see if a modified grthesis.sty can solve the problems.

Thx, no rush. It does not have to be tonight.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Natbib incompatible with Book documentclass??

Post by gmedina »

Here's the modified file:

Code: Select all

\ProvidesPackage{mygrthesis}

%% Redefine the sizes in the chapter head
%
% -- Originally  ``\huge\bf'' (\chaptername plus number) and ``\Huge\bf''
%    (title). A little bit too large. Title not bold?
%    Note: * in 12pt style, Huge=huge.
%          * \section has \Large, which is still smaller than \LARGE.
% -- Center chapter headings: `\centering' instead of `\raggedright'
%
%%
\def\@makechapterhead#1{ \vspace*{50pt} { \parindent 0pt \centering
 \ifnum \c@secnumdepth >\m@ne \LARGE\bf \@chapapp{} \thechapter \par
 \vskip 20pt \fi \LARGE\bf #1\par
 \nobreak \vskip 40pt } }
\def\@makeschapterhead#1{ \vspace*{50pt} { \parindent 0pt \centering
 \LARGE\bf #1\par
 \nobreak \vskip 40pt } }

%% Make fancy headings with `fancyhdr.sty'
%
%  -- No capitals in headings. Text still slanted
%  -- New commands for pagestyle-switching
%
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter. \ #1}{}}
\renewcommand{\sectionmark}[1]{\markright{\thesection. \ #1}}
\renewcommand{\thefootnote}{}
\addtolength{\headheight}{3pt}              % Otherwise titles won't fit
\renewcommand{\headrulewidth}{0.3pt}           % Default 0.4pt is too thick
\newcommand{\emptypagestyle}{\fancyhf{}}
\newcommand{\normalpagestyle}%
 {\fancyhf{}%
  \fancyhead[LE,RO]{\rmfamily\slshape\rightmark}%
  \fancyhead[LO,RE]{\rmfamily\thepage}}
% Old definition of toc-command in `book.sty', now the \uppercase removed
%  (something goes wrong in the heading of the toc).
\def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn
 \fi\chapter*{\contentsname
  \@mkboth{{\contentsname}}{{\contentsname}}}
 \@starttoc{toc}\if@restonecol\twocolumn\fi}
\def\l@part#1#2{\addpenalty{-\@highpenalty}
 \addvspace{2.25em plus 1pt} \begingroup
 \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip
-\@pnumwidth
 {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par
 \nobreak \global\@nobreaktrue \everypar{\global\@nobreakfalse\everypar{}}
\endgroup}
\def\l@chapter#1#2{\addpenalty{-\@highpenalty}
 \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup
 \parindent \z@ \rightskip \@pnumwidth
 \parfillskip -\@pnumwidth
 \bf \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil
\nobreak\hbox to\@pnumwidth{\hss #2}\par
 \penalty\@highpenalty \endgroup}


%%    ****************************************
%     *               FLOATS                 *
%     ****************************************
% Where floats may appear on a page, and how many may appear there
% are specified by the following float placement parameters.  The
% numbers are named like counters so the user can set them with
% the ordinary counter-setting commands.
%
%  \c@topnumber            : Number of floats allowed at the top of a column.
%  \topfraction            : Fraction of column that can be devoted to floats.
%  \c@dbltopnumber, \dbltopfraction : Same as above, but for double-column
%                          floats.
%  \c@bottomnumber, \bottomfraction : Same as above for bottom of page.
%  \c@totalnumber          : Number of floats allowed in a single column,
%                          including in-text floats.
%  \textfraction         : Minimum fraction of column that must contain text.
%  \floatpagefraction    : Minimum fraction of page that must be taken
%                          up by float page.
%  \dblfloatpagefraction : Same as above, for double-column floats.
%
%  < NOTE: the above explanation is copied from ``latex.tex'' >
%  The parameters are changed according to my personal flavour;
%  default values for ``book.sty'' behind % in between []
%  Comment tries to justify the new parameter settings
%
\setcounter{topnumber}{1}       % [1]  Was 2
\def\topfraction{1.0}           % [.7]  Prevent floats to float
\setcounter{bottomnumber}{1}    % [1]
\def\bottomfraction{.5}         % [.3]   was .3
\setcounter{totalnumber}{3}     % [3]
\def\textfraction{.1}           % [.2]  Minimum of text is OK %was .2
\def\floatpagefraction{.8}      % [.5]  A float should FILL the float page
\setcounter{dbltopnumber}{1}    % [1]  Was 2
\def\dbltopfraction{1.0}        % [.7]
\def\dblfloatpagefraction{.8}   % [.5]
%\setlength{\textfloatsep}{10pt plus 2 pt minus 4pt}  %Goosesens book p. 142 and p. 449
%\setlength{\intextsep}{10pt plus 2 pt minus 4pt}     %Goosesens book p. 142 and p. 449
Save the above file as mygrthesis.sty in the same folder that contains Main.tex. In this latter file, replace

Code: Select all

\usepackage{grthesis}
with

Code: Select all

\usepackage{mygrthesis}
You can use \normapagestyle in your .tex file as before.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Natbib incompatible with Book documentclass??

Post by Tissie »

Cool! Thank you so much. It works :)

I really appreciate the help, it is too kind :-)

If you have the time at some point, could I ask you to help out with the following headings-related issue?

Before modifications were done on the grthesis.sty the header above the line would be:
On equal pages the page number is to the left and to the right it would give the chapter number + the chapter title. On odd pages, the number is to the right, and it depicts the section number and section name to the left.

Now it is only the section name which is given on both equal and odd pages. And the numbering is opposite to what I prefer.

I thought the command,

Code: Select all

\markboth{Chapter {\protect\ref{chap:theory}}. Basic concepts}{ }
, in theory.tex would do this.

But apparently not.. hehe.

Or it might also be related to the code in the main.txt:

Code: Select all

\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\lhead[\fancyplain{}{\bf\thepage}]{\fancyplain{}{\bf\rightmark}}
\rhead[\fancyplain{}{\bf\leftmark}]{\fancyplain{}{\bf\thepage}}
\cfoot{}
\lfoot{}
\rfoot{}
Can this problem be solved?

Goodnight from Denmark :)
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Natbib incompatible with Book documentclass??

Post by gmedina »

If you are using the \normalpagestyle command, then change these lines in mygrthesis.sty:

Code: Select all

\newcommand{\normalpagestyle}%
 {\fancyhf{}%
  \fancyhead[LE,RO]{\rmfamily\slshape\rightmark}%
  \fancyhead[LO,RE]{\rmfamily\thepage}}
to

Code: Select all

\newcommand{\normalpagestyle}%
 {\fancyhf{}%
  \fancyhead[RE]{\rmfamily\slshape\leftmark}%
  \fancyhead[LO]{\rmfamily\slshape\rightmark}%
  \fancyhead[LE,RO]{\rmfamily\thepage}}
Tissie wrote:Cool! Thank you so much. It works :)

I really appreciate the help, it is too kind :-)...

Goodnight from Denmark :)
You are welcome. Goodnight from Colombia.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Tissie
Posts: 32
Joined: Wed Feb 18, 2009 9:40 pm

Re: Natbib incompatible with Book documentclass??

Post by Tissie »

Thank you - now I have a nice functional template to work with :-)

All the best,
Tissie
Post Reply