我正在用路特克斯以及无数其他软件包。一切都很顺利,只是当我将 PDF 发送给审阅者时,他告诉我,当他打印文档的某些部分时(使用斜体字的人) 打印出来的都是垃圾。所以我需要将所有字体嵌入到 PDF 中。
无论如何,感谢您对更相关的 MWE 的建议。在这里。这是从我的代码中提取的。makeatletter 和 makeatother 之间的部分取自我用于我们制作的所有书籍的自定义包。
审阅者报告说,宏生成的任何东西\kote
都不会显示。
\documentclass[11pt]{book}
\usepackage{fontspec}
\usepackage[svgnames]{xcolor}
\usepackage{pgfkeys}
\usepackage{dejavu}
\usepackage{ifthen}
\usepackage{pdfpages}
\usepackage{calc}
\usepackage{setspace}
\setmainfont{Dejavu Sans}
\setlength\parskip{2mm}
\setlength\parindent{0pt}
\makeatletter
\newlength{\L@KoteSkip}%
\newlength{\@NewTextWidth}%
\newlength{\L@DialogSkip}%
\pgfkeys{%
/kote/.cd,
color/.store in=\kote@color,
sym/.store in=\kote@sym,
wide/.store in=\kote@wide,
shrink/.store in=\kote@shrink,
color={Black},
wide={false},
shrink={false},
sym={\Huge ``}
}
\newcommand{\shrinking}[1]{%
\ifthenelse{\equal{#1}{true}}%
{%
\setlength\parskip{1.5mm}%
\setstretch{1}%
}%
{%
\setlength\parskip{2mm}%
\setstretch{1.1}%
}%
}%
\newcommand{\kote}[2][]{%
\pgfkeys{/kote/.cd, #1}% Inject optional args into the macro
{% begin scope for the custom color
\shrinking{\kote@shrink}
\ifthenelse{\equal{\kote@wide}{true}}
{\def\kote@full@sym{\kote@sym{\hspace*{10pt}}}}%
{\def\kote@full@sym{\kote@sym{\hspace*{4pt}}}}%
\settowidth{\L@KoteSkip}{\widthof{\kote@full@sym}} % store the width of the mark
\setlength{\@NewTextWidth}{\textwidth}%
\addtolength{\@NewTextWidth}{-2\L@KoteSkip}%
\color{\kote@color}%
\vspace*{1mm}\hspace*{-1\L@KoteSkip}{\kote@full@sym}%
%%-- Push everythng to right
\leftskip +1\L@KoteSkip%
{\itshape{#2}}%
%%-- Bring everythng back to its place
\leftskip 0mm
}
%%-- Reset the default kote values
\pgfkeys{%
/kote/.cd,
color={Black},
wide={false},
shrink={false},
sym={\Huge ``}
}
}
\makeatother
\begin{document}
\kote{%
Whatever happens \\
I won the Supreme Battle \\
I loved \\
Again
Ladies and gentlemen! \\
This was meant to be a love story
}%
This text outside \verb|\kote| macro gets printed properly.
\end{document}
该代码片段生成以下 PDF:
提前致谢
PS:之前的问题是基于一个错误的假设。感谢@JasperHabicht 和@ingmar 帮助我改进这个问题