用語集のエントリがページ区切りで文字ヘッダーと項目を分離しないようにする

用語集のエントリがページ区切りで文字ヘッダーと項目を分離しないようにする

用語集の文字ヘッダーの直後にページが分割されます。ヘッダーを新しいページに移動させたいと思います。同様のタイトルの既に投稿された質問への回答は役に立ちませんでした。これが私の MWE です:

\documentclass[a4paper,12pt,twoside]{memoir}
\usepackage[backref=page]{hyperref}
\usepackage{blindtext}
\usepackage[nopostdot]{glossaries}
\setglossarystyle{altlisthypergroup}
\glstoctrue
\makenoidxglossaries
\renewcommand{\glssymbolsgroupname}{\#}
\renewcommand{\glslistnavigationitem}[1]{\item[#1]\strut\par\bigskip}
\renewcommand{\glsseelastsep}{\space and\space} 

\newglossaryentry{aterm}{
    name={aterm},
    description={\blindtext}
}

\newglossaryentry{bterm}{
    name={bterm},
    description={An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. }
}

\newglossaryentry{cterm}{
    name={cterm},
    description={\blindtext}
}

\begin{document}
\mainmatter
\blindtext \gls{aterm}
\blindtext \gls{bterm}
\blindtext \gls{cterm}

\printnoidxglossaries

\end{document}

答え1

実用的な解決策として、適切に選択されたソート名を持つ空の用語集エントリを追加し、問題のヘッダーが次のページに移動されるようにしました。欠点は、これによりページの下部に空の行が追加されることですが、この解決策は私が思いついた最善の解決策です。

\documentclass[a4paper,12pt,twoside]{memoir}
\usepackage[backref=page]{hyperref}
\usepackage{blindtext}
\usepackage[nopostdot]{glossaries}
\setglossarystyle{altlisthypergroup}
\glstoctrue
\makenoidxglossaries
\renewcommand{\glssymbolsgroupname}{\#}
\renewcommand{\glslistnavigationitem}[1]{\item[#1]\strut\par\bigskip}
\renewcommand{\glsseelastsep}{\space and\space}

\newglossaryentry{aterm}{
    name={aterm},
    description={\blindtext}
}

\newglossaryentry{bterm}{
    name={bterm},
    description={An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. An example to show how letter headers and group items become separated at page breaks. }
}

\newglossaryentry{cterm}{
    name={cterm},
    description={\blindtext}
}

\newglossaryentry{bu}{ %<-modified
    name={ },
    description={\pagebreak},
    sort={bu}
}

\begin{document}
\mainmatter
\blindtext \gls{aterm}
\blindtext \gls{bterm}
\blindtext \gls{cterm}
\glsadd[format=glsignore]{bu} %<-modified

\printnoidxglossaries

\end{document}

関連情報