Lots of changes.
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
footskip = 0.5in, % 36pt,
|
||||
]{geometry}
|
||||
|
||||
\RequirePackage{float}
|
||||
|
||||
% Redefine the commands geometry uses to draw the page frame to customize the
|
||||
% color.
|
||||
\renewcommand{\Gm@vrule}{\color{layoutColor}\vrule width 0.2pt height\textheight depth\z@}
|
||||
@@ -58,14 +60,16 @@
|
||||
\providelength{\marparwidth}[\marginparsep + \marginparwidth]
|
||||
\providelength{\contentwidth}[\textwidth + \marparwidth]
|
||||
|
||||
\RequirePackage[balanced]{lua-widow-control}
|
||||
\RequirePackage[
|
||||
balanced,
|
||||
]{lua-widow-control}
|
||||
\ifthenelse{\boolean{isDraft}}{
|
||||
\lwcsetup{draft=false,showcolours=true}
|
||||
}{}
|
||||
|
||||
% Paragraph formatting.
|
||||
\setlength{\parindent}{0pt}
|
||||
\setlength{\parskip}{2ex plus 0.5ex minus 0.5ex}
|
||||
\setlength{\parskip}{\medskipamount}
|
||||
|
||||
% Float Page Configuration
|
||||
\renewcommand{\topfraction}{0.9} % max fraction of floats at top
|
||||
@@ -87,43 +91,42 @@
|
||||
% Line-breaking dot
|
||||
\NewDocumentCommand{\bdot}{}{.\zws}
|
||||
|
||||
\NewDocumentEnvironment{SmartAdjustWidth}{O{\boolean{isElectronic}} m m +b}{%
|
||||
\ifthenelse{#1}{%
|
||||
\begin{adjustwidth}{#2}{#3}%
|
||||
#4%
|
||||
\end{adjustwidth}%
|
||||
}{%
|
||||
\begin{adjustwidth*}{#2}{#3}%
|
||||
#4%
|
||||
\end{adjustwidth*}%
|
||||
}%
|
||||
}{}
|
||||
|
||||
\newcommand{\bigfloatoffsetratio}{2}
|
||||
|
||||
% Maximum width adjustment to fit 2 16x9 screensots on one page.
|
||||
\providelength{\bigfloatoverhang}[0.54in]
|
||||
|
||||
\providecommand{\adjwidthtype}{}
|
||||
\floatstyle{plain}
|
||||
\newfloat{generic}{htpb}{lgf}
|
||||
|
||||
\NewDocumentCommand{\BigFloat}{
|
||||
% Overhang: the distance that the BigFloat extends into the margins.
|
||||
\NewDocumentEnvironment{BigFloat}{
|
||||
% #1: Float type
|
||||
O{generic}
|
||||
% #2: Overhang: the distance that the BigFloat extends into the margins.
|
||||
O{\bigfloatoverhang}
|
||||
% Float position: where the float may appear on the page.
|
||||
% #3: Float position: where the float may appear on the page.
|
||||
O{htpb}
|
||||
% Offset: the distance to offset the center of the BigFloat from the center
|
||||
% of the text block.
|
||||
% #4: Offset: the distance to offset the center of the BigFloat from the center
|
||||
% of the text block.
|
||||
O{\bigfloatoffsetratio}
|
||||
% Float type: figure or table.
|
||||
m
|
||||
% Content: what appears in the BigFloat.
|
||||
+m
|
||||
% #5: Body: what appears in the BigFloat.
|
||||
+b
|
||||
}{%
|
||||
\ifthenelse{\boolean{isElectronic}}{%
|
||||
\@bigfloat{#1}{#2}{#3}{#4}{#5}{adjustwidth}%
|
||||
}{%
|
||||
\@bigfloat{#1}{#2}{#3}{#4}{#5}{adjustwidth*}%
|
||||
}%
|
||||
}
|
||||
|
||||
\NewDocumentCommand{\@bigfloat}{
|
||||
% First 5 arguments are same as \BigFloat.
|
||||
m m m m +m
|
||||
% Argument 6 is the adjustwidth type:
|
||||
% adjustwidth for one-sided document; adjustwidth* for two-sided.
|
||||
m
|
||||
}{
|
||||
\begin{#4}[#2]% figure/table
|
||||
\begin{#6}{-#1}{-#1 * \real{#3}}% adjustwidth(*)
|
||||
\begin{minipage}{#1 * (#3 + 1) + \textwidth}%
|
||||
\begin{#1}[#3]% float environment
|
||||
\begin{SmartAdjustWidth}{-#2}{-#2 * \real{#4}}% adjustwidth(*)
|
||||
\begin{minipage}{\linewidth}%#2 * (#4 + 1) + \textwidth}%
|
||||
\ifthenelse{\boolean{isDraft}}{%
|
||||
{\color{layoutColor}\rule{\textwidth}{1pt}\zws}%
|
||||
#5%
|
||||
@@ -132,6 +135,6 @@
|
||||
#5%
|
||||
}%
|
||||
\end{minipage}%
|
||||
\end{#6}%
|
||||
\end{#4}%
|
||||
}
|
||||
\end{#5}%
|
||||
\end{#1}%
|
||||
}{}
|
||||
Reference in New Issue
Block a user