向所有 Stackexchangers 成员问好。
我对章节标题进行了修改,并希望 \chapter* 能够考虑到这一点。我该如何操作?我需要的是章节参考书目和索引的相同呈现方式。
这是我的代码
\documentclass{book}
\usepackage{pstricks,pst-blur}
\usepackage{graphics}
\usepackage{xcolor}
\def\cpcol{\color[rgb]{.8, .3, 0}}
\definecolor{cpcol}{rgb}{.8, .3, 0}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
\reset@font
\parindent \z@
\vspace*{10\p@}%
\hbox{%
\vbox{\hsize=2cm
\begin{tabular}{c}
\scshape \strut{\cpcol\@chapapp{}} \\
\psblurbox[fillcolor=venetianred!05,linestyle=none]{%
\vrule depth 10em width 0pt%
\vrule height 0pt depth 0pt width 1ex%
{\LARGE \bfseries \strut {\cpcol\thechapter}}%
\vrule height 0pt depth 0pt width 1ex%
\rput(-0.3,-2.6){\includegraphics[scale=.04,bb=0 0 550 391]{mi.png}}
\rput(-0.3,-3.2){\tiny \psscalebox{.6 .6}{\color{cpcol}\begin{tabular}{c} La main invisible\\ --- Portrait ---\\Adam Smith\\(1723-1790)\end{tabular}}}
}
\end{tabular}%
}%
\vbox{%
\advance\hsize by -2cm
{\cpcol\hrule}\par
\vskip 6pt%
\hspace{1em}%
{\cpcol \Huge \bfseries #1}
}%
}%
\vskip 100\p@
}
\makeatother
\begin{document}
\chapter{Chapter one}
aa
\chapter*{Bibliography}
bb
\end{document}
答案1
您必须重新定义\@makeschapterhead
未编号的章节。
\documentclass[oneside]{book}
\usepackage{pstricks,pst-blur}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{mwe}
\def\cpcol{\color[rgb]{.8, .3, 0}}
\definecolor{cpcol}{rgb}{.8, .3, 0}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
\reset@font
\parindent \z@
\vspace*{10\p@}%
\hbox{%
\vbox{\hsize=2cm
\begin{tabular}{c}
\scshape \strut{\cpcol\@chapapp{}} \\
\psblurbox[fillcolor=red!05,linestyle=none]{%
\vrule depth 10em width 0pt%
\vrule height 0pt depth 0pt width 1ex%
{\LARGE \bfseries \strut {\cpcol\thechapter}}%
\vrule height 0pt depth 0pt width 1ex%
\rput(-0.3,-2.6){\includegraphics[width=2cm]{example-image}}
\rput(-0.3,-3.2){\tiny \psscalebox{.6 .6}{\color{cpcol}\begin{tabular}{c} La main invisible\\ --- Portrait ---\\Adam Smith\\(1723-1790)\end{tabular}}}
}
\end{tabular}%
}%
\vbox{%
\advance\hsize by -2cm
{\cpcol\hrule}\par
\vskip 6pt%
\hspace{1em}%
{\cpcol \Huge \bfseries #1}
}%
}%
\vskip 100\p@
}
\def\@makeschapterhead#1{%
\reset@font
\parindent \z@
\vspace*{10\p@}%
\hbox{%
\vbox{\hsize=2cm
\begin{tabular}{c}
\strut\\
\psblurbox[fillcolor=red!05,linestyle=none]{%
\vrule depth 10em width 0pt%
\vrule height 0pt depth 0pt width 1ex%
\vrule height 0pt depth 0pt width 1ex%
\rput(-0.3,-2.6){\includegraphics[width=2cm]{example-image}}
\rput(-0.3,-3.2){\tiny \psscalebox{.6 .6}{\color{cpcol}\begin{tabular}{c} La main invisible\\ --- Portrait ---\\Adam Smith\\(1723-1790)\end{tabular}}}
}
\end{tabular}%
}%
\vbox{%
\advance\hsize by -2cm
{\cpcol\hrule}\par
\vskip 6pt%
\hspace{1em}%
{\cpcol \Huge \bfseries #1}
}%
}%
\vskip 100\p@
}
\makeatother
\begin{document}
\chapter{Alpaca}
\blindtext
\chapter*{Wombat}
\blindtext
\end{document}