Code Monkey home page Code Monkey logo

hpmor's Introduction

Harry Potter and the Methods Of Rationality

https://github.com/rrthomas/hpmor Maintainer: Reuben Thomas [email protected]

A LaTeX version of the popular didactic fan-fiction by Eliezer Yudkowsky, which can make e-books in PDF, ePub and Mobi formats, and six PDF volumes that can be printed and bound. There are also dust jackets for the printable volumes.

See latest release for PDF and e-book downloads.

TeXLive 2015 or later and git are required to build the book. (Note: the book must be built from a git checkout.)

Note: the Omake Files chapters (11 and 64) have been moved to the end of the single-file PDF. Those chapter numbers are omitted in the text, so chapter 10 is followed by chapter 12, for example. In the six-volume PDFs, all chapters are renumbered to start from 1 at the start of a book, and there are no appendices. Some epigraphs have been omitted but are in the source files of the chapters.

Files

  • hpmor.tex - the main file
  • layout/hp-format.tex - mostly sets up memoir
  • layout/hp-markup.tex - logical markup commands used in the text
  • chapters/ - one file per chapter, included from hpmor.tex and the individual volumes hpmor-N.tex.
  • spelling-list.txt - a list of words used to spell-check the book.
  • fonts/ - various fonts used
  • latexmkrc - configures latexmk to run LaTeX to build the PDFs.
  • GNUMakefile - contains targets to make a Zip of the PDFs and release them to GitHub. (Mostly of interest to project maintainers.) make all does the same as latexmk (see below), which may be useful for editor integration (e.g. Emacs).
  • scripts/ebook/ - e-book generation scripts

Building the book(s)

If you do not want to install all requirements on your native system, you can run the build in a Docker container instead. See bottom of Dockerfile for further info.

  • latexmk: Build all PDFs. (If in doubt, just run this command and do something else for twenty minutes!)
  • make all: Build a Zip of the PDFs.
  • latexmk hpmor: Build the one-volume PDF hpmor.pdf
  • latexmk hpmor-N: Build one of the six individual volumes hpmor-1.pdf to hpmor-6.pdf.
  • latexmk layout/hpmor-dust-jacket-N: produce the dust jacket for Volume N, hpmor-dust-jacket-N.pdf. Note that this requires the corresponding volume, hpmor-N.pdf, to have been built first.
  • latexmk -c: Remove files produced by building (except PDFs).
  • latexmk -C: Remove files produced by building (including PDFs).

By default, the dust jackets assume 80gsm plain paper (this affects the thickness of the book and hence the size of the dust jacket). This can be configured in layout/hp-paper-type.tex; see layout/papers.tex for a list of papers.

The exact sizes of dust jackets may vary; the current parameters were taken from a commercial printer. They can be adjusted in hp-dust-jacket.tex as desired.

Note that the back dust-flap is left for you to add your own text; edit layout/hp-dust-jacket.tex and search for “PUT YOUR BACK DUST-FLAP TEXT HERE!”. Make sure you remove the percent sign % at the start of the line, or your text will not be printed. (This is a safety feature to make sure that if you don’t change the text, the placeholder will not appear; instead, you’ll just get a blank back flap.)

When producing a book with a dust jacket, you may well not want the front cover as well. To suppress the front cover, use the following incantation:

latexmk -norc -e '$options="nocover"' -r latexmkrc -g hpmor-1

Of course, you can replace hpmor-1 with any other volume, or leave it out to generate all PDFs with no cover.

To build a single chapter, from the chapters directory use the command:

latexmk -norc -e '$chapter="N"' -r ../latexmkrc -g hpmor-chapter-NNN

Similarly, to build a single appendix or other non-chapter section, from the top directory use the command:

latexmk -norc -e '$chapterfile="FILENAME"' -r latexmkrc -g FILENAME

Contributing

Contributions are most welcome. These fall into the following categories:

  1. Textual corrections (where the text differs from the online original unintentionally).
  2. Textual improvements: fixing straight-up errors in the English (or deeper, the sense, story etc.), or “Britfixing”, i.e. replacing non-British usages.
  3. Design and typography. Improvements to both the PDF and print versions of the books are encouraged. See the GitHub bug-tracker for known issues; also, search the sources for “FIXME”.
  4. Translations. Translations are of course most welcome! A list of known translations and one or two hints are given below in the next section.

For textual changes other than simple typo or language fixes, please familiarise yourself with the style guide (below).

The preferred way to submit any improvement is as a GitHub pull request. Textual corrections can also be submitted as issues in the issue tracker, or by email to the maintainer.

For the GitHub URL, and email address of the maintainer, see above.

Style guide

Spelling

When spell-checking, use spelling-list.txt instead of your personal dictionary, so the results are less dependent on your setup. (The system dictionary can still of course vary from one setup to another.)

Words that are standard English or part of the Harry Potter universe, or are otherwise of “global” relevance should be added to spelling-list.txt. Exclamations (“Eeeehhhh”) and other one-offs should be added to the per-file word lists. (There’s obviously something of a grey area in the middle, e.g. one-off references to various real and fictional people.)

Emacs users benefit from a .dir-locals.el that automatically sets up spelling-list.txt as the personal dictionary for all HPMOR files.

Chapter headings

Chapters that aren’t part of a continuing series look like this:

\chapter{The Fundamental Attribution Error}

Chapters that are part of a continuing series look like one of these:

\partchapter{Working in Groups}{I}

\namedpartchapter{Self-Actualization}{SA}{VIII}{The Sacred and the Mundane}

The first is pretty simple; it’s just the title of the chapter followed by which part it is.

The second looks like the title of the chapter, then the abbreviation for the title of the chapter, then the part, then the title of the part.

First sentences

Normally, a chapter starts like this:

\lettrine{P}{adma} Patil had finished

That creates the large initial letter.

If the first paragraph of the chapter is all italics, though, it looks like this:

\begin{em}\lettrine{T}{he} red jet of fire took Hannah full in the
[...]
blazing green spirals brought down their foe’s Shield Charm.\par\end{em}

Sections

\section{Final Aftermath:}

Miscellaneous

There are some other things relating to newspaper headlines and such; check the chapters they appear in for the appropriate markup.

Markup

These are macros defined in layout/hp-markup.tex. You should glance through that file to see what commands are available, and use them instead of direct markup; for example \shout rather than \textsc.

Translations

To translate the book, it is recommended to fork this repository, and check back from time to time for updates. Also, do open an issue or PR against this file to add the translation!

It is recommended to use polyglossia (not babel).

Known translations

Note: there are other translations of HPMOR; here are listed only translations of this edition.

hpmor's People

Contributors

agentfire avatar aleksandar-j avatar bogdanb avatar capzlock avatar colinpitrat avatar danielshahaf avatar dcorderoch avatar domenic avatar entorb avatar fefrei avatar gjum avatar menacingperson avatar rjl20 avatar rrthomas avatar serpod avatar wfdewith avatar yekcim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hpmor's Issues

Wrong quotation mark

”So it was you the Sorting Hat was
warning me about!” has a closing quotation mark at the beginning.

error on latexmk on 008 and 009

latexmk -norc -e '$chapter=008' -r ../latexmkrc -g "hpmor-chapter-008"

Latexmk: Stopping because executing following code from command line
    $chapter=008
gave an error:
    Illegal octal digit '8' at (eval 9) line 1, at end of line

Book is ok, chapter 1 to 7 are ok, 10 or 13 are ok too. For Chapters 8 and 9 I have this error on my computer.

Add 6 separate PDFs and add volume title into complete PDF

I suggest adding the creation of the 6 part/volume pdfs to the release pipeline. Currently, people browsing to the release page do not know that these printable volumes exist.

Furthermore, I suggest adding this 6-volume structure into the complete PDF, for example using
\part{Harry James Potter-Evans-Verres and the Methods of Rationality}
\part{Harry James Potter-Evans-Verres and the Professor's Games}
...
or similar.
So that in the table of contents and at the start of each part/volume the volume title is displayed.
In the e-book version I already did so.

When I first read the book, I did not realize this substructure and upon realization I very much liked it.

Opensource license for a book?

Hello!

I know this is not a repository of Eliezer Yudkowsky.

But maybe there is any possibility to publish the book under any opensource license, like "Creative commons attribution share-alike" (like the Wikipedia)? If yes, then for example it will be legally to do "forks" and translations without asking special permission.

Please add @entorb as collaborator

Hi @rjl20, please could you invite @entorb to be a collaborator? As well as the German translation and ePub conversion he's doing a lot of good work on the general presentation and it's got to the point where it seems a needless roadblock for me to have to review everything he's doing.

At the same time, he points out it might also be useful to grant me the ability to administer the repo, simply to increase the bus factor. I would be quite happy to have that responsibility if you think it's appropriate.

Missing line break in chapter 13

From the source of chapter 13:

Then he pulled out the drawer.
\begin{align*}\intertext{\scshape \centering
Opportunities to do good are everywhere\\
but darkness is where the light needs to be}
\hbox{\scshape Cost of question: }&\hbox{\scshape 1 point}\\
\hbox{\scshape Current points: }&\hbox{74}\\[1.5ex]
\multicolumn{2}{c}{\scshape Nice underwear}\\
\multicolumn{2}{c}{\scshape Did your mother pick them out?}\\
\end{align*}

This renders fine in the PDF – but in the MOBI version (as rendered by my Kindle), “darkness is where light needs to be Cost of question” ends up in one line. I guess the converter script isn't fully aware of what \intertext is doing?

dash harmonization

in

The boy’s expression grew more intense. “This is a game based on a famous experiment called the 2-4-6 task, and this is how it works. I have a \emph{rule}—known to me, but not to you—which fits some triplets of three numbers, but not others. 2-4-6 is one example of a triplet which fits the rule. In fact…let me write down the rule, just so you know it’s a fixed rule, and fold it up and give it to you. Please don’t look, since I infer from earlier that you can read upside-down.”

we find "2-4-6" using "minus" as dash.

in

“4–6–8” said Hermione.

we find "4–6–8" using a "mid-length" dash

in most other cases the "—" "em dash" is used.

What is the rule of when to apply the "mid-length" dash? Is it also used between words, or only between numbers? Would be nice to harmonize it.

Produce an ebook

Rather than try to sync corrections to the text with other versions, it's probably easier to make the LaTeX sources work with a converter like pandoc.

Currently they don't. It would be good to work out how hard fixing them would be.

emph has no effect

I try to complile (only chapter one actually) and emph{} has no effect.

I don’t know if that’s a good idea but I forked your project for a french translation → https://github.com/yeKcim/hpmor. Thanks a lot for this LaTeX release.

Relative to TL2014, datetime2.sty and tracklang.sty should be added

README.md doesn't specify what the expected baseline for building hpmor is; it would seem fair to assume at most the most recent release of TeXLive. As far as I can see, both the above-mentioned packages have been added since then.

README.md says somewhat misleadingly that the pkg directory contains packages that "might be tricky to find". Of the packages in that directory, two are easy-peasy (microtype 2.5a, as shipped in TL 2014, and lettrine 1.64, which is older than the 1.70 shipped in TL 2014) and one is well-nigh impossible (ucntn.sty I cannot find in TeXLive, CTAN or anywhere else except in this project).

Would you accept a patch that a) specifies what the baseline requirements are for building hpmor; b) removes microtype & lettrine, assuming that they are part of the baseline; and c) adds the two above-mentioned packages?

(Both datetime2 and tracklang are available in TeXLive 2015, so once that is released and considered widely-available enough to become the baseline, if you think suitable, then those two packages could be removed again.)

letter in chapter 7

Why don't you use writtenNote/letterAddress in chapter 7 (2 letters at the end) like in chapter 1 ?

several \parsel{} are missing

in chapter 52 and 53 (at least), some parsel dialogs are in \emph{} instead of \parsel{}

(I will probably submit a PR later, but I wanted to warn)

proposal: small restructuring the source tree

I propose a small restructuring of the source tree:
*.png & *.pdf -> images/ dir
*.tex -> layout/ dir (or better name)

only keeping the hpmor.tex and the hpmor-*.tex in the root dir

Parseltounge em dashes are left as ---

I only noticed this in book 5 since I re-downloaded it after the new font, but I imagine that it's in all the books now.

Two places I actually noted down as I went were page 161 ("intent---who") and page 204 ("would you not---"). Hopefully that's enough to go on.

Collection of minor issues with the E-Book translation

Here's a set of minor issues I noticed with the E-Book:

  • Chapter 17:

    And if Paper-2 said 997$\times$997, Harry would leave Paper-1 blank.
    

    The parser translates \times to ×, but leaves the $ in.

  • Chapter 19:

    You will not be hurt and neither will I\@.
    

    The parser translates the \@ into a space.

  • Chapter 21:

    \begin{enumerate}[A.]{
    

    The e-book uses 1., 2. etc. for numbering, which would be fine… but the text after the list talks about items A through D.

  • Chapter 27:

    Mr~Carl Sloper
    

    With the way the Kindle renders it, when making the lines justified, the space protected space isn't stretched, which looks weird. I don't know whether this is a Kindle weirdness or the MOBI file could represent this better.

  • Chapter 58:

    we were to rescue a woman, you and I\@. You tried to slay the protector man
    

    Somehow, in the E-Book, this reads as we were to rescue a woman, you and I . You tried to slay the protector man.

  • Chapter 78:

    the most powerful wizard in the world \&c
    

    In the E-Book, this is typeset as „world &c.“

  • Chapter 86:

    the sum over all possible excuses would be more than $.01$
    
    $2 + 2 = $…
    

    These $ signs do make it into the E-Book.

All these were found in the MOBI version, downloaded about a month ago – sorry about the noise if they have been fixed in the meantime :-)

Add \think macro

Along the lines of \shout etc. (Currently, thoughts are highlighted with \emph.)

Author's intro and chapter opening quotations

Author's introduction

The official version at https://www.hpmor.com/chapter/1 starts with these author's notes:

This is not a strict single-point-of-departure fic - there exists a primary point of departure, at some point in the past, but also other alterations. The best term I've heard for this fic is "parallel universe".

The text contains many clues: obvious clues, not-so-obvious clues, truly obscure hints which I was shocked to see some readers successfully decode, and massive evidence left out in plain sight. This is a rationalist story; its mysteries are solvable, and meant to be solved.

The pacing of the story is that of serial fiction, i.e., that of a TV show running for a predetermined number of seasons, whose episodes are individually plotted but with an overall arc building to a final conclusion.

The story has been corrected to British English up to Ch. 17, and further Britpicking is currently in progress (see the /HPMOR subreddit).

All science mentioned is real science. But please keep in mind that, beyond the realm of science, the views of the characters may not be those of the author. Not everything the protagonist does is a lesson in wisdom, and advice offered by darker characters may be untrustworthy or dangerously double-edged.

I suggest including them in the PDF, just excluding the probably outdated part about the British English correction.

Opening quotations

Chapter 1 opens with this nice quote

Beneath the moonlight glints a tiny fragment of silver, a fraction of a line...

(black robes, falling)

...blood spills out in litres, and someone screams a word.

Chapter 2 opens with the quote
"Of course it was my fault. There's no one else here who could be responsible for anything."

Most chapters up to Chapter 18 also have some opening quote.

I would like to add them to the PDF as well.

Author's funny comments

Comments like

#include "stddisclaimer.h"

are found above the quotations. I suggest not to include those.

Add \spell macro

currently some spells are in single quotations marks, others are in \emph...
Maybe even use a different font?

Allow text to be marked exempt from spell-checking

Currently, each file has its own local words list. Instead, use a project-wide dictionary.

Also, find some way to mark one-offs "sic" (e.g. "Eeehhhh", foreign words) so that they don't need to be even in the per-file list.

Are you still interested in maintaining this?

My PR #10 has grown: I've undertaken quite a bit of tidy-up of the LaTeX, and also intend to add many "Brit-fixes" to the text that I noted while reading the book.

So, @rjl20, if you're still interested in maintaining the project, I'm happy to make the work into a series of PRs that can be discussed and applied as you see fit; for the moment I'm just pushing everything to my fork, so the PR is now rather mis-described!

chapter 109, missing character -

Parseltongue font doesn’t have "-" character. That's a problem in chapter 109: "an intent—who knowss?"

I’ve just add it in my fork (yeKcim@95c41b3).

Is there a way to git pull this commit in your repository easiest than: git checkout my english branch, git add, git commit, git push, pull request?

You should open the dialogues as many times as you close them

some chapters have more (or less) than (002, 005, 006, 007, 008,009, 015, 017, 018, 019, 021, 022, …, 062, 064, 071, 072, 075, 077, 078, 079,…)

I checked for { and }, nothing to report

I used this command:

for f in *.tex; do {
    printf "$f\n " ;
    grep -o "" $f | wc -l ;
    grep -o "" $f | wc -l ;
    printf "\n"
}; done

Alignment with French version by yeKcim

In https://github.com/yeKcim/hpmor the titlepage, fonts and probably quite some "under the hood" functions have been tuned. I suggest to adept these improvements.

I am currently considering implementing a German LaTeX version, hence it would be nice to have the "old" EN master and the "new and fancy" FR version aligned, so I won't need to cherry pick ;-)

@yeKcim: Could you please enable the GitHub issues feature in your Repo or provide another way of contacting you?

To discuss: parsel font vs. parselify

I find the mixing of fonts introduced by the new (and quite nice looking parsel font) a bit disturbing and suggest to revoke the \parsel command to the old markup of

\newcommand\parsel[1]{\parselify{#1}{\ptsansi\parssselstring}}

Produce Parseltongue automatically

Make a macro to double the s's. Then it can be written and spell-checked normally.

Rule for generating Parseltongue: every run of s's has an extra one added.

consider Daystar's remix of HPMoR ch1-4 for smoother entry

since the starting is not as polished as the later writing (and the serial web release format did not allow the author to go back and revise the start like before a typical book release [edit: actually it was revised several times throughout the project])...

one thing that i often recommend is starting with the daystareld.com revisions to ch1-4 https://www.fanfiction.net/s/9676374/1/Daystar-s-Remix-of-HPMOR and then continuing from there.

(i wish someday the hpmorpodcast.com would use these to rerecord the first 4 kinda awkward original chapters as well)

nested emphs broken

Test:
\emph{emph1 emph1 \emph{emph2 \emph{emph3} emph2} emph1}
Expectation:
emph1 emph1 emph2 emph3 emph2 emph1

Restult:
emph1 emph1 emph2 emph3 emph2 emph1

reach out to Eliezer and ask him to update the links to the latest PDF and e-book files

At
https://www.hpmor.com/
the links to the PDF, EPUB and MOBI versions should be updated to
https://github.com/rjl20/hpmor/releases/latest/

Does anyone have a way of contacting Eliezer for asking him to perform this update?

Furthermore, since at https://www.hpmor.com/ there are download links for the 6 volumes, you might consider generating PDFs for those in the release-pipeline as well. For the e-book formats, I do not think this is necessary.

Version numbering

Please consider adding some sort of revision numbering note somewhere in the resulting book (it can be discreet), so that one can relate which version of the source was used to produce a PDF or EPUB, etc.

The last page looks like a good place to do it, since you lack the library index and publishing information page at the start of the book.

Ellipsis Typography

It was my understanding that ellipsis should have a space after them in English. I am mistaken?

E.g.

“What lay ahead of her… would be no easier, certainly, and might well be harder.”

instead of

“What lay ahead of her…would be no easier, certainly, and might well be harder.”

Hyphenation of "McGonagall"

In chapter 86, page 1420 of the PDF, Professor McGonagall's name is hyphenated as "McG-onagall". I don't know what the correct hyphenation is, but that looks wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.