mirror of
https://github.com/ElegantLaTeX/ElegantBook.git
synced 2026-01-26 04:14:35 +08:00
add device option pad
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
\documentclass[cn,11pt,fancy,hide]{elegantbook}
|
||||
\documentclass[cn,11pt,fancy,hide,pad]{elegantbook}
|
||||
|
||||
|
||||
\title{ElegantBook:优美的 \LaTeX{} 书籍模板}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
\DeclareStringOption[answer]{result}
|
||||
\DeclareStringOption[fancy]{mode}
|
||||
\DeclareStringOption[show]{base}
|
||||
|
||||
\DeclareStringOption[normal]{device}
|
||||
|
||||
% ----- backward compatibility
|
||||
\DeclareVoidOption{green}{\ekv{color=green}}
|
||||
@@ -43,6 +43,8 @@
|
||||
\DeclareVoidOption{hide}{\ekv{base=hide}}
|
||||
\DeclareVoidOption{show}{\ekv{base=show}}
|
||||
|
||||
\DeclareVoidOption{normal}{\ekv{device=normal}}
|
||||
\DeclareVoidOption{pad}{\ekv{device=pad}}
|
||||
% ----- Math option -----
|
||||
\newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}}
|
||||
|
||||
@@ -276,16 +278,24 @@
|
||||
%% device settings
|
||||
|
||||
\RequirePackage{geometry}
|
||||
|
||||
\ifdefstring{\ELEGANT@device}{normal}{
|
||||
\geometry{
|
||||
a4paper,
|
||||
% left=27mm, %% or inner=23mm
|
||||
% right=27mm, %% or outer=18mm
|
||||
top=25.4mm, bottom=25.4mm,
|
||||
headheight=2.17cm,
|
||||
headsep=4mm,
|
||||
footskip=12mm
|
||||
}
|
||||
}}{\relax}
|
||||
|
||||
\ifdefstring{\ELEGANT@device}{pad}{
|
||||
\geometry{
|
||||
paperwidth=7.5in,
|
||||
paperheight=10in,
|
||||
margin=16mm,
|
||||
headheight=2.17cm,
|
||||
footskip=4mm
|
||||
}}{\relax}
|
||||
|
||||
\RequirePackage{hyperref}
|
||||
\hypersetup{
|
||||
@@ -615,11 +625,17 @@
|
||||
\def\@logo{\includegraphics[width=4.2cm]{#1}
|
||||
}
|
||||
}
|
||||
\ifdefstring{\ELEGANT@device}{normal}{
|
||||
\newcommand*{\cover}[1]{
|
||||
\def\@cover{\includegraphics[width=\linewidth]{#1}
|
||||
}
|
||||
}
|
||||
}}{\relax}
|
||||
|
||||
\ifdefstring{\ELEGANT@device}{pad}{
|
||||
\newcommand*{\cover}[1]{
|
||||
\def\@cover{\includegraphics[trim=0 26px 0 26px,clip=true, width=\linewidth]{#1}
|
||||
}
|
||||
}}{\relax}
|
||||
|
||||
\renewcommand{\baselinestretch}{1.35}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user