Pages

Wednesday, August 10, 2011

Haruhi novels 9-11 omnibus in LaTeX

The Dissociation & The Surprise of Haruhi Suzumiya, omnibus edition in LaTeX

I've been working on this for a little while now, slowly tearing apart the PDFs and EPUBs put together by ultimatemegax and other translators. I thought this would be a fun way to put these three books, which comprise an arc in an of themselves, together and to learn a little more about LaTeX. Let me say, the ins and outs of character encoding are "fun" in the not-so-fun sort of way. Even so, after saving images by hand out of the PDFs and messing with changing smart quotes to LaTeX style, I have a finished product. It's not perfect, I'm sure. There are probably lots of things I've missed, particularly with peculiarly-formatted text. That said, it's workable and I can always put in a revision.

The contents of the main file are below. The full text is put into various subdocuments.

\documentclass[ebook, 10pt, openany]{memoir}
\usepackage{fourier}
\usepackage[pdfpagelayout=TwoColumnRight]{hyperref}
\usepackage[calcwidth,nobottomtitles*]{titlesec}
\usepackage{graphicx}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{CJK}
\usepackage{latexsym}

\newcommand{\pbreak}{\pfbreak}
\renewcommand{\chaptermark}[1]{\markboth{\textsc{The Dissociation} \& \textsc{The Surprise of Haruhi Suzumiya}}{\textsc{#1}}} %customizes headers
\renewcommand{\sectionmark}[1]{} %prevents sections (alpha-# and beta-#) from changing headers
\newcommand{\qs}{~}

\renewcommand{\verbatimbreakchar}{} %used for yuki.n> terminal sequences, allows verbatims to wrap with no indicator

\begin{document}
\frontmatter

\title{The Dissociation \\ \& \\ The Surprise of Haruhi Suzumiya}
\author{By Nagaru Tanigawa \\ with Illustrations by Noizi It\=o}
\date{May 25, 2011}
\maketitle{}
\wrappingon{} %verbatim wrapping
\newpage{}
\setcounter{tocdepth}{0} %toc reads unnumbered; better than using chapter* and manually adding toc entries
\tableofcontents{}
\newpage{}
\sloppy{}
\include{ds-translators}

\include{ds-notes}

\mainmatter{}

\setcounter{secnumdepth}{-2} %nothing numbered

\newpage{}
\include{ds-dis} %contains the full-color images before the main text, etc.
\include{ds00}
\include{ds01}
\include{ds02}
\include{ds03}

\include{ds-sur1}
\include{ds04}
\include{ds05}
\begin{CJK*}[dnp]{EUC-JP}{min} %chapter 6 has japanese characters, requires CJK package and proper encoding of the .tex file (in this case, euc-jp)
\include{ds06}

\include{ds-sur2}
\include{ds-07-12}
\end{CJK*}
\end{document}

No comments: