## LaTeX forum ⇒ Text Formatting ⇒ Changing "Chapter" Using \fncychap

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Waterhouse
Posts: 2
Joined: Tue May 24, 2011 1:23 am

### Changing "Chapter" Using \fncychap

Hi All,

I'm new to the forum, but have been a LaTeX tinkerer for the past couple of years. I'm fairly confident in my ability to make use of the basics, but still run into usage problems with unique packages.

Case in point, I'm trying to figure out whether it's possible to change the word "Chapter" as it appears while utilizing Lindgren's \fncychap package. (I ran a search on the forum to see whether anyone else had the same questions, but didn't find any such posts -- so I hope I'm not asking something that's already been answered!) In his documentation, Lindgren says that the chapter heading is composed of two parts and then presents two commands, \chapapp and \thechapter. In particular, he notes that \chapapp "holds information of the text 'Chapter,'" which seems to imply that the text appearing as "Chapter" can indeed be changed to something else, say, "Part" or "Section." Yet it's not clear to me how and where the command \chapapp is to be used.

I've been fiddling around with it for the last few hours and finally decided to cast out for help. Any ideas from the forum's resident gurus?
Last edited by Waterhouse on Wed May 25, 2011 5:50 pm, edited 1 time in total.

LaTeXguide.org • LaTeX-Cookbook.net

Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

### Changing "Chapter" Using \fncychap

Check this:
\documentclass[a4paper]{book}
\usepackage[T1]{fontenc}
\usepackage[Conny]{fncychap}
\renewcommand{\chaptername}{Theme}
\begin{document}
\chapter{Is really this what you were looking for?}
I hope so.
\end{document}


The book class uses the internal macro \@chapapp to store the chapter name. Initially, \@chapapp is defined as \chaptername, which, in turn, is defined as «Chapter» or the corresponding word in a non English language is babel is active. The \chapapp command you mentioned perhaps refers to the internal command, but, in fact, it seems to be undefined (a package bug?).
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.

Waterhouse
Posts: 2
Joined: Tue May 24, 2011 1:23 am

### Re: Changing "Chapter" Using \fncychap

Brilliant! That's exactly what I was looking for, Juanjo. I also appreciate your taking the time to provide your interpretation of the commands.

Many, many thanks.

Neridi
Posts: 1
Joined: Wed Sep 21, 2022 2:48 pm

### Changing "Chapter" Using \fncychap

I hope it's okay to reanimate this thread - I've been struggling with the same problem and unfortunately, the solution suggested appears to have stopped working,

I'm using MikTeX/LuaTeX with LyX on a Windows machine, document class scrreprt, UKenglish

While the actual document has additional packages loaded, the wrong output appears also when \fncychap is the only package loaded.

Attempts to fix this have included
babel (no)
excluding all other packages (no)
using solution proposed here https://tex.stackexchange.com/questions/122805/changing-chapter-name-in-fncychap (no)

The weirdest thing about this is that I have old pdfs from that same file where "chapter" has actually changed to "lesson" as desired. It just doesn't seem to work any longer, and I'm at a loss as to why. The only possible explanation I can come up with is that the other computer is set up using TeXlive.

If anyone has an idea, it would be very welcome.

MjK
Posts: 48
Joined: Fri Jan 28, 2022 6:09 pm

### Changing "Chapter" Using \fncychap

Neridi wrote:I hope it's okay to reanimate this thread

Not really, because using fncychap with a KOMA-Script class like scrreprt is already not recommended. There is Emulation von fncychap mit KOMA-Script-Mitteln in German. Sorry, but until now I have not found time to transfer these pages to the KOMA-Script wiki and translate the pages.

However, if you use babel with UKenglish, you should also either use babel or KOMA-Script to change language terms like \chaptername. The KOMA-Script command \renewcaptionname would also work without using babel. But without babel option UKenglish would not make much sense.

Please have a look into the manuals. And please always show a minimal working example, that can be used to reproduce your problem and test our ideas and suggestions. See my signature for more information.
My main topics are KOMA-Script and other questions related to my packages. If I reply to any other topic or if you've not yet added a minimal working example, please do not expect any further response. And please don't forget to tag examples as code.