Text Formatting ⇒ Text formatting
Text formatting
I need to replace the default "Notes for chapter X" headings with custom titles in the enotez package. Despite trying various approaches, I keep getting "Command \@enotez@group@heading undefined" errors and custom headings don't apply.
**Minimal Working Example (MWE):**
```latex
\documentclass{book}
\usepackage{enotez}
\usepackage{hyperref}
\usepackage{ifthen}
% Basic configuration
\setenotez{
backref = true,
split = chapter,
reset = true
}
% Attempted customization solutions (various versions)
%\makeatletter
%\renewcommand{\@enotez@group@heading}[1]{%
% \ifthenelse{\equal{#1}{0}}{\section*{CUSTOM HEADING}}{}%
%}
%\makeatother
\begin{document}
\chapter{Preface}
Text with note\endnote{Preface note}.
\printnotes
\end{document}
```
**Current Behavior:**
- Default headings appear as "Notes for chapter X"
- Compilation errors about undefined commands when trying customization
- Backref works perfectly (text→notes and notes→text)
**What I Need:**
- Custom headings per chapter (e.g., "HITZAURREA" for chapter 0)
- Maintain chapter-specific note numbering
- Keep backref functionality
**What I've Tried:**
1. Replacing `\@enotez@group@heading`
2. Using `group-title`/`group-heading` keys
3. Configuration in preamble vs. after `\begin{document}`
4. Version detection with `\@ifpackagelater`
**System Info:**
- TeX Distribution: Overleaf
- enotez version: 2023/02/18 v0.11b
- Full file list from `\listfiles`:
```
*File List*
book.cls 2020/04/10 v1.4m Standard LaTeX document class
bk10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
enotez.sty 2023/02/18 v0.11b enotez
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
hyperref.sty 2023-05-15 v7.00t Hypertext links for LaTeX
iftex.sty 2022/02/03 v1.0f TeX engine tests
ltxcmds.sty 2020-05-10 v1.25 LaTeX kernel commands for general use (HO)
pdftexcmds.sty 2020-06-27 v0.33 Utility functions of pdfTeX for LuaTeX (HO)
infwarerr.sty 2019/12/03 v1.5 Providing info/warning/error messages (HO)
ifpdf.sty 2022/06/07 v3.4 Provides the ifpdf switch
kvsetkeys.sty 2019/12/15 v1.18 Key value parser (HO)
etexcmds.sty 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
kvdefinekeys.sty 2019-12-19 v1.6 Define keys (HO)
pdfescape.sty 2019/12/09 v1.15 Implements pdfTeX's escape features (HO)
hycolor.sty 2020-01-27 v1.10 Color options for hyperref/bookmark (HO)
letltxmacro.sty 2019/12/03 v1.6 Let assignment for LaTeX macros (HO)
auxhook.sty 2019-12-17 v1.6 Hooks for auxiliary files (HO)
pd1enc.def 2023-05-15 v7.00t Hyperref: PDFDocEncoding definition (HO)
intcalc.sty 2019/12/15 v1.3 Expandable calculations with integers (HO)
etexcmds.sty 2019/12/15 v1.7 Avoid name clashes with e-TeX commands (HO)
bitset.sty 2019/12/09 v1.3 Handle bit-vector datatype (HO)
bigintcalc.sty 2019/12/15 v1.5 Expandable calculations on big integers (HO)
hopatch.sty 2022/02/28 v1.4 Wrapper for package hooks (HO)
atbegshi.sty 2020/10/05 v1.0 At begin shipout hook (HO)
atveryend.sty 2019/12/15 v1.11 Hooks at very end of document (HO)
rerunfilecheck.sty 2019/12/05 v1.9 Rerun checks for auxiliary files (HO)
uniquecounter.sty 2019/12/15 v1.4 Provide unlimited unique counter (HO)
hpdftex.def 2023-05-15 v7.00t Hyperref driver for pdfTeX
stringenc.sty 2019/11/29 v1.12 Convert strings between diff. encodings (HO)
hdriver.def 2023-05-15 v7.00t Hyperref driver switch (HO)
ifthen.sty 2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)
```
**Question:**
What is the correct, version-agnostic way to customize group headings in enotez without triggering undefined command errors?
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p