Skip to content

Commit

Permalink
Remove inputting pdf spine (close #551)
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed May 19, 2023
1 parent e54a4ba commit af01aba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

## [Unreleased]

### Changed

- 不再插入 PDF 版书脊,改为编译生成([#551](https://github.com/tuna/thuthesis/issues/551))。

### Fixed

- 修正封面的职称字距问题([#879](https://github.com/tuna/thuthesis/discussions/879))。
Expand Down
38 changes: 2 additions & 36 deletions thuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,6 @@
% $ xelatex spine.tex # 生成书脊 PDF
% \end{shell}
%
% 在调用 \XeLaTeX 时,如果设置了 \option{include-spine} 选项,
% 则需要在文件名前加上 \texttt{-shell-escape} 的命令行选项。
%
% 下面的命令用来生成用户手册:
% \begin{shell}
% $ xelatex -shell-escape thuthesis.dtx
Expand Down Expand Up @@ -1234,12 +1231,7 @@
% }
% \end{latex}
% 打开此选项后,书籍会出现在中文封面后面的第一个空白页。如果有英文封面,则在英文封面之前。
% 如果需要书籍出现在其他位置,请手工使用 \cs{spine} 生成,不要使用此命令。
%
% 在使用 Fandol 仿宋时,如果打开 \option{include-spine} 选项,
% 模板将使用 \cs{write18} 来生成独立的 \file{spine.tex},并调用 \XeLaTeX 进行排版后插入论文中。
% 在这种情况下,请确保编译时打开了 shell escape 功能,或者在论文目录下放置编译完成的 \file{spine.pdf},
% 否则编译将因为无法正常生成书脊而失败。
% 如果需要书籍出现在其他位置,请手工使用 \cs{spine} 生成,不要使用此选项。
%
% \section{致谢}
% \label{sec:thanks}
Expand Down Expand Up @@ -4373,7 +4365,7 @@
\thu@pdfbookmark{-1}{\thu@title}%
\thu@titlepage
\ifthu@include@spine@true
\thu@spine
\spine
\fi
\ifthu@degree@graduate
\ifthu@thesis@type@thesis
Expand Down Expand Up @@ -7069,32 +7061,6 @@
\restoregeometry
}
% \end{macrocode}
%
% Fandol 仿宋无法同时用于横排和竖排
%(\href{https://github.com/tuna/thuthesis/issues/551}{\#551}),
% 所以只能独立编译 \file{spine.pdf},然后插入封面后。
% \begin{macrocode}
\newcommand\thu@input@spine{%
\IfFileExists{spine.pdf}{}{%
\immediate\write18{xelatex spine.tex}%
\IfFileExists{spine.pdf}{}{%
\thu@error{Cannot find file "spine.pdf". Compile "spine.tex" first, or enable shell escape}%
}%
}%
\includepdf[pages=1]{spine.pdf}%
}
\newcommand\thu@spine{%
\ifthu@cjk@font@fandol
\thu@input@spine
\else
\ifthu@cjk@font@noto
\thu@input@spine
\else
\spine
\fi
\fi
}
% \end{macrocode}
% \end{macro}
%
%
Expand Down

2 comments on commit af01aba

@Harry-Chen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还需要把 spine.tex 删了

@zepinglee
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

还需要把 spine.tex 删了

单独制作书脊时应该用得到吧?

Please sign in to comment.