我修改了我的\part
样式\chapter
,\titleformat
当我使用 LaTeX=>PDF 输出配置文件时,它工作得很好。最后我想使用 LaTeX => PS => PDF 输出配置文件,但只要我使用它,旋转的文本(部分或章节)就消失了。我不确定是不是它\titleformat
或\rotatebox
那是原因...
我怎样才能使文本以 LaTeX=>PS=>PDF 的形式显示?
这是最小的工作示例
\documentclass[12pt,a4paper,twoside, english]{report}
\usepackage{titlesec}
\usepackage{xcolor}
\usepackage{microtype}
\usepackage{graphicx}
\definecolor{myblue}{RGB}{0,0,255}
\titleformat{\part}[display]
{\normalfont\bfseries\color{myblue}}
{\filleft\hspace*{-60pt}%
\rotatebox[origin=c]{90}{%
\normalfont\color{myblue}\Huge%
\textls[180]{\textsc{\partname}}%
}\hspace{10pt}%
{\setlength\fboxsep{0pt}%
\colorbox{myblue}{\parbox[c][3cm][c]{2.5cm}{%
\centering\color{white}\fontsize{80}{90}\selectfont\thepart}%
}}%
}
{10pt}
{\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE \pagestyle{empty}}
\begin{document}
\part{First Part}
\end{document}
如果有帮助的话,我也可以上传它的图片。
提前致谢!
答案1
Packagemicrotype
会告诉您在文件上运行 LaTeX 时发生了什么:
Package microtype Warning: You are using tracking/letterspacing in DVI mode.
(microtype) This will probably not work, unless the post-
(microtype) processing program (dvips, dvipdfm(x), ...) is
(microtype) able to create the virtual fonts on the fly.
该命令\textls
在 dvi 模式下不起作用。您可以针对您的用例尝试\caps
以下命令:soul.sty
\documentclass[12pt,a4paper,twoside, english,dvips]{report}
\usepackage{titlesec}
\usepackage{xcolor}
% \usepackage{microtype}
\usepackage{graphicx}
\definecolor{myblue}{RGB}{0,0,255}
\usepackage{soul}
\titleformat{\part}[display]
{\normalfont\bfseries\color{myblue}}
{\filleft\hspace*{-60pt}%
\rotatebox[origin=c]{90}{%
\normalfont\color{myblue}\Huge%
\caps\partname %% <==========
}\hspace{10pt}%
{\setlength\fboxsep{0pt}%
\colorbox{myblue}{\parbox[c][3cm][c]{2.5cm}{%
\centering\color{white}\fontsize{80}{90}\selectfont\thepart}%
}}%
}
{10pt}
{\titlerule[2.5pt]\vskip3pt\titlerule\vskip4pt\LARGE \pagestyle{empty}}
\begin{document}
\part{First Part}
\noindent
\begin{tabular}{|l|l|}
\verb|\normalfont First Part| & \normalfont First Part \\
\verb|\scshape First Part| & \scshape First Part \\
\verb|\caps{First Part}| & \caps{First Part}
\end{tabular}
\end{document}
\caps
是一个 letterspacing 命令。上述代码的结果是: