Add more templates: tufte, sci-fi, business, minimal

This commit is contained in:
Solaria
2026-03-14 17:39:38 +00:00
parent d8047bdd2f
commit 4d3255c9aa
5 changed files with 411 additions and 0 deletions
+4
View File
@@ -69,6 +69,10 @@ class LaTeXExporter:
"legrand": "legrand.tex", # Orange book style
"cleanthesis": "cleanthesis.tex", # Minimalist
"university-press": "university-press.tex", # Cambridge/Oxford
"tufte": "tufte.tex", # Tufte side-notes
"sci-fi": "sci-fi.tex", # Orbit/DAW style
"business": "business.tex", # Professional
"minimal": "minimal.tex", # Bare-bones
# RPG/Game Books
"rpg-rulebook": "rpg-rulebook.tex", # Game system
@@ -0,0 +1,128 @@
% Business Book Template - Professional/Corporate
% Non-fiction, self-help, leadership
\documentclass[12pt]{memoir}
% Packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{titlesec}
\usepackage{framed}
% Business trim - readable
\geometry{
paperwidth=6in,
paperheight=9in,
textwidth=4.5in,
textheight=7.5in,
inner=0.75in,
outer=0.5in,
}
% Professional colors
\definecolor{bizblue}{RGB}{0,85,153}
\definecolor{bizdark}{RGB}{51,51,51}
\definecolor{bizgray}{RGB}{128,128,128}
% Hyperref
\hypersetup{
colorlinks=true,
linkcolor=bizblue,
urlcolor=bizblue,
}
% Fonts - clean
\usepackage{mathptmx}
% Chapter style - clean
\chapterstyle{dowding}
% Section colors
\titleformat{\section}
{\color{bizblue}\normalfont\Large\bfseries}
{\color{bizblue}\thesection}{1em}{}
% Headers
\pagestyle{simple}
% Callout box
\newenvironment{callout}
{\begin{framed}\color{bizblue}}
{\end{framed}}
% Key point box
\newenvironment{keypoint}
{\begin{framed}\color{bizdark}\textbf}}
{\end{framed}}
% Metadata
\def\booktitle{$book_title$}
\def\bookauthor{$author$}
\def\bookdate{$date$}
\def\bookpublisher{$publisher$}
\begin{document}
% Title page
\thispagestyle{empty}
\begin{center}
\vspace*{1in}
{\Huge\bfseries\booktitle\par}
\vspace{1in}
{\Large by \bookauthor\par}
\vfill
{\large\bookpublisher}\\
{\bookdate}
\end{center}
% Copyright
\clearpage
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
Copyright \textcopyright\ \bookdate\ \bookauthor\\
All rights reserved.
\end{center}
\vspace*{\fill}
% Dedication
$if(dedication)$
\clearpage
\thispagestyle{empty}
\vspace*{3in}
\begin{center}
\textit{$dedication$}
\end{center}
$endif$
% Contents
\clearpage
\tableofcontents
% Main
$body$
% About author
\clearpage
\section*{About the Author}
\bigskip
\textit{\bookauthor} is an accomplished professional in their field.
% Also by
\clearpage
\section*{Also By}
\begin{itemize}
\item Book One
\item Book Two
\end{itemize}
\end{document}
@@ -0,0 +1,65 @@
% Minimal Book - Clean, Bare-Bones
% For when you want zero styling
\documentclass[12pt]{book}
% Basic packages only
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{geometry}
% Simple trim
\geometry{
paperwidth=6in,
paperheight=9in,
textwidth=4.5in,
textheight=7.5in,
inner=0.75in,
outer=0.75in,
}
% Hyperref
\hypersetup{
colorlinks=true,
linkcolor=black,
}
% No extra styling - plain LaTeX
% Metadata
\def\booktitle{$book_title$}
\def\bookauthor{$author$}
\def\bookdate{$date$}
\begin{document}
% Title
\thispagestyle{empty}
\begin{center}
\vspace*{2in}
{\LARGE\bfseries\booktitle\par}
\bigskip
by \bookauthor
\vfill
\bookdate
\end{center}
% Copyright
\clearpage
\thispagestyle{empty}
\vspace*{\fill}
Copyright \copyright\ \bookdate\ \bookauthor
\vspace*{\fill}
% Contents
\clearpage
\tableofcontents
% Main
\mainmatter
$body$
\end{document}
@@ -0,0 +1,117 @@
% Mirror/Atlas Book Template - Sci-Fi/Fantasy
% Inspired by Orbit/DAW book design
\documentclass[12pt]{memoir}
% Packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{microtype}
\usepackage{xcolor}
\usepackage{textcomp}
% Sci-fi trim (slightly wider)
\geometry{
paperwidth=5.5in,
paperheight=8.5in,
textwidth=4.25in,
textheight=7in,
inner=0.625in,
outer=0.5in,
bindingoffset=0.125in,
}
% Dark theme colors
\definecolor{atlasblue}{RGB}{0,47,87}
\definecolor{atlasgold}{RGB}{218,165,32}
% Hyperref
\hypersetup{
colorlinks=true,
linkcolor=atlasblue,
urlcolor=atlasblue,
}
% Fonts
\usepackage{mathptmx}
\usepackage[T1]{url}
% Chapter style - dramatic
\chapterstyle{dowding}
% Drop caps with color
\lettrinecolor{atlasblue}
\lettrineHeightLines=2
% Headers - minimal
\pagestyle{simple}
% Part style
\def\partnamefont{\normalfont\Large\scshape\MakeLowercase}
\def\parttitlefont{\normalfont\Huge\bfseries\color{atlasblue}}
% Metadata
\def\booktitle{$book_title$}
\def\bookauthor{$author$}
\def\bookdate{$date$}
\def\bookpublisher{$publisher$}
\begin{document}
% Half title - just title
\thispagestyle{empty}
\vspace*{2in}
{\Huge\scshape\booktitle}
% Title page - dramatic
\clearpage
\thispagestyle{empty}
\vspace*{1in}
\begin{center}
{\Huge\scshape\booktitle\par}
\vspace{0.5in}
{\Large by \bookauthor\par}
\vfill
{\large\scshape\bookpublisher}
\end{center}
% Copyright
\clearpage
\thispagestyle{empty}
\vspace*{\fill}
\begin{center}
Copyright \textcopyright\ \bookdate\ \bookauthor\\
\bigskip
All rights reserved.
\end{center}
\vspace*{\fill}
% Dedication
$if(dedication)$
\clearpage
\thispagestyle{empty}
\vspace*{3in}
\begin{center}
\textit{$dedication$}
\end{center}
$endif$
% Epigraph
$if(epigraph)$
\clearpage
\begin{center}
\textit{$epigraph$}
\end{center}
$endif$
% Contents
\clearpage
\tableofcontents
$body$
\end{document}
@@ -0,0 +1,97 @@
% Tufte-LaTeX Style - Side Note Layout
% Based on Edward Tufte's design principles
% http://www.tufte-latex.com/
\documentclass[nols]{tufte-book}
% Packages
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{microtype}
% KDP trim
\geometry{
paperwidth=6in,
paperheight=9in,
textwidth=4.5in,
textheight=7.5in,
inner=0.5in,
outer=0.5in,
marginparwidth=1.5in,
marginparsep=0.3in,
}
% Hyperref
\hypersetup{
colorlinks=true,
linkcolor=darkblue,
citecolor=darkblue,
urlcolor=darkblue,
}
% Fonts - use Minion if available, else fallback
\usepackage{mathpazo} % Palatino
\usepackage[T1]{url}
% Chapter style
\titleformat{\chapter}%
{\relax}{\thechapter}{0.5em}{\scshape\LARGE}
% Full width figure
\newenvironment{fullwidth}%
{\begin{fullwidth环境}}
{\end{fullwidth环境}}
% Sidenote command
% Usage: \sidenote{Your note here}
% Metadata
\def\booktitle{$book_title$}
\def\bookauthor{$author$}
\def\bookdate{$date$}
\begin{document}
% Title page
\thispagestyle{empty}
\begin{fullwidth}
\vspace*{1.5in}
{\Huge\scshape\booktitle\par}
\vspace{1in}
{\Large by \bookauthor\par}
\vfill
{\large\bookdate}
\end{fullwidth}
% Copyright
\clearpage
\thispagestyle{empty}
\vspace*{\fill}
\begin{fullwidth}
Copyright \textcopyright\ \bookdate\ \bookauthor\\
All rights reserved.
\end{fullwidth}
% Dedication
$if(dedication)$
\clearpage
\begin{fullwidth}
\vspace*{3in}
\begin{center}
\textit{$dedication$}
\end{center}
\end{fullwidth}
$endif$
% Contents
\clearpage
\tableofcontents
% Main
\mainmatter
$body$
\end{document}