![删除“部分”页面上的页码](https://linux22.com/image/401476/%E5%88%A0%E9%99%A4%E2%80%9C%E9%83%A8%E5%88%86%E2%80%9D%E9%A1%B5%E9%9D%A2%E4%B8%8A%E7%9A%84%E9%A1%B5%E7%A0%81.png)
有解决方案。
比如这个\patchcmd{\part}{\vfil}{\vfil\thispagestyle{empty}}{}{}
使用\usepackage{etoolbox}
或者这个。
我尝试将它们应用到我的代码中,但目前还未能使其发挥作用。
任何关于原因和解决方案的见解都将受到赞赏。
谢谢。
% PREAMBLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[oneside,centered,twocolumn]{book}
\usepackage[T1]{fontenc}
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\usepackage[toc,page]{appendix}
\usepackage{xcolor} % For links color
\usepackage{multirow}
\usepackage{eso-pic}
\usepackage[rightmargin=0pt]{quoting}
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{relsize,etoolbox} % To make table footnote font smaller and quotes small
\usepackage{titlesec}
\usepackage{colortbl} % To define colors
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
% HEADING and PART FONTS %%%%%%%%%%%%%%%%%%%%%%%%
\newfontfamily\partfont[]{TeX Gyre Heros}
% STYLE PART WITH GRAPHICS AND WORK STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\part}[display]
{\bfseries\color{black}\filcenter\fontsize{60}{70}\partfont} % Size of Part
{\Huge\MakeUppercase\partfont\thepart}
{10pt}
{\tikz[remember picture,overlay]\node[inner sep=0pt] at ($(current page.north) +
(0pt,-400pt)$) {\includegraphics{example-image-duck}};}
\begin{document}
\part{Part One}
\chapter{A}
\part{Part Two}
\chapter{B}
\chapter{C}
\end{document}
答案1
好吧,您已经使用命令\titleformat{\part}
来操作\part
页面了。只需\thispagestyle{empty}
像这样添加即可:
\titleformat{\part}[display]
{\bfseries\color{black}\filcenter\fontsize{60}{70}\partfont} % Size of Part
{\thispagestyle{empty}\Huge\MakeUppercase\partfont\thepart} % <=========
{10pt}
{\tikz[remember picture,overlay]\node[inner sep=0pt] at ($(current page.north) +
(0pt,-400pt)$) {\includegraphics{example-image-duck}};%
}
请注意,我更改了您其他一些标有 的代码<========
。例如,您不能使用
\usepackage[T1]{fontenc}
和...一起
\usepackage{fontspec}
或者查看加载包table
的选项...xcolor
colortbl
因此,以下是完整且更正的 MWE
\documentclass[oneside,centered,twocolumn]{book}
%\usepackage[T1]{fontenc} % <=============== not together with fontspec!
\special{papersize=215.9mm,279.4mm}
\usepackage[english]{babel}
\makeatletter\@addtoreset{chapter}{part}\makeatother%
\usepackage[toc,page]{appendix}
\usepackage[table]{xcolor} % <==========================================
\usepackage{multirow}
\usepackage{eso-pic}
\usepackage[rightmargin=0pt]{quoting}
\usepackage{scrextend}
\usepackage{threeparttable} % For table notes + To allow footnote material to stay with the tabular environment
\usepackage{relsize} % To make table footnote font smaller and quotes small
\usepackage{titlesec}
\usepackage[linguistics,edges]{forest}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{titling}
\usepackage{fancyhdr}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella} % Palatino clone
% HEADING and PART FONTS %%%%%%%%%%%%%%%%%%%%%%%%
\newfontfamily\partfont[]{TeX Gyre Heros}
% STYLE PART WITH GRAPHICS AND WORK STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\part}[display]
{\bfseries\color{black}\filcenter\fontsize{60}{70}\partfont} % Size of Part
{\thispagestyle{empty}\Huge\MakeUppercase\partfont\thepart} % <=========
{10pt}
{\tikz[remember picture,overlay]\node[inner sep=0pt] at ($(current page.north) +
(0pt,-400pt)$) {\includegraphics{example-image-duck}};%
}
\begin{document}
\part{Part One}
\chapter{A}
\part{Part Two}
\chapter{B}
\chapter{C}
\end{document}
使用 XeLaTeX 编译后,您将获得以下结果部分页面:
正如您所看到的,页码消失了(红色圆圈)...