Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \ifx\DidDefsEnvironment\undefined
- \def\DidDefsEnvironment{}
- %% ========================================
- %% Variables
- \newcommand{\booktitle}{Fallout: Equestria}
- \newcommand{\booksubtitle}{Versione italiana}
- \newcommand{\bookauthor}{Kkat}
- \newcommand{\bookpublisher}{TSEP}
- \newcommand{\bookpublished}{2011}
- \newcommand{\bookeditedyear}{2012}
- \newcommand{\bookedited}{\today}
- \newcommand{\bookedition}{1}
- \newcommand{\bookrevision}{1}
- \newcommand{\bookdedication}{}
- \newcommand{\publicationnumber}{3}
- %% ========================================
- %% Encoding & language support
- \usepackage[utf8]{inputenc} % Windows OS encoding
- \usepackage[T1]{fontenc}
- \usepackage[italian, english]{babel} % package for multilingual support
- \selectlanguage{italian}
- % set the font
- \usepackage[textlf]{Minion Pro}
- %\figureversion{tab}
- \usepackage[hypertexnames=false]{hyperref}
- \urlstyle{same}
- \hypersetup{pdfborder = {0 0 0}}
- % general packages
- \usepackage{fmtcount}
- \usepackage{xifthen}
- % make ligatures searchable
- \input glyphtounicode
- \pdfgentounicode=1
- \usepackage{xargs}
- % for ordinals
- \usepackage[super]{nth}
- % for customizing line spacing
- % \begin{spacing}{multiple-of-standard}
- \usepackage{setspace}
- % for customizing margin width
- % \begin{adjustwidth}{left margin}{right margin}
- \usepackage{changepage}
- %% ========================================
- %% Geometry settings
- \usepackage[a5paper,includehead,ignorefoot,ignoremp,
- inner=0.51in,outer=0.72in,top=0.45in,bottom=0.8in]{geometry}
- % remove headers from empty pages between chapters
- \let\origdoublepage\cleardoublepage
- \newcommand{\clearemptydoublepage}{%
- \clearpage
- {\pagestyle{empty}\origdoublepage}%
- }
- \let\cleardoublepage\clearemptydoublepage
- %% ========================================
- %% Basic typography (ellipsis, dashes, paragraph spacing…)
- % use americal style for paragraphs = no indent and spacing between paragraphs
- \usepackage{parskip}
- \usepackage[xspace]{ellipsis} %xspace puts auto space after \dots
- \setlength\parskip{10pt plus 3pt minus 3pt}
- \widowpenalty=5000
- \clubpenalty=5000
- %% ========================================
- %% Kerning and Tracking
- %\frenchspacing
- \usepackage[activate={true,nocompatibility},final,
- tracking=true,kerning=true,spacing=true,
- factor=1100,stretch=10,shrink=10]{microtype}
- % activate={true,nocompatibility} - activate protrusion and expansion
- % final - enable microtype; use "draft" to disable
- % tracking=true, kerning=true, spacing=true - activate these techniques
- % factor=1100 - add 10% to the protrusion amount (default is 1000)
- % stretch=10, shrink=10 - reduce stretchability/shrinkability (default is 20/20)
- % kerning
- \SetExtraKerning[unit=space]
- {encoding={*}, family={*}, series={*}, size={footnotesize,small,normalsize}}
- {\textemdash={300,300}, % en-dash, add more space around it
- %\textendash={400,400}, % en-dash, add more space around it
- "28={ ,150}, % left bracket, add space from right
- "29={150, }, % right bracket, add space from left
- %\textquoteright={150,},
- \textquotedblleft={ ,50}, % left quotation mark, space from right
- \textquotedblright={150, } % right quotation mark, space from left
- }
- % tracking
- \SetTracking{encoding={*}, shape=sc, size={normalsize, small}}{75}
- \SetTracking{encoding={*}, shape=sc, size={huge, Huge}}{-50}
- \SetTracking{encoding={*}, shape=sc, size={large}}{-30}
- % locally disable kerning
- \newcommand{\dk}[1]{%
- \microtypesetup{kerning=false}%
- #1%
- \microtypesetup{kerning=true}%
- }
- % extra kerning for pairs y'd and e'd
- \newcommand{\ed}{e{\kern0.2pt}'{\kern-1.2pt}d\xspace}
- \newcommand{\yd}{y{\kern0.32pt}'{\kern-1.0pt}d\xspace}
- % if we need to squeeze the line down a bit, we can temporarily adjust the word spacing.
- \newdimen\origiwspc% set up new dimension
- \origiwspc=\fontdimen2\font% save original spacing
- % #1 size
- % #2 text
- \newcommand{\squeeze}[2]{%
- \fontdimen2\font=#1% inter word space
- #2%
- \fontdimen2\font=\origiwspc% (original) inter word space
- }
- \newcommand{\sq}[1]{%
- \squeeze{0.45ex}{#1}%
- }
- %% ========================================
- %% New enviroments
- \newenvironment{simpleScreenplay}%
- {\begin{adjustwidth}{0.7in}{0.7in}\begin{center}\tt\ignorespaces}%
- {\end{center}\end{adjustwidth}\ignorespacesafterend}
- \newenvironment{letter}%
- {\begin{adjustwidth}{0.3in}{0.3in}\ignorespaces}%
- {\end{adjustwidth}\ignorespacesafterend}
- \fi % \DidDefsEnvironment
- %% ========================================
- %% customizing the sectioning elements
- \usepackage[pagestyles,toctitles]{titlesec}
- %% ========================================
- %% FRONT
- \newcommand{\FrontStuff}{%
- \BookTitlePage
- \BookCopyrightPage
- % Not every book carries a dedication but, for those that do, it follows the copyright page.
- \BookDedicationPage
- \microtypesetup{protrusion=false}
- \PrintChapterfalse
- \begin{spacing}{0.96}
- \tableofcontents
- \end{spacing}
- \microtypesetup{protrusion=true}
- \clearpage
- % Usually a short piece written by someone other than the author, the Foreword may provide a context for the main work. Remember that the Foreword is always signed, usually with its author's name, place, and date.
- \BookForewordPage
- % Written by the author, the Preface often tells how the book came into being, and is often signed with the name, place and date, although this is not always the case.
- \BookPrefacePage
- % The author expresses their gratitude for help in the creation of the book.
- \BookAcknowledgementsPage
- % The author explains the purposes and the goals of the work, and may also place the work in a context, as well as spell out the organization and scope of the book.
- \BookIntroductionPage
- }
- \newcommand{\BookTitlePage}{%
- \thispagestyle{empty}
- \begin{center}
- \phantom{a}
- {\vskip 2em}
- {\Huge\sc\booktitle}
- {\vskip 0pt}
- {\small\booksubtitle}
- {\vskip 3em}
- {\Large\bookauthor}
- \par\vfill
- {\bf\large\bookpublisher, \bookeditedyear}
- \end{center}
- \newpage
- }
- \newcommand{\BookCopyrightPage}{%
- \thispagestyle{empty}
- \emph{This book is a work of fiction. Names, characters, places and incidents are products of the author’s imagination or are used fictitiously. Any resemblance to actual events or locales or persons, living or dead, is entirely coincidental.}
- \par\vfill
- Copyright \copyright\ \bookpublished\ by \bookauthor
- ``My Little Pony: Friendship Is Magic'' is the property of Hasbro, Inc.
- All other borrowed and referenced works are the property of their respective copyright holders.
- Original characters and story belong to \bookauthor.
- This work is of non-commercial character and for personal use only.
- \par\vfill
- Edited and typeset by ``TSEP'' in year 2012 as their \nth{\publicationnumber} work. Typeset using free system \LaTeX.
- Supervising editor: Twilight Sparkle.
- \selectlanguage{english}
- \nth{\bookedition} edition, \nth{\bookrevision} revision. \bookedited
- \selectlanguage{italian}
- \newpage
- }
- \newcommand{\BookDedicationPage}{%
- \ifthenelse{\NOT\equal{\bookdedication}{}}{
- \thispagestyle{empty}
- \vspace*{\fill}
- \begin{center}
- \emph{\bookdedication}
- \end{center}
- \vspace*{\fill}
- \cleardoublepage
- }
- {}
- }
- \newcommand{\BookForewordPage}{%
- \thispagestyle{empty}
- }
- \newcommand{\BookPrefacePage}{%
- \thispagestyle{empty}
- }
- \newcommand{\BookAcknowledgementsPage}{%
- \thispagestyle{empty}
- {\LARGE Ringraziamenti}
- \vskip1em
- Ecco l'elenco, in ordine cronologico, di chi ha contribuito alla traduzione anche solo per una pagina: belinde, Starshine, Kraff, Sidero, ThePreserver, Akay, Valid95, thefrecciablu, Rufus Loacker, HellDiver, Otaku220k
- }
- \newcommand{\BookIntroductionPage}{%
- \thispagestyle{empty}
- }
- %% \newcommandx{\mypartest}[3][1=,2=]{
- %% \ifthenelse{\isempty{#1}}{One is empty}{One is set}
- %% \ifthenelse{\isempty{#2}}{Two is empty}{Two is set}
- %% {#3}
- %% }
- %% ========================================
- %% BACK
- \newcommand{\BackStuff}{%
- \newgeometry{ignorehead,ignorefoot,ignoremp,
- inner=0.55in,outer=0.74in,top=0.6in,bottom=0.8in}
- \BookEditorsNotePage
- }
- \newcommand{\BookEditorsNotePage}{%
- \phantomsection
- \addcontentsline{toc}{chapter}{\protect\numberline{}Editor's notes}
- {\LARGE Editor's notes}
- \vskip1em
- {\Large On viewing on computer}
- The book is set using the ``two-side'' mode. That means it recognizes odd (recto—right) and even (verso—left) pages. It is therefore recommended to turn on ``two-side mode'' in your favorite PDF viewer.
- In Foxit Reader, version 3.3, this is done by: `View' $\rightarrow$ `Page Display' $\rightarrow$ `Show Cover Page During Facing' and then `View' $\rightarrow$ `Page Display' $\rightarrow$ `Continuous Facing'
- If you use different software, use Internet search engine to find the information on how to turn these options on.
- \vskip0.2em
- {\Large On printing and page design}
- Please note that the page layout of this book does not take into account the width of the paper needed for binding. Depending on the binding technique you would like to use, you might need to print on larger paper (i.e. wider), and offset the pages from the center to the sides. If you are not sure, contact some professional first.
- The geometry of the pages is standard ``a5paper'' size from the \LaTeX\ package ``geometry''. That means you can print it on a regular home printer, 4 pages will fit on one ISO A4 paper. You might need to adjust the order first, depending on your printer brand. Do a test print first!
- Geometry settings: includehead, ignorefoot, ignoremp, inner=0.51in, outer=0.72in, top=0.45in, bottom=0.8in.
- \vskip0.2em
- {\Large On errors and mistakes}
- If you find \emph{any} errors or mistakes concerning \emph{style}, please let us know. We value any input, however small. We generally do not do proofreading, contact the author about that. We will not change any parts of the actual story without her permission.
- }
- %% ========================================
- %% CHAPTERS
- % set the chapter/nochapter toggle
- \newif\ifPrintChapter
- \newif\ifPrintSpecialChapter
- \PrintSpecialChapterfalse
- \PrintChapterfalse
- % use words for chapter numbers
- \newcommand{\thechapternum}{\Numberstring{chapter}}
- % #1: chapter quote/foreword
- % #2: chapter name
- \newcommand{\normalchapter}[2][]{%
- \ifthenelse{\isempty{#1}}%
- {\chapter{#2}}
- {\chapter{#2}
- \begin{center}
- {\vskip-3.0em}
- \emph{#1}
- {\vskip1.2em}
- \end{center}}
- }
- % #1: full chapter name
- % #2: short chapter name
- \newcommand{\normalchapterx}[2]{%
- {\chapter[#2]{#1}\vskip2em}
- }
- % #1: “type” (prologue, epilogue, afterword…)
- % #2: chapter name
- \newcommand{\specialchapter}[2][]{%
- \ifthenelse{\isempty{#1}}
- {\phantomsection
- \addcontentsline{toc}{chapter}{\protect\numberline{}#2}}
- {\phantomsection
- \addcontentsline{toc}{chapter}{\protect\numberline{}#1: #2}
- \PrintChaptertrue
- \PrintSpecialChaptertrue
- \def\specialChapterName{#1}}
- \chapter*{#2}
- \PrintSpecialChapterfalse
- %\markboth{\sc \booktitle---Part \thepart}{\sc #2}
- \ifthenelse{\isempty{#1}}
- {\chaptermark{\sc#2}}
- {\chaptermark{\sc#1---#2}}
- }
- \def\specialChapterName{asdasd}
- \def\cStyle {\large}
- \titleformat{\chapter}[block]{
- \centering\sc}{}{0em} %\usefont{T1}{Myriad-LF}{}{n}\selectfont
- {\thispagestyle{chapterhead}
- \ifPrintChapter
- \ifPrintSpecialChapter
- \cStyle \specialChapterName %\\% image here
- \else
- \cStyle \chaptername\ \textls*[100]{\thechapternum} %\\% image here
- \fi
- \else
- \cStyle \phantom{\chaptername}
- \fi
- {\vskip -0.2em}
- \huge}
- \titlespacing{\chapter}{0pt}{*0}{*7}
- %% ========================================
- %% SCENE BREAK
- % scene break
- \makeatletter
- \newcommand{\Scene}{%
- \par\nobreak\@afterheading
- \vspace{\topsep}
- \addvspace{\topsep\relax}
- \noindent\hfil%
- {{\fontsize{2\dimexpr\f@size}%
- \z@{* * *}}}% \cleffont{𝄞}
- \hfil\par%
- \vspace{\topsep}
- % \addvspace{\topsep\relax}
- \@afterindentfalse\@afterheading%
- }
- \makeatother
- %% ========================================
- %% Headers & new chapter placing
- %% \usepackage{fancyhdr}
- %% \pagestyle{fancy}
- %% % no rule under the header
- %% \renewcommand{\headrulewidth}{0pt}
- % define the left/right mark style
- %% \renewcommand{\chaptermark}[1]{%
- %% \markboth{\sc \booktitle---Part \thepart}{\sc \chaptername\ \thechapternum --- #1}}
- %% % set the style for head/foot
- %% \fancyhf{}
- %% \fancyhead[CE]{\rightmark}
- %% \fancyhead[CO]{\leftmark}
- %% \fancyhead[LO]{\thepage}
- %% \fancyhead[RE]{\thepage}
- \setmarks{part}{chapter}
- \renewpagestyle{plain}{%
- \sethead{}{}{}
- \setfoot{}{}{}
- }
- \newpagestyle{chapterhead}{%
- \sethead{}{}{}
- \setfoot{}{\thepage}{}
- }
- \newpagestyle{main}{%
- \sethead
- [\thepage]
- %[\sc \booktitle\ifthepart{---Parte \thepart}{}]
- [\sc \booktitle\ifthenelse{\isempty{\thepart}}{}{---Parte \thepart}]
- []
- {}
- {\sc \ifthechapter{\chaptername\ \thechapternum ---}{}\chaptertitle}
- {\thepage}
- }
Advertisement
Add Comment
Please, Sign In to add comment