防止詞彙表條目在分頁符號處分隔字母標題和項目

防止詞彙表條目在分頁符號處分隔字母標題和項目

詞彙表字母標題後立即分頁。我希望標題轉到新頁面。已發布的類似標題問題的回答對我沒有幫助。這是我的 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}

相關內容