GeneralIncreased Size and uppercased Name of Endnotes List

LaTeX specific issues not fitting into one of the other forums of this category.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increased Size and uppercased Name of Endnotes List

Post by AleCes »

Hello everybody,

I wonder whether there's a way to increase the size of list name (i.e. Notes) created by enotez and to make it uppercase. I couldn't find anything in the manual to this avail.

Minimal example:

Code: Select all

\documentclass[10pt,a5paper,openany]{book}
\usepackage{blindtext}
\usepackage{bookmark}
\usepackage{enotez}

\setenotez{
  reset = true,
  backref = true,
  totoc = chapter,
  split = chapter,
  list-style = itemize
}

\renewcommand*\enmark[1]{\llap{#1}}

\begin{document}
  \chapter{Introduction}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}

  \printendnotes
\end{document}

Recommended reading 2024:

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

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

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increased Size and uppercased Name of Endnotes List

Post by cgnieder »

Have a look at the list-heading option for choosing the sectioning command used for the heading. This will naturally use the same font size used for the corresponding sectioning level, e.g.

Code: Select all

\setenotez{list-heading=\chapter*{#1}
For fine control on what is printed as list heading have a closer look at section 6 Language Support.

Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increased Size and uppercased Name of Endnotes List

Post by AleCes »

Hello cgnieder!

If I add this command to \setenotez, I get the following error:

Code: Select all

Package scrlfile, 2012/06/15 v3.12 KOMA-Script package (loading files)
                  Copyright (C) Markus Kohm

) (/usr/share/texlive/texmf-dist/tex/latex/translations/translations.sty))

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! LaTeX error: "kernel/misplaced-equals-sign"
! 
! Misplaced equals sign in key-value input 24
! 
! See the LaTeX3 documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  
                                                  
l.24 }
      
? 
Minimal example:

Code: Select all

\documentclass[10pt,a5paper,openany]{book}
\usepackage{blindtext}
\usepackage{bookmark}
\usepackage{enotez}

\setenotez{
  reset = true,
  backref = true,
  totoc = chapter,
  split = chapter,
  list-style = itemize
  list-heading=\chapter*{#1}
}

\renewcommand*\enmark[1]{\llap{#1}}

\begin{document}
  \chapter{Introduction}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}
    \blindtext
    \endnote{\blindtext}

    \printendnotes
\end{document}
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increased Size and uppercased Name of Endnotes List

Post by cgnieder »

You forgot a comma after itemize.
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increased Size and uppercased Name of Endnotes List

Post by AleCes »

cgnieder wrote:You forgot a comma after itemize.
What a scatterbrain! :shock:

However, I've encountered another error:

Code: Select all

! TeX capacity exceeded, sorry [input stack size=5000].
\@nomath ...e \@font@warning {Command \noexpand #1
                                                  invalid in math mode}\fi 
l.3426 
       
when I add

Code: Select all

\DeclareTranslation{English}{enotez-splitted-title}{\small{<name> <ref>}}
to the minimal example.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increased Size and uppercased Name of Endnotes List

Post by cgnieder »

AleCes wrote:
cgnieder wrote:You forgot a comma after itemize.
What a scatterbrain! :shock:

However, I've encountered another error:
! TeX capacity exceeded, sorry [input stack size=5000].
\@nomath ...e \@font@warning {Command \noexpand #1
invalid in math mode}\fi
l.3426
when I add

Code: Select all

\DeclareTranslation{English}{enotez-splitted-title}{\small{<name> <ref>}}
to the minimal example.
The translation should not contain any formatting such as \small. It should only determine the text to be used.

Probably what you want is something like

Code: Select all

\setenotez{
  list-heading = \chapter*{#1} ,
  split-heading = \section*{#1} ,
  split-title = <name> <ref>
}
or

Code: Select all

\setenotez{
  list-heading = \section*{#1} ,
  split-heading = \subsection*{#1} ,
  split-title = <name> <ref>
}
Then you also don't need to care about translation-strings.

Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Increased Size and uppercased Name of Endnotes List

Post by AleCes »

Actually you suggested I should use translation-strings in order "to get fine control on what is printed".

Interestingly enough

Code: Select all

\DeclareTranslation{English}{enotez-title}{\Huge{NOTES}}
works :o :!:

However, what I want is:

Code: Select all

    \setenotez{
      list-heading = \Huge{\chapter*{#1}} ,
      split-heading = \large{\section*{#1}},
      split-title = <name> <ref>
    }
Is there a way to get such fine-tuning working?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increased Size and uppercased Name of Endnotes List

Post by cgnieder »

AleCes wrote:Actually you suggested I should use translation-strings in order "to get fine control on what is printed".
By that i meant the text (you also said something about uppercase IIRC...
AleCes wrote:However, what I want is:

Code: Select all

    \setenotez{
      list-heading = \Huge{\chapter*{#1}} ,
      split-heading = \large{\section*{#1}},
      split-title = <name> <ref>
    }
Is there a way to get such fine-tuning working?
That doesn't like right at all! On a technical side neither \large nor \Huge take an argument but are font switches that are active until the end of the current group or until the next switch.

Why do you want the headings different from other headings in you text? That doesn't seem to make sense to me... if all chapter titles should be printed \Huge then this should be adjusted (e.g. with titlesec for all \chapter's at once. Changeing only the font size of the heading of the endnotes seems very inconsistent to me typographically...

Something like this is a setting I'd expect:

Code: Select all

\documentclass{book}

\usepackage[rm]{titlesec}
\titleformat*{\chapter}{\Huge\bfseries}
\titleformat*{\section}{\large\bfseries}

\usepackage{enotez}
\setenotez{
  split-title = <name> <ref> ,
  split = chapter ,
  list-style = itemize
}
\DeclareTranslation{English}{enotez-chapter}{Chapter}
\renewcommand*\enmark[1]{\llap{#1}}

\usepackage{blindtext}

\begin{document}

\chapter{Introduction}
\blindtext\endnote{\blindtext}
\blindtext\endnote{\blindtext}
\blindtext\endnote{\blindtext}
\blindtext\endnote{\blindtext}
\blindtext\endnote{\blindtext}

\printendnotes

\end{document}
Regards
site moderator & package author
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Increased Size and uppercased Name of Endnotes List

Post by cgnieder »

AleCes wrote:Interestingly enough

Code: Select all

\DeclareTranslation{English}{enotez-title}{\Huge{NOTES}}
works :o :!:
Only by chance... :)

As I said before: \Huge is a switch. A better definition would be

Code: Select all

\DeclareTranslation{English}{enotez-title}{{\Huge NOTES}}
but I'd avoid adding formatting to the translations.

Code: Select all

\DeclareTranslation{English}{enotez-title}{NOTES}
would be even better and the formatting should be done with an interface for setting the format of every \chapter

Regards
site moderator & package author
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Re: Increased Size and uppercased Name of Endnotes List

Post by AleCes »

I know it's typographically inconsistent but that's the way it's typeset in an old book and I must try to reproduce the formatting as faithfully as possible.
Post Reply