diff --git a/opus_orchestrator/latex_compile.py b/opus_orchestrator/latex_compile.py index 2356884..02085f0 100644 --- a/opus_orchestrator/latex_compile.py +++ b/opus_orchestrator/latex_compile.py @@ -53,22 +53,27 @@ class LaTeXExporter: "kdp-large": "kdp-large.tex", # 8.5x11 workbook # Book Types - "novel": "novel.tex", # General fiction - "memoir": "memoir.tex", # Memoir/personal - "hardcover": "hardcover.tex", # Premium hardcover - "poetry": "poetry.tex", # Poetry collections - "childrens": "childrens.tex", # Picture books + "novel": "novel.tex", # Fiction + "memoir": "memoir.tex", # Personal narrative + "hardcover": "hardcover.tex", # Premium + "poetry": "poetry.tex", # Poetry + "childrens": "childrens.tex", # Picture books # Technical/Educational - "academic": "academic.tex", # Academic papers - "textbook": "textbook.tex", # With exercises - "journal": "journal.tex", # Workbooks/planners + "academic": "academic.tex", # Papers + "textbook": "textbook.tex", # With exercises + "journal": "journal.tex", # Workbooks + + # RPG/Game Books + "rpg-rulebook": "rpg-rulebook.tex", # Game system + "rpg-adventure": "rpg-adventure.tex", # Dungeon/Module + "cyoa": "cyoa.tex", # Choose Your Own Adventure # Specialty - "screenplay": "screenplay.tex", # Film/TV scripts + "screenplay": "screenplay.tex", # Film/TV # Base - "base": "base.tex", # Minimal template + "base": "base.tex", # Minimal } def __init__(self, template_dir: Optional[str] = None): diff --git a/opus_orchestrator/templates/latex/cyoa.tex b/opus_orchestrator/templates/latex/cyoa.tex new file mode 100644 index 0000000..bb014b0 --- /dev/null +++ b/opus_orchestrator/templates/latex/cyoa.tex @@ -0,0 +1,99 @@ +% Opus Orchestrator - CYOA/Interactive Fiction Template +% Choose Your Own Adventure, gamebooks + +\documentclass[12pt]{memoir} + +% Packages +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{graphicx} +\usepackage{hyperref} +\usepackage{geometry} +\usepackage{microtype} +\usepackage{xcolor} +\usepackage{tcolorbox} +\usepackage{ifthen} +\usepackage{enumitem} + +% Compact trim +\geometry{ + paperwidth=5.5in, + paperheight=8.5in, + textwidth=4in, + textheight=7in, + inner=0.5in, + outer=0.5in, +} + +% Hyperref +\hypersetup{ + colorlinks=false, +} + +% Fonts +\usepackage{mathptmx} + +% Chapter style +\chapterstyle{dowding} + +% Choice box +\newtcolorbox{choicebox}[1][]{ + colback=blue!10, + colframe=blue!75!black, + title=#1, + fonttitle=\bfseries, + parbox=false, +} + +% Page reference +\newtcolorbox{refbox}[]{ + colback=yellow!20, + colframe=yellow!75!black, + fonttitle=\bfseries, +} + +% Adventure choice +\newenvironment{choice} + {\begin{choicebox}{Choose Your Path}} + {\end{choicebox}} + +% Metadata +\def\booktitle{$book_title$} +\def\bookauthor{$author$} +\def\bookdate{$date$} + +\begin{document} + +% Title page +\thispagestyle{empty} +\begin{center} +\vspace*{1in} +{\Huge\bfseries\booktitle\par} +\vspace{1in} +{\Large by \bookauthor\par} +\vfill +{\large\bookdate} +\end{center} + +% Copyright +\clearpage +\thispagestyle{empty} +\vspace*{\fill} +\begin{center} +Copyright \textcopyright\ \bookdate\ \bookauthor\\ +All rights reserved. +\end{center} +\vspace*{\fill} + +% Start +\clearpage +\chapter*{Prologue} +\addcontentsline{toc}{chapter}{Prologue} + +$body$ + +% Endings section +\clearpage +\chapter*{Endings} + +\end{document} diff --git a/opus_orchestrator/templates/latex/rpg-adventure.tex b/opus_orchestrator/templates/latex/rpg-adventure.tex new file mode 100644 index 0000000..2958518 --- /dev/null +++ b/opus_orchestrator/templates/latex/rpg-adventure.tex @@ -0,0 +1,145 @@ +% Opus Orchestrator - RPG Adventure/Module Template +% Dungeon, campaign, one-shot adventures + +\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{multicol} +\usepackage{tcolorbox} +\usepackage{ifthen} +\usepackage{pdflscape} + +% Adventure trim (letter for tables/maps) +\geometry{ + paperwidth=8.5in, + paperheight=11in, + textwidth=6.5in, + textheight=9in, +} + +% Hyperref +\hypersetup{ + colorlinks=true, + linkcolor=darkred, +} + +% Fonts +\usepackage{mathptmx} + +% Chapter style +\chapterstyle{dowding} + +% Sidebar box +\newtcolorbox{sidebar}[1][]{ + colback=yellow!20, + colframe=orange!75!black, + title=#1, + fonttitle=\bfseries, + parbox=false, +} + +% Monster stat block +\newtcolorbox{monster}[1][]{ + colback=green!5, + colframe=green!75!black, + title=#1, + fonttitle=\bfseries, + fontupper=\small, +} + +% Treasure/hazard box +\newtcolorbox{treasure}[]{ + colback=gold!20, + colframe=gold!75!black, +} + +% Encounter box +\newtcolorbox{encounter}[1][]{ + colback=red!10, + colframe=red!75!black, + title=#1, +} + +% Map placeholder +\newcommand{\mapplaceholder}[1]{% + \begin{center} + \framebox{#1} + \textit{[Map Placeholder - #1]} + \end{center} +} + +% Landscape tables +\newenvironment{landscape-table} + {\begin{landscape}\begin{multicols}{2}} + {\end{multicols}\end{landscape}} + +% Metadata +\def\booktitle{$book_title$} +\def\bookauthor{$author$} +\def\bookdate{$date$} +\def\booklevel{Levels 1-4} +\def\bookenv{Tropical} + +\begin{document} + +% Title page +\thispagestyle{empty} +\begin{center} +\vspace*{0.5in} +{\Huge\bfseries\booktitle\par} +\vspace{0.5in} +{\Large An Adventure for \booklevel\par} +\vspace{0.5in} +{\large by \bookauthor\par} +\vfill +{\large\bookenv} +\end{center} + +% Back of title - stats +\clearpage +\thispagestyle{empty} +\begin{tcolorbox}[title=Adventure Summary] +\textbf{Genre:} Fantasy\\ +\textbf{Level:} \booklevel\\ +\textbf{Setting:} \bookenv\\ +\textbf{Time:} 4-6 hours +\end{tcolorbox} + +% Copyright +\clearpage +\thispagestyle{empty} +\vspace*{\fill} +\begin{center} +Copyright \textcopyright\ \bookdate\ \bookauthor\\ +All rights reserved. +\end{center} +\vspace*{\fill} + +% Table of Contents +\clearpage +\tableofcontents + +% Adventure content +\mainmatter + +$body$ + +% Appendix reference +\clearpage +\chapter*{Appendix A: NPCs} +\addcontentsline{toc}{chapter}{Appendix A: NPCs} + +\clearpage +\chapter*{Appendix B: Maps} +\addcontentsline{toc}{chapter}{Appendix B: Maps} + +\end{document} diff --git a/opus_orchestrator/templates/latex/rpg-rulebook.tex b/opus_orchestrator/templates/latex/rpg-rulebook.tex new file mode 100644 index 0000000..af7f1e9 --- /dev/null +++ b/opus_orchestrator/templates/latex/rpg-rulebook.tex @@ -0,0 +1,132 @@ +% Opus Orchestrator - RPG Rulebook Template +% Dungeons & Dragons, Pathfinder, generic RPG + +\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{multicol} +\usepackage{tcolorbox} +\usepackage{ifthen} + +% Standard RPG trim +\geometry{ + paperwidth=8.5in, + paperheight=11in, + textwidth=6.5in, + textheight=9in, + left=1in, + right=1in, + top=1in, + bottom=1in, +} + +% Hyperref +\hypersetup{ + colorlinks=true, + linkcolor=darkred, + urlcolor=darkblue, +} + +% Fonts +\usepackage{mathptmx} +\usepackage[T1]{url} + +% Chapter style +\chapterstyle{dowding} + +% Colored sections +\tcbset{ + ruleboxstyle/.style={ + colback=red!10, + colframe=red!50!black, + fonttitle=\bfseries, + }, +} + +% Stat block box +\newtcolorbox{statbox}[1][]{ + colback=blue!5, + colframe=blue!75!black, + title=#1, + fonttitle=\bfseries, +} + +% Monster stat block +\newtcolorbox{monsterstat}[1][]{ + colback=green!5, + colframe=green!75!black, + title=#1, + fonttitle=\bfseries, +} + +% Two-column for stats +\usepackage{multicol} +\def\columnseprulecolor{\color{gray}} + +% Metadata +\def\booktitle{$book_title$} +\def\bookauthor{$author$} +\def\bookdate{$date$} +\def\bookversion{$version$} + +\begin{document} + +% Title page +\thispagestyle{empty} +\begin{center} +\vspace*{1in} +{\Huge\bfseries\booktitle\par} +\vspace{0.5in} +{\Large\scshape A Roleplaying Game\par} +\vspace{1in} +{\Large by \bookauthor\par} +\vfill +{\large\bookdate\\ +Version \bookversion} +\end{center} + +% Copyright +\clearpage +\thispagestyle{empty} +\vspace*{\fill} +\begin{center} +Copyright \textcopyright\ \bookdate\ \bookauthor\\ +All rights reserved.\\ +\bigskip +This is a fictional work. Any resemblance to actual persons, living or dead, is coincidental. +\end{center} +\vspace*{\fill} + +% Table of Contents +\clearpage +\tableofcontents + +% Interior +\mainmatter + +$body$ + +% Back cover copy (optional) +\clearpage +\thispagestyle{empty} +\begin{center} +\vspace*{2in} +{\Large\bfseries\booktitle}\\ +\vspace{1in} +{\normalsize +\textit{An official publication for the ... game system.}}\\ +\vfill +{\small +Consult your local game store or retailer for dice, maps, and accessories.} +\end{center} + +\end{document}