fncychap • headings • parts •
Add tags
Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
by chrarnold on Fri Feb 8th, 2013
Hi all, I am new to this forum and I hope that someone can help me with the following issue. I searched for a similar post, but could not find anything so far. I am writing my thesis, which consists not only of chapters, but also of two parts. I used the fncychap package to make the chapter title pages look nicer, which works wonderfully. Now I also want to make the part style nicer, and here I am struggling. I'd like to have the Rejne style for parts (and NOT for chapters, as defined in the fncychap package, and I already tried the following: - Take the "fncychap.sty" and rename it to something else, replace
\thechapter by \thepart, rename all new command definitions to prevent a re-definition of commands due to the inclusion of both the original "fncychap.sty" file and the modified one. However, this does not work. In fact, it messes up the chapter styles also, and the parts look the same as before. - Using code I found to manually re-define the style of parts
- Code: Select all • Open in writeLaTeX
\titleclass{\part}{top} % make part like a chapter \titleformat{\part} [display] {\centering\normalfont\Large} {\titlerule[3pt]\vspace{3pt}\titlerule[1pt]\vspace{3pt}\MakeUppercase{\partname} \thepart} {0pt} {\titlerule[1pt]\vspace{3pt}\titlerule[3pt]\vspace{4pc}\Large\MakeUppercase} % \titlespacing*{\part}{0pt}{0pt}{20pt}
This imitates the Conny chapter style, however, I am not able to modify this to imitate the Rejne style.
I would be extremely thankful if someone could help me here. Thanks, Christian
-
chrarnold
-
- Posts: 5
- Joined: Fri Feb 8th, 2013
by cgnieder on Fri Feb 8th, 2013
Hi Christian, Welcome to the LaTeX community! Could you make the code snippet into a complete minimal working example, please? It will be easier to see what you have and what you want if we only need to copy and compile the code and are able to immediately can see what things look like. Regards
-

cgnieder
- Site Moderator
-
- Posts: 1305
- Joined: Sat Apr 16th, 2011
- Location: Germany
-
by chrarnold on Mon Feb 11th, 2013
Hi there, no problem, here is a minimal example with a few comments to illustrate the problem: - Code: Select all • Open in writeLaTeX
\documentclass[a4paper,11pt]{book}
\usepackage[Rejne]{fncychap} %Select the Rejne style for chapters \usepackage{titlesec}
\begin{document}
% As the fncychap package re-styles only chapters but not parts, a workaround is to redefine the \part style manually. The following imitates the Conny style, but I do not know how to imitate the Rejne style...
%%%%%%%%%%%%%%%%%% \titleclass{\part}{top} % make part like a chapter \titleformat{\part} [display] {\centering\normalfont\Large} {\titlerule[3pt]\vspace{3pt}\titlerule[1pt]\vspace{3pt}\MakeUppercase{\partname} \thepart} {0pt} {\titlerule[1pt]\vspace{3pt}\titlerule[3pt]\vspace{4pc}\Large\MakeUppercase} \titlespacing*{\part}{0pt}{0pt}{20pt} %%%%%%%%%%%%%%%%%%
\part{Teil 1: Blablabla} %Should be styled like a chapter \newpage
\chapter{Section 1} \newpage
\part{Teil 2: Blablabla} \newpage
\chapter{Section 2} \newpage
\end{document}
I hope this helps! Best Christian
-
chrarnold
-
- Posts: 5
- Joined: Fri Feb 8th, 2013
by chrarnold on Fri Mar 1st, 2013
Hmm, no suggestions from anybody? What a bummer 
-
chrarnold
-
- Posts: 5
- Joined: Fri Feb 8th, 2013
by cgnieder on Fri Mar 1st, 2013
chrarnold wrote:Hmm, no suggestions from anybody? What a bummer 
Please no swearing! Unfortunately it happens that questions get overlooked or forgotten. That is not on purpose. I would not use one package for chapter titles and another one for part titles. Inconsistencies are bound to happen... titlesec can be used for both. Below is an idea that uses the same style for both and tries to emulate the Rejne style... - Code: Select all • Open in writeLaTeX
\documentclass{book} \usepackage{titlesec} \usepackage{xcoffins}
\newcommand\headerdisplay[1]{% \huge \vskip.5\baselineskip \filcenter\MakeUppercase{#1}% \vskip.0\baselineskip } \NewCoffin\mytmpa \NewCoffin\mytmpb \newcommand\placeabove[3][0pt]{% \SetHorizontalCoffin\mytmpa{#2}% \SetHorizontalCoffin\mytmpb{#3}% \JoinCoffins*\mytmpb[hc,t]\mytmpa[hc,b](0pt,#1)% \TypesetCoffin\mytmpb }
\renewcommand\thepart{\arabic{part}} \titleclass{\part}{top} % make part like a chapter \titleformat{\part}[frame] {\normalfont} {\filcenter\placeabove[2\baselineskip]{\Large PART}{\huge\enspace\thepart\enspace}} {0pt} {\headerdisplay} \titlespacing*{\part}{0pt}{0pt}{20pt}
\titleformat{\chapter}[frame] {\normalfont} {\filcenter\placeabove[2\baselineskip]{\Large CHAPTER}{\huge\enspace\thechapter\enspace}} {0pt} {\headerdisplay}
\begin{document}
\part{Foo bar}
\chapter{A long, long chapter title that needs a few lines}
\end{document}
Regards
-

cgnieder
- Site Moderator
-
- Posts: 1305
- Joined: Sat Apr 16th, 2011
- Location: Germany
-
by chrarnold on Fri Mar 1st, 2013
Hi there,
first, thanks very much for the reply. In American English (which I am using), "What a bummer" is not a swear word at all, and I had no intention to swear, why would I? I understand fully that my issue is rather specific and is easily overlooked.
I tried to compile your code, but I have difficulties with the \usepackage{xcoffins} statement. LaTeX Error: File `xcoffins.sty' not found. How exactly do I install this experimental package manually? I downloaded the sources from CTAN, but I cannot run latex or pdflatex on the *dtx and *ins without errors. I get similar errors as the own above when doing this...
Thanks a lot, I appreciate your time! Christian
-
chrarnold
-
- Posts: 5
- Joined: Fri Feb 8th, 2013
by cgnieder on Fri Mar 1st, 2013
chrarnold wrote:first, thanks very much for the reply. In American English (which I am using), "What a bummer" is not a swear word at all, and I had no intention to swear, why would I? I understand fully that my issue is rather specific and is easily overlooked.
Well, maybe »swear« is the wrong wording. I'm no native speaker... to me »bummer« has unfriendly connotations. If I'm wrong then ignore my comment. chrarnold wrote:I tried to compile your code, but I have difficulties with the \usepackage{xcoffins} statement. LaTeX Error: File `xcoffins.sty' not found. How exactly do I install this experimental package manually? I downloaded the sources from CTAN, but I cannot run latex or pdflatex on the *dtx and *ins without errors. I get similar errors as the own above when doing this...
You should best update your TeX distribution then instead of trying to manually install xcoffins. The package relies on quite a number of additional packages. xcoffins is part of both TeX Live 2012 and MiKTeX 2.9. Regards
-

cgnieder
- Site Moderator
-
- Posts: 1305
- Joined: Sat Apr 16th, 2011
- Location: Germany
-
by chrarnold on Fri Mar 1st, 2013
Hi, thanks, a good suggestion. I installed it, and now everything works wonderfully. Thank you for your help, you just made my day!
Best Christian
-
chrarnold
-
- Posts: 5
- Joined: Fri Feb 8th, 2013
Topic Tags
fncychap • headings • parts
Return to Page Layout
Users browsing this forum: No registered users and 4 guests
|