├── .dir-locals.el ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── sonstiges.md └── workflows │ ├── check-and-ebook.yml │ ├── make-pdf-1-select.yml │ ├── make-pdf-6-parallel.yml │ ├── make-pdf-all-serial.yml │ └── make-pdf-test.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .python-version ├── .sonarcloud.properties ├── Dockerfile ├── GNUmakefile ├── README.md ├── chapters ├── .gitignore ├── 0woerterbuch.csv ├── hp-exam.tex ├── hpmor-chapter-000.tex ├── hpmor-chapter-001.tex ├── hpmor-chapter-002.tex ├── hpmor-chapter-003.tex ├── hpmor-chapter-004.tex ├── hpmor-chapter-005.tex ├── hpmor-chapter-006.tex ├── hpmor-chapter-007.tex ├── hpmor-chapter-008.tex ├── hpmor-chapter-009.tex ├── hpmor-chapter-010.tex ├── hpmor-chapter-011.tex ├── hpmor-chapter-012.tex ├── hpmor-chapter-013.tex ├── hpmor-chapter-014.tex ├── hpmor-chapter-015.tex ├── hpmor-chapter-016.tex ├── hpmor-chapter-017.tex ├── hpmor-chapter-018.tex ├── hpmor-chapter-019.tex ├── hpmor-chapter-020.tex ├── hpmor-chapter-021.tex ├── hpmor-chapter-022.tex ├── hpmor-chapter-023.tex ├── hpmor-chapter-024.tex ├── hpmor-chapter-025.tex ├── hpmor-chapter-026.tex ├── hpmor-chapter-027.tex ├── hpmor-chapter-028.tex ├── hpmor-chapter-029.tex ├── hpmor-chapter-030.tex ├── hpmor-chapter-031.tex ├── hpmor-chapter-032.tex ├── hpmor-chapter-033.tex ├── hpmor-chapter-034.tex ├── hpmor-chapter-035.tex ├── hpmor-chapter-036.tex ├── hpmor-chapter-037.tex ├── hpmor-chapter-038.tex ├── hpmor-chapter-039.tex ├── hpmor-chapter-040.tex ├── hpmor-chapter-041.tex ├── hpmor-chapter-042.tex ├── hpmor-chapter-043.tex ├── hpmor-chapter-044.tex ├── hpmor-chapter-045.tex ├── hpmor-chapter-046.tex ├── hpmor-chapter-047.tex ├── hpmor-chapter-048.tex ├── hpmor-chapter-049.tex ├── hpmor-chapter-050.tex ├── hpmor-chapter-051.tex ├── hpmor-chapter-052.tex ├── hpmor-chapter-053.tex ├── hpmor-chapter-054.tex ├── hpmor-chapter-055.tex ├── hpmor-chapter-056.tex ├── hpmor-chapter-057.tex ├── hpmor-chapter-058.tex ├── hpmor-chapter-059.tex ├── hpmor-chapter-060.tex ├── hpmor-chapter-061.tex ├── hpmor-chapter-062.tex ├── hpmor-chapter-063.tex ├── hpmor-chapter-064.tex ├── hpmor-chapter-065.tex ├── hpmor-chapter-066.tex ├── hpmor-chapter-067.tex ├── hpmor-chapter-068.tex ├── hpmor-chapter-069.tex ├── hpmor-chapter-070.tex ├── hpmor-chapter-071.tex ├── hpmor-chapter-072.tex ├── hpmor-chapter-073.tex ├── hpmor-chapter-074.tex ├── hpmor-chapter-075.tex ├── hpmor-chapter-076.tex ├── hpmor-chapter-077.tex ├── hpmor-chapter-078.tex ├── hpmor-chapter-079.tex ├── hpmor-chapter-080.tex ├── hpmor-chapter-081.tex ├── hpmor-chapter-082.tex ├── hpmor-chapter-083.tex ├── hpmor-chapter-084.tex ├── hpmor-chapter-085.tex ├── hpmor-chapter-086.tex ├── hpmor-chapter-087.tex ├── hpmor-chapter-088.tex ├── hpmor-chapter-089.tex ├── hpmor-chapter-090.tex ├── hpmor-chapter-091.tex ├── hpmor-chapter-092.tex ├── hpmor-chapter-093.tex ├── hpmor-chapter-094.tex ├── hpmor-chapter-095.tex ├── hpmor-chapter-096.tex ├── hpmor-chapter-097.tex ├── hpmor-chapter-098.tex ├── hpmor-chapter-099.tex ├── hpmor-chapter-100.tex ├── hpmor-chapter-101.tex ├── hpmor-chapter-102.tex ├── hpmor-chapter-103.tex ├── hpmor-chapter-104.tex ├── hpmor-chapter-105.tex ├── hpmor-chapter-106.tex ├── hpmor-chapter-107.tex ├── hpmor-chapter-108.tex ├── hpmor-chapter-109.tex ├── hpmor-chapter-110.tex ├── hpmor-chapter-111.tex ├── hpmor-chapter-112.tex ├── hpmor-chapter-113.tex ├── hpmor-chapter-114.tex ├── hpmor-chapter-115.tex ├── hpmor-chapter-116.tex ├── hpmor-chapter-117.tex ├── hpmor-chapter-118.tex ├── hpmor-chapter-119.tex ├── hpmor-chapter-120.tex ├── hpmor-chapter-121.tex ├── hpmor-chapter-122.tex └── translations │ ├── .gitignore │ ├── 1_download.py │ ├── 2_extract.py │ ├── 3_clean.py │ ├── 4_html2latex.py │ ├── 5_latex_cleanup.py │ └── helper.py ├── cspell-words.txt ├── cspell.json ├── fonts ├── AlegreyaSans │ ├── AlegreyaSans-LightItalic.ttf │ └── LICENSE.md ├── Florante │ ├── Florante.ttf │ └── FloranteatLaura.sfd ├── Licenses.md ├── Miscelanea.ttf ├── Parseltongue │ ├── PARSELTO.TTF │ ├── Parseltongue.afm │ ├── Parseltongue.sfd │ ├── Parseltongue.ttf │ └── readme.txt ├── Twilight.ttf ├── alegreya │ ├── Alegreya-Black.otf │ ├── Alegreya-BlackItalic.otf │ ├── Alegreya-Bold.otf │ ├── Alegreya-BoldItalic.otf │ ├── Alegreya-Italic.otf │ ├── Alegreya-Regular.otf │ ├── AlegreyaSC-Black.otf │ ├── AlegreyaSC-BlackItalic.otf │ ├── AlegreyaSC-Bold.otf │ ├── AlegreyaSC-BoldItalic.otf │ ├── AlegreyaSC-Italic.otf │ ├── AlegreyaSC-Regular.otf │ ├── AlegreyaSans-Black.otf │ ├── AlegreyaSans-BlackItalic.otf │ ├── AlegreyaSans-Bold.otf │ ├── AlegreyaSans-BoldItalic.otf │ ├── AlegreyaSans-ExtraBold.otf │ ├── AlegreyaSans-ExtraBoldItalic.otf │ ├── AlegreyaSans-Italic.otf │ ├── AlegreyaSans-Light.otf │ ├── AlegreyaSans-LightItalic.otf │ ├── AlegreyaSans-Medium.otf │ ├── AlegreyaSans-MediumItalic.otf │ ├── AlegreyaSans-Regular.otf │ ├── AlegreyaSans-Thin.otf │ ├── AlegreyaSans-ThinItalic.otf │ ├── AlegreyaSansSC-Black.otf │ ├── AlegreyaSansSC-BlackItalic.otf │ ├── AlegreyaSansSC-Bold.otf │ ├── AlegreyaSansSC-BoldItalic.otf │ ├── AlegreyaSansSC-ExtraBold.otf │ ├── AlegreyaSansSC-ExtraBoldItalic.otf │ ├── AlegreyaSansSC-Italic.otf │ ├── AlegreyaSansSC-Light.otf │ ├── AlegreyaSansSC-LightItalic.otf │ ├── AlegreyaSansSC-Medium.otf │ ├── AlegreyaSansSC-MediumItalic.otf │ ├── AlegreyaSansSC-Regular.otf │ ├── AlegreyaSansSC-Thin.otf │ ├── AlegreyaSansSC-ThinItalic.otf │ └── SIL Open Font License.txt ├── automobile_contest │ ├── Automobile Contest.otf │ ├── Automobile Contest.ttf │ └── AutomobileContest.sfd ├── gabriele_bad_ah │ ├── GabrieleBadAH.sfd │ ├── gabriele-bad.ttf │ └── gabriele.txt ├── graphe │ ├── GrapheAlpha_alt.sfd │ └── Graphe_Alpha_alt.ttf ├── lumos │ ├── Lumos.sfd │ ├── Lumos.ttf │ └── readme.txt ├── narnia_bll │ ├── NarniaBLL.ttf │ └── SpecialReadMe.txt ├── ringbearer │ ├── RingBearer.ttf │ ├── liesmich.html │ └── readme.html └── thundercats │ ├── Thundercats.ttf │ └── Thundercats.txt ├── hpmor-1.tex ├── hpmor-2.tex ├── hpmor-3.tex ├── hpmor-4.tex ├── hpmor-5.tex ├── hpmor-6.tex ├── hpmor.tex ├── images ├── Deathly_Hallows_Sign.pdf ├── cover0.jpg ├── cover1+bubble_sources.svg ├── cover1.pdf └── cover2.pdf ├── latexmkrc ├── layout ├── hp-blurbs.tex ├── hp-book.sty ├── hp-colophon.tex ├── hp-contents.tex ├── hp-dust-jacket.tex ├── hp-format.tex ├── hp-header.tex ├── hp-intro.tex ├── hp-markup.tex ├── hp-paper-type.tex ├── hp-title.tex ├── hp-warning.tex ├── hpmor-dust-jacket-1.tex ├── hpmor-dust-jacket-2.tex ├── hpmor-dust-jacket-3.tex ├── hpmor-dust-jacket-4.tex ├── hpmor-dust-jacket-5.tex ├── hpmor-dust-jacket-6.tex ├── hpmor-title-1.tex ├── hpmor-title-2.tex ├── hpmor-title-3.tex ├── hpmor-title-4.tex ├── hpmor-title-5.tex ├── hpmor-title-6.tex ├── hpmor-title.tex ├── papers.tex └── test.tex ├── post-checkout ├── python-requirements.txt ├── ruff.toml ├── scripts ├── check_chapters.py ├── check_chapters_settings.py ├── check_chapters_test.py ├── cleanup.sh ├── compare-translations.py ├── cspell-find-unused-words.py ├── ebook │ ├── hpmor-ebook.tex │ ├── html.css │ ├── pandoc.css │ ├── step_1.sh │ ├── step_2.sh │ ├── step_3.py │ ├── step_4.py │ ├── step_4_test.py │ ├── step_5.sh │ ├── step_6.py │ ├── step_6_test.py │ ├── step_7.sh │ ├── step_8.sh │ └── v1 │ │ ├── 1_latex2html.py │ │ └── 2_html2epub.sh ├── install_requirements_ebook.sh ├── install_requirements_pdf.sh ├── make_6_pdfs.cmd ├── make_ebooks.sh ├── make_pdf-1-vol.sh ├── make_pdf-6-vol.sh └── make_pdf-all.sh └── spelling-list.txt /.dir-locals.el: -------------------------------------------------------------------------------- 1 | ;; Adapted from https://stackoverflow.com/questions/4012321/how-can-i-access-the-path-to-the-current-directory-in-an-emacs-directory-variabl 2 | ((latex-mode . ((eval . (progn 3 | (set (make-local-variable 'ispell-personal-dictionary) 4 | (expand-file-name 5 | "spelling-list.txt" 6 | (file-name-directory 7 | (let ((d (dir-locals-find-file "."))) 8 | (if (stringp d) d (car d))))))))))) 9 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.css text eol=lf diff=css 2 | *.json text eol=lf 3 | *.md text eol=lf diff=markdown 4 | *.py text eol=lf diff=python 5 | *.sh text eol=lf 6 | *.tex text eol=lf 7 | *.toml text eol=lf 8 | *.txt text eol=lf 9 | *.yaml text eol=lf 10 | *.yml text eol=lf 11 | LICENSE text eol=lf 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/sonstiges.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Sonstiges 3 | about: Freitext, bitte rechts Label auswählen 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | -------------------------------------------------------------------------------- /.github/workflows/check-and-ebook.yml: -------------------------------------------------------------------------------- 1 | # This workflow performs 2 | # check: Quality checks on chapter text and code upon new commits and PRs. 3 | # make: Makes eBooks if .tex files have changed. 4 | # upload: Uploads the artifacts to release WorkInProgress, but only for push into main branch. 5 | 6 | name: Check and Make eBook 7 | 8 | # This workflow runs upon 9 | # - manual triggering 10 | # - create new PR (check, make) 11 | # - push to main (check, make, upload) 12 | 13 | on: 14 | workflow_dispatch: 15 | pull_request: 16 | branches: ["main"] 17 | push: 18 | branches: ["main"] 19 | 20 | jobs: 21 | check: 22 | runs-on: ubuntu-24.04 23 | outputs: 24 | cache-hit: ${{ steps.cache-lookup.outputs.cache-hit }} 25 | 26 | steps: 27 | - name: Checkout repository 28 | uses: actions/checkout@v4 29 | with: 30 | persist-credentials: false 31 | fetch-depth: 1 # 0 if you want to push to repo 32 | 33 | - name: Calculate hash on chapters/*.tex 34 | id: calculate-hash 35 | run: | 36 | echo "hash=${{ hashFiles('chapters/*.tex') }}" >> $GITHUB_OUTPUT 37 | touch hash-chapters.txt 38 | 39 | - name: Cache lookup 40 | id: cache-lookup 41 | uses: actions/cache@v4 42 | with: 43 | path: hash-chapters.txt 44 | key: chapter-hash-for-ebook-${{ github.ref_name }}-${{ steps.calculate-hash.outputs.hash }} 45 | 46 | - name: Preparations 47 | run: ln -s python-requirements.txt requirements.txt 48 | 49 | - name: Python set up 50 | uses: actions/setup-python@v5 51 | with: 52 | python-version-file: ".python-version" 53 | cache: "pip" 54 | 55 | - name: Python packages 56 | run: pip install -r python-requirements.txt 57 | 58 | - name: Run pytest unittests 59 | run: pytest 60 | 61 | - name: Check chapters for known issues 62 | run: python3 -O scripts/check_chapters.py 63 | 64 | - name: Check pre-commit tests 65 | uses: pre-commit/action@v3.0.1 66 | 67 | make: 68 | needs: check 69 | # do not run for unchanged tex files 70 | if: needs.check.outputs.cache-hit != 'true' 71 | 72 | runs-on: ubuntu-24.04 73 | 74 | steps: 75 | - name: Checkout repository 76 | uses: actions/checkout@v4 77 | with: 78 | persist-credentials: false 79 | fetch-depth: 1 # 0 if you want to push to repo 80 | 81 | - name: Preparations 82 | run: ln -s python-requirements.txt requirements.txt 83 | 84 | - name: Python set up 85 | uses: actions/setup-python@v5 86 | with: 87 | python-version-file: ".python-version" 88 | cache: "pip" 89 | 90 | - name: Install Python packages 91 | run: pip install -r python-requirements.txt 92 | 93 | # - name: setup environment to DE lang 94 | # run: | 95 | # cd /usr/share/locales 96 | # sudo ./install-language-pack de_DE.UTF-8 97 | 98 | - name: ls before 99 | run: | 100 | pwd 101 | ls -l 102 | 103 | - name: Speed up apt-get steps 104 | uses: abbbi/github-actions-tune@v1 105 | 106 | - name: Install apt packages using cache 107 | uses: awalsh128/cache-apt-pkgs-action@latest 108 | with: 109 | packages: texlive-extra-utils pandoc calibre imagemagick ghostscript 110 | version: 1.0 111 | # execute_install_scripts: true 112 | 113 | - name: Install ImageMagick to fix caching issue 114 | # since cache does not properly work / "convert" not found 115 | run: | 116 | sudo apt-get install imagemagick 117 | 118 | - name: Print versions 119 | run: | 120 | cat /etc/os-release 121 | # xelatex -v 122 | # latexmk -v 123 | calibre --version 124 | pandoc --version 125 | ebook-convert --version 126 | python3 --version 127 | 128 | - name: Make eBooks 129 | run: | 130 | wget --quiet https://github.com/${{ github.repository }}/releases/latest/download/hpmor.html -O hpmor-prev.html 131 | wget --quiet https://github.com/${{ github.repository }}/releases/latest/download/hpmor.pdf -O hpmor.pdf 132 | sh scripts/make_ebooks.sh > /dev/null 133 | 134 | - name: Compare to previous hpmor.html 135 | run: | 136 | diff -U 0 -s hpmor-prev.html hpmor.html > hpmor-html-diff.log || true 137 | 138 | - name: ls after 139 | run: | 140 | pwd 141 | ls -al 142 | 143 | - name: Upload eBooks as artifact 144 | uses: actions/upload-artifact@v4 145 | with: 146 | name: ebooks 147 | path: | 148 | ./hpmor-html-diff.log 149 | ./hpmor.docx 150 | ./hpmor.epub 151 | ./hpmor.fb2 152 | ./hpmor.html 153 | ./hpmor.mobi 154 | retention-days: 14 155 | 156 | # 157 | # upload to release WorkInProgress 158 | # 159 | upload: 160 | needs: make 161 | # only for main branch and actions push or manual run 162 | if: github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') 163 | 164 | permissions: 165 | contents: write 166 | 167 | runs-on: ubuntu-24.04 168 | 169 | steps: 170 | - name: Checkout repository 171 | uses: actions/checkout@v4 172 | 173 | - name: Get tags 174 | run: git fetch --tags origin 175 | 176 | - name: Update tag WorkInProgress 177 | run: | 178 | git tag -d WorkInProgress || true 179 | git tag WorkInProgress 180 | git push origin -f WorkInProgress 181 | 182 | - name: Download eBooks artifact 183 | uses: actions/download-artifact@v4 184 | with: 185 | name: ebooks 186 | 187 | - name: Publish eBooks to release WorkInProgress 188 | uses: softprops/action-gh-release@v2 189 | with: 190 | tag_name: WorkInProgress 191 | prerelease: true 192 | files: | 193 | ./hpmor-html-diff.log 194 | ./hpmor.docx 195 | ./hpmor.epub 196 | ./hpmor.fb2 197 | ./hpmor.html 198 | ./hpmor.mobi 199 | -------------------------------------------------------------------------------- /.github/workflows/make-pdf-1-select.yml: -------------------------------------------------------------------------------- 1 | name: Make PDF 1 selected 2 | # no apt update included 3 | 4 | on: 5 | workflow_dispatch: 6 | inputs: 7 | pdf_target: 8 | description: "Which PDF? (hpmor, hpmor-1, ..., hpmor-6)" 9 | required: true 10 | default: "hpmor" 11 | 12 | jobs: 13 | make: 14 | runs-on: ubuntu-24.04 15 | steps: 16 | - name: Print selection 17 | run: | 18 | echo "selected PDF: ${{ github.event.inputs.pdf_target }}" 19 | 20 | - name: Checkout repository 21 | uses: actions/checkout@v4 22 | with: 23 | persist-credentials: false 24 | fetch-depth: 1 # 0 if you want to push to repo 25 | 26 | - name: Cache LaTeX files 27 | uses: actions/cache@v4 28 | with: 29 | path: | 30 | chapters/*.aux 31 | hpmor*.aux 32 | hpmor*.fdb_latexmk 33 | hpmor*.fls 34 | hpmor*.out 35 | hpmor*.pdf 36 | hpmor*.toc 37 | hpmor*.xdv 38 | key: latex-build-files 39 | 40 | - name: ls before 41 | run: | 42 | pwd 43 | ls -l chapters/ 44 | ls -l 45 | 46 | - name: Speed up apt-get steps 47 | uses: abbbi/github-actions-tune@v1 48 | 49 | - name: Install PDF requirements 50 | run: | 51 | # not: to save time 52 | # sudo apt-get update > /dev/null 53 | sh scripts/install_requirements_pdf.sh > /dev/null 54 | 55 | - name: Print versions 56 | run: | 57 | cat /etc/os-release 58 | xelatex -v 59 | latexmk -v 60 | # pandoc -v 61 | python3 --version 62 | 63 | - name: Make PDF 64 | run: | 65 | latexmk "${{ github.event.inputs.pdf_target }}" > /dev/null 66 | 67 | - name: Publish PDF to release 68 | uses: softprops/action-gh-release@v2 69 | with: 70 | tag_name: WorkInProgress 71 | prerelease: true 72 | files: | 73 | ./hpmor*.pdf 74 | 75 | - name: Upload log as artifact 76 | uses: actions/upload-artifact@v4 77 | with: 78 | name: "${{ github.event.inputs.pdf_target }}.log" 79 | path: "${{ github.event.inputs.pdf_target }}.log" 80 | 81 | - name: ls after 82 | run: | 83 | ls -l 84 | -------------------------------------------------------------------------------- /.github/workflows/make-pdf-6-parallel.yml: -------------------------------------------------------------------------------- 1 | name: Make PDF 6 parallel 2 | # no apt update included 3 | 4 | on: 5 | workflow_dispatch: 6 | 7 | jobs: 8 | make: 9 | runs-on: ubuntu-24.04 10 | strategy: 11 | matrix: 12 | part: [hpmor-1, hpmor-2, hpmor-3, hpmor-4, hpmor-5, hpmor-6] 13 | steps: 14 | - name: Checkout repository 15 | uses: actions/checkout@v4 16 | with: 17 | persist-credentials: false 18 | fetch-depth: 1 # 0 if you want to push to repo 19 | 20 | - name: Cache LaTeX files 21 | uses: actions/cache@v4 22 | with: 23 | path: | 24 | chapters/*.aux 25 | hpmor*.aux 26 | hpmor*.fdb_latexmk 27 | hpmor*.fls 28 | hpmor*.out 29 | hpmor*.pdf 30 | hpmor*.toc 31 | hpmor*.xdv 32 | key: latex-build-files 33 | 34 | - name: Speed up apt-get steps 35 | uses: abbbi/github-actions-tune@v1 36 | 37 | - name: Install PDF requirements 38 | run: | 39 | # not: to save time 40 | # sudo apt-get update > /dev/null 41 | sh scripts/install_requirements_pdf.sh > /dev/null 42 | 43 | - name: Make PDF 44 | run: latexmk ${{ matrix.part }} > /dev/null 45 | 46 | - name: Publish PDF to release 47 | uses: softprops/action-gh-release@v2 48 | with: 49 | tag_name: WorkInProgress 50 | prerelease: true 51 | files: ${{ matrix.part }}.pdf 52 | 53 | - name: Upload log as artifact 54 | uses: actions/upload-artifact@v4 55 | with: 56 | name: "${{ matrix.part }}.log" 57 | path: "${{ matrix.part }}.log" 58 | -------------------------------------------------------------------------------- /.github/workflows/make-pdf-all-serial.yml: -------------------------------------------------------------------------------- 1 | name: Make PDF all serial 2 | # includes apt update 3 | 4 | on: 5 | workflow_dispatch: 6 | 7 | jobs: 8 | make: 9 | runs-on: ubuntu-24.04 10 | steps: 11 | - name: Checkout repository 12 | uses: actions/checkout@v4 13 | with: 14 | persist-credentials: false 15 | fetch-depth: 1 # 0 if you want to push to repo 16 | 17 | - name: Cache LaTeX files 18 | uses: actions/cache@v4 19 | with: 20 | path: | 21 | chapters/*.aux 22 | hpmor*.aux 23 | hpmor*.fdb_latexmk 24 | hpmor*.fls 25 | hpmor*.out 26 | hpmor*.pdf 27 | hpmor*.toc 28 | hpmor*.xdv 29 | key: latex-build-files 30 | 31 | - name: Speed up apt-get steps 32 | uses: abbbi/github-actions-tune@v1 33 | 34 | - name: Install PDF requirements 35 | run: | 36 | sudo apt-get update > /dev/null 37 | sh scripts/install_requirements_pdf.sh > /dev/null 38 | 39 | - name: Print versions 40 | run: | 41 | cat /etc/os-release 42 | xelatex -v 43 | latexmk -v 44 | # pandoc -v 45 | python3 --version 46 | 47 | - name: Make PDFs 48 | run: | 49 | latexmk hpmor-1 hpmor-2 hpmor-3 hpmor-4 hpmor-5 hpmor-6 hpmor > /dev/null 50 | 51 | - name: Publish PDF to release 52 | uses: softprops/action-gh-release@v2 53 | with: 54 | tag_name: WorkInProgress 55 | prerelease: true 56 | files: | 57 | hpmor*.pdf 58 | 59 | - name: Upload logs as artifact 60 | uses: actions/upload-artifact@v4 61 | with: 62 | name: "hpmor.log" 63 | path: "hpmor*.log" 64 | -------------------------------------------------------------------------------- /.github/workflows/make-pdf-test.yml: -------------------------------------------------------------------------------- 1 | name: Make PDF layout test 2 | 3 | on: 4 | workflow_dispatch: 5 | # push: 6 | # branches: [ main ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-24.04 11 | steps: 12 | - name: Print start date 13 | run: date +%Y-%m-%d_%H:%M 14 | 15 | - name: Checkout repository 16 | uses: actions/checkout@v4 17 | with: 18 | persist-credentials: false 19 | fetch-depth: 1 # 0 if you want to push to repo 20 | 21 | - name: Python set up 22 | uses: actions/setup-python@v5 23 | with: 24 | python-version-file: ".python-version" 25 | # cache: "pip" 26 | 27 | - name: Test ls before 28 | run: | 29 | pwd 30 | ls -al 31 | 32 | - name: Speed up apt-get steps 33 | uses: abbbi/github-actions-tune@v1 34 | 35 | - name: Install requirements 36 | run: | 37 | sudo apt-get update > /dev/null 38 | sh scripts/install_requirements_pdf.sh > /dev/null 39 | 40 | # unfortunately not working 41 | # - name: Cache packages 42 | # uses: awalsh128/cache-apt-pkgs-action@latest 43 | # with: 44 | # packages: texlive-xetex texlive-lang-german latexmk 45 | # version: 1.0 46 | # execute_install_scripts: true 47 | 48 | - name: Print versions 49 | run: | 50 | cat /etc/os-release 51 | xelatex -v 52 | latexmk -v 53 | # pandoc -v 54 | python3 --version 55 | 56 | - name: Make PDF 57 | # run: sh scripts/make_pdf.sh > /dev/null 58 | run: latexmk layout/test -f 59 | 60 | # - name: Publish log to release 61 | # uses: softprops/action-gh-release@v2 62 | # with: 63 | # tag_name: WorkInProgress 64 | # prerelease: true 65 | # files: | 66 | # ./test.log 67 | 68 | - name: Print end date 69 | run: date +%Y-%m-%d_%H:%M 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | __pycache__/ 3 | .DS_Store 4 | tmp/ 5 | 6 | *.acn 7 | *.acr 8 | *.alg 9 | *.aux 10 | *.bbl 11 | *.blg 12 | *.dvi 13 | *.fdb_latexmk 14 | *.fls 15 | *.glg 16 | *.glo 17 | *.gls 18 | *.idx 19 | *.ilg 20 | *.ind 21 | *.ist 22 | *.lof 23 | *.log 24 | *.lot 25 | *.maf 26 | *.mtc 27 | *.mtc0 28 | *.nav 29 | *.nlo 30 | *.out 31 | *.pdfsync 32 | *.ps 33 | *.snm 34 | *.synctex.gz 35 | *.tdo 36 | *.toc 37 | *.vrb 38 | *.xdv 39 | *.xdy 40 | *~ 41 | ~$hpmor.docx 42 | chapters/*-autofix.tex 43 | hp-*.pdf 44 | hpmor-*.pdf 45 | hpmor.pdf 46 | hpmor*.docx 47 | hpmor*.epub 48 | hpmor*.fb2 49 | hpmor*.html 50 | hpmor*.mobi 51 | hpmor*.zip 52 | test*.pdf 53 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # install package 2 | # pip3 install pre-commit 3 | # register as git commit-hook to run automatically 4 | # pre-commit install 5 | # run manually 6 | # pre-commit run --all-files 7 | # update hooks to latest version 8 | # pre-commit autoupdate 9 | 10 | default_language_version: 11 | python: python3.13 12 | 13 | exclude: | 14 | (?x)^( 15 | chapters/translations/.*| 16 | fonts/.*| 17 | scripts/compare-translations.py| 18 | scripts/ebook/v1/.* 19 | )$ 20 | 21 | repos: 22 | - repo: https://github.com/pre-commit/pre-commit-hooks 23 | rev: v5.0.0 24 | hooks: 25 | - id: check-added-large-files 26 | args: ["--maxkb=500"] 27 | - id: check-ast 28 | - id: check-builtin-literals 29 | - id: check-case-conflict 30 | - id: check-docstring-first 31 | - id: check-executables-have-shebangs 32 | # - id: check-illegal-windows-names 33 | - id: check-json 34 | - id: check-merge-conflict 35 | - id: check-shebang-scripts-are-executable 36 | - id: check-symlinks 37 | - id: check-toml 38 | - id: check-vcs-permalinks 39 | - id: check-xml 40 | - id: check-yaml 41 | - id: debug-statements 42 | - id: destroyed-symlinks 43 | # - id: detect-aws-credentials 44 | - id: detect-private-key 45 | # conflict with black below 46 | # - id: double-quote-string-fixer 47 | - id: end-of-file-fixer 48 | # - id: file-contents-sorter 49 | # files: ^(deploy-whitelist.txt|\.gitignore|\.dockerignore)$ 50 | - id: fix-byte-order-marker 51 | - id: fix-encoding-pragma 52 | args: ["--remove"] 53 | - id: forbid-new-submodules 54 | # - id: forbid-submodules 55 | - id: mixed-line-ending 56 | args: ["--fix=lf"] 57 | - id: name-tests-test 58 | args: ["--pytest-test-first"] 59 | # - id: no-commit-to-branch 60 | # args: [--branch, staging] 61 | - id: pretty-format-json 62 | args: ["--autofix", "--no-ensure-ascii", "--no-sort-keys"] 63 | - id: requirements-txt-fixer 64 | # - id: sort-simple-yaml 65 | # files: ^config/simple/ 66 | - id: trailing-whitespace 67 | 68 | # ruff 69 | - repo: https://github.com/astral-sh/ruff-pre-commit 70 | rev: v0.11.8 71 | hooks: 72 | - id: ruff 73 | args: [--fix, --exit-non-zero-on-fix] 74 | - id: ruff-format 75 | 76 | # security 77 | - repo: https://github.com/gitleaks/gitleaks 78 | rev: v8.27.2 79 | hooks: 80 | - id: gitleaks 81 | 82 | # markdown 83 | - repo: https://github.com/igorshubovych/markdownlint-cli 84 | rev: v0.45.0 85 | hooks: 86 | - id: markdownlint 87 | args: ["--disable", "MD013"] 88 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.13 2 | -------------------------------------------------------------------------------- /.sonarcloud.properties: -------------------------------------------------------------------------------- 1 | sonar.python.version=3.13 2 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # syntax=docker/dockerfile:1 2 | 3 | # base image 4 | FROM ubuntu:24.04 5 | 6 | # set timezone 7 | ENV TZ=Europe/Berlin 8 | 9 | # prevent keyboard input requests in apt install 10 | ENV DEBIAN_FRONTEND=noninteractive 11 | 12 | # install packages and cleanup afterwards 13 | RUN apt-get update && apt-get dist-upgrade -y && \ 14 | apt-get install -y \ 15 | calibre \ 16 | ghostscript \ 17 | git \ 18 | imagemagick \ 19 | latexmk \ 20 | pandoc \ 21 | python3 \ 22 | python3-lxml \ 23 | texlive-extra-utils \ 24 | texlive-lang-german \ 25 | texlive-lang-greek \ 26 | texlive-xetex && \ 27 | apt-get clean autoclean && \ 28 | apt-get autoremove --yes && \ 29 | rm -rf /var/lib/{apt,dpkg,cache,log}/ && \ 30 | useradd -m -s /bin/bash app 31 | 32 | # switch to non-root user 33 | USER app 34 | 35 | # set working directory 36 | WORKDIR /app 37 | 38 | # mount host directory as volume 39 | VOLUME /app 40 | 41 | # default command: build 1-vol pdf and all ebook formats 42 | # CMD latexmk hpmor ; ./scripts/make_ebooks.sh 43 | 44 | # 1. preparation 45 | # 1.1 build/update image from Dockerfile 46 | # docker build -t hpmor . 47 | 48 | # 1.2 create container that mounts current working dir to /app 49 | # docker run --name hpmor-de -it --mount type=bind,src="$(pwd)",dst=/app hpmor bash 50 | # exit 51 | 52 | # note: in Windows you need to replace "$(pwd)" by "%cd%" for the following commands 53 | 54 | # 2. use container 55 | # docker start -ai hpmor-de 56 | # latexmk hpmor ; ./scripts/make_ebooks.sh 57 | # exit 58 | 59 | # 3. optionally: cleanup/delete hpmor from docker 60 | # delete container 61 | # docker rm hpmor-de 62 | # delete image 63 | # docker rmi hpmor 64 | # delete all docker containers and cache 65 | # docker system prune -f 66 | -------------------------------------------------------------------------------- /GNUmakefile: -------------------------------------------------------------------------------- 1 | # Make a PDF and e-book release 2 | 3 | PROJECT=hpmor 4 | 5 | TAG := $(shell git describe --tags) 6 | VERSION := $(shell echo $(TAG) | sed -e 's/^v//') 7 | EBOOKS = $(PROJECT).epub $(PROJECT).mobi $(PROJECT).fb2 8 | ZIPFILE = $(PROJECT)-$(VERSION).zip 9 | 10 | all: ebooks pdf 11 | 12 | .PHONY: all 13 | 14 | clean: 15 | latexmk -C 16 | 17 | .PHONY: clean 18 | 19 | pdf: 20 | latexmk 21 | 22 | ebooks: pdf 23 | sh scripts/make_ebooks.sh 24 | 25 | zip: pdf ebooks 26 | rm -f $(ZIPFILE) && \ 27 | zip $(ZIPFILE) *.pdf $(EBOOKS) 28 | 29 | # To make a release: git tag vx.y && make release 30 | # Needs woger from https://github.com/rrthomas/woger/ 31 | release: zip 32 | git diff --exit-code && \ 33 | git push --tags && \ 34 | woger github package=$(PROJECT) version=$(VERSION) dist_type=zip && \ 35 | for file in $(PROJECT).pdf $(EBOOKS); do \ 36 | suffix=$${file##*.}; \ 37 | gh release upload $(TAG) $$file#$(PROJECT)-$(VERSION).$$suffix; \ 38 | done 39 | -------------------------------------------------------------------------------- /chapters/.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/ 2 | translation-*/ 3 | *-autofix.tex 4 | -------------------------------------------------------------------------------- /chapters/0woerterbuch.csv: -------------------------------------------------------------------------------- 1 | done,EN,DE 2 | ,doom,Unheil 3 | ,first-aid kit,Erste-Hilfe-Tasche 4 | ,healer’s kit,Heiler-Set 5 | ,pop(s),Plop (Apperation) 6 | x,‘...’,‚...‘ 7 | x,“...”,„...“ 8 | x,aftermath,Nachwirkungen -> Nachspiel 9 | x,Ancient House,Altes Geschlecht 10 | x,betrayed,hintergangen (Kaptiel 100++) 11 | x,Boy-Who-Lived,Junge-der-überlebte 12 | x,broomstick team,Besenteam 13 | x,Chaos Legion,Chaos-Legion 14 | x,Chaos Legionnaires,Chaos-Legionäre 15 | x,Chief Warlock,Großmeister 16 | x,Cloak of Invisibility,Tarnumhang 17 | x,comed-tea,Comed-Tea 18 | x,curfew,Zapfenstreich 19 | x,dad,Dad (Papa) 20 | x,Daily Prophet,Tagesprophet 21 | x,Death Eater,Todesser 22 | x,Defence Professor,Verteidigungsprofessor 23 | x,Dragon General,Drachen-General 24 | x,England,Britannien 25 | x,Floo,Floh 26 | x,foolishness,Torheit 27 | x,Forbidden Forest,Verbotener Wald 28 | x,führnehmen,Edlen 29 | x,Girl-Who-Revived,Mädchen-das-wiederbelebt-wurde 30 | x,He-Who-Must-Not-Be-Named,Er-dessen-Name-nicht-genannt-werden-darf (Du-weißt-schon-wer) 31 | x,Headmaster,Schulleiter 32 | x,invisibility cloak,Tarnumhang 33 | x,life-eater,Lebensfresser 34 | x,Macmillian,Macmillan 35 | x,Mary’s Place,Marys Stube 36 | x,Most Ancient Hall,Ältestenhalle 37 | x,Most Ancient,Altehrwürdig 38 | x,mum, Mum(Mama/Mutter) 39 | x,N.E.W.T,U.T.Z. 40 | x,Noble and Most Ancient House,Altehrwürdiges Geschlecht 41 | x,NPC,Nicht-Spielercharakter 42 | x,O.W.L.,Z.A.G. 43 | x,Occlumens,Okklumentiker 44 | x,Parseltongue,Parsel 45 | x,Patronus Charm,Patronus-Zauber 46 | x,PC,Spielercharakter 47 | x,phœnix,Phönix 48 | x,phœnixes,Phönixe 49 | x,plaque,Plakette(NICHT Schallplatte) 50 | x,Potions Master,Meister der Zaubertränke 51 | x,Professor der Verteidigung,Verteidigungsprofessor 52 | x,Quibbler,Klitterer 53 | x,robe,Umhang / Zaubererumhang 54 | x,S.P.H.E.W.,\SPHEW 55 | x,sense of doom,Unheilsgefühl 56 | x,Silvery Slytherins,Silbernen Slytherins 57 | x,St. Mungo’s,St.~Mungo 58 | x,student,Schüler 59 | x,Sunshine General,Sonnenschein-General 60 | x,Supreme Mugwump of the International Confederation of Wizards,Oberster Mugwump der Internationalen Konföderation der Zauberer 61 | x,Thief’s Downfall,Untergang des Diebes 62 | x,Time-Turner,Zeitumkehrer 63 | x,Transfiguration,Verwandlung 64 | x,transfigured,verwandelt 65 | x,wand,Zauberstab 66 | x,wandless magic,stablose Magie 67 | x,You-Know-Who,Du-weißt-schon-wer 68 | ,, 69 | done,DE-alt,DE-neu 70 | x,Junge-der-lebte,Junge-der-überlebte 71 | x,Jungen-der-lebte,Jungen-der-überlebte 72 | x,Mama/Mutter,Mum 73 | x,Oberste(r) Hexenmeister,Großmeister 74 | x,Papa,Dad 75 | x,Seltsaft,Comed-Tea 76 | x,Tagespropheten,Tagesprophet 77 | x,Uralte Haus,Uralte Geschlecht 78 | x,Uralte Häuser,Uralte Geschlechter 79 | x,Uralten Hauses,Uralten Geschlechtes 80 | x,Uraltes Haus,Uraltes Geschlecht 81 | x,Verschwörung von Bayes,Bayes’sche Verschwörung 82 | ,, 83 | ,Spells,Zauber 84 | ,Charm of the Most Ancient Blade,Zauber der Alterwürdigen Klinge 85 | ,Confundus Charm,Confundus-Zauber 86 | ,Cruciatus Curse,Cruciatus-Fluch 87 | ,Drill Hex,Schildbrecher/Schlagbohrfluch/Brechenden Bohrzauber 88 | ,False Memory Charm,Falsche-Erinnerung-Zauber 89 | ,Fiendfyre,Dämonenfeuer 90 | ,Killing Curse,Todesfluch 91 | ,Legilimency,Legilimentik 92 | ,Memory Charm,Gedächtniszauber 93 | ,Most Ancient Blade,Altehrwürdige Klinge 94 | ,Obliviate,Obliviate 95 | ,Obliviation/Obliviating,Vergessenszauber 96 | ,Polyjuice,Vielsafttrank 97 | ,Quieting Charm,Stillezauber 98 | ,Severing Charm,Durchtrennungszauber 99 | ,Shield Charm, Schildzauber 100 | ,Stunning Hex,Betäubungszauber 101 | ,Transfiguration,Verwandlung 102 | ,Unbreakable Vow,Unbrechbaren Schwur 103 | ,Veritaserum, 104 | s,Accio, 105 | s,Aguamenti, 106 | s,Alohomora, 107 | s,Avada Kedavra, 108 | s,Cluthe, 109 | s,Colloportus, 110 | s,Contego, 111 | s,Crystferrium, 112 | s,Deligitor prodeas, 113 | s,Diffindo, 114 | s,Dulak, 115 | s,Elmekia, 116 | s,Episkey, 117 | s,Expecto Patronum, 118 | s,Expelliarmus, 119 | s,Finite Incantatem, 120 | s,Finite, 121 | s,Flipendo, 122 | s,Frigideiro, 123 | s,Glisseo, 124 | s,Gom jabbar, 125 | s,Hyakuju montauk, 126 | s,Impedimenta, 127 | s,Imperius, 128 | s,Inflammare, 129 | s,Innervate,Rennervate 130 | s,Jellify, 131 | s,Lagann, 132 | s,Lucis Gladius, 133 | s,Luminos, 134 | s,Lumos, 135 | s,Mahasu, 136 | s,Oogely boogely, 137 | s,Polyfluis Reverso, 138 | s,Prismatis, 139 | s,Protego Maximus, 140 | s,Protego, 141 | s,Quietus,Geräuschdämpfer 142 | s,Ravum Calvaria, 143 | s,Scourgify,Ratzeputz 144 | s,Silencio, 145 | s,Somnium, 146 | s,Stupefy,Stupor 147 | s,Thermos, 148 | s,Tonare, 149 | s,Ventriliquo, 150 | s,Ventus, 151 | s,Wingardium Leviosa, 152 | x,Horcrux,Horkrux 153 | ,, 154 | ,Überbleibsel, 155 | ,*, 156 | ,{[}, 157 | ,Anm. d. Übers, 158 | ,Anm.d. Übers., 159 | ,sss, 160 | ,\emph{\emph, 161 | ,, 162 | ,Quote Chars, 163 | ,“...” , „...“ 164 | ,‘...’ , ‚...‘ 165 | -------------------------------------------------------------------------------- /chapters/hp-exam.tex: -------------------------------------------------------------------------------- 1 | % Quelle der Übersetzung: Schneefl0cke https://www.fanfiktion.de/s/60044849000ccc541aef297e/112/ 2 | 3 | \chapter*{Abschlussprüfung} 4 | 5 | % \section{The following was posted at the end of Chapter 113:} 6 | \section*{Folgende Prüfung für die Leser wurde zusammen mit Kapitel 113 veröffentlicht:} 7 | 8 | {% 9 | \setlength{\parindent}{0pt}\setlength{\parskip}{.5\baselineskip} 10 | 11 | % This is your final exam. 12 | Dies ist deine letzte Prüfung.% 13 | \translatorsnote{Dies ist der Clou, und der Höhepunkt der Geschichte. Alles um euch auf diese Prüfung vorzubereiten, zum Nachdenken zu bringen und Sie zu meistern wurde geschrieben. Hinweise und Hilfsmittel sind in der ganzen Geschichte versteckt ….} 14 | 15 | % You have 60 hours. 16 | Du hast 60 Stunden Zeit. 17 | 18 | % Your solution must at least allow Harry to evade immediate death, despite being naked, holding only his wand, facing 36 Death Eaters plus the fully resurrected Lord Voldemort. 19 | Deine Lösung muss es Harry zumindest ermöglichen, dem sofortigen Tod zu entgehen, obwohl er nackt ist, nur seinen Zauberstab in der Hand hält und 36 Todessern plus dem vollständig wiederauferstandenen Lord Voldemort gegenübersteht. 20 | 21 | % \textbf{If a viable solution is posted before \emph{12:01\am Pacific Time} (8:01\am UTC) on Tuesday, March 3rd, 2015, the story will continue to Ch.~121.} 22 | 23 | % \textbf{Otherwise you will get a shorter and sadder ending.} 24 | 25 | \textbf{Wird bis zum 3. März 2015 08:01~Uhr UTC keine brauchbare Lösung eingereicht, endet die Geschichte traurig und kürzer.} 26 | 27 | % Keep in mind the following: 28 | Beachtet Folgende Einschränkungen: 29 | \begin{enumerate} 30 | % \item Harry must succeed via his own efforts. The cavalry is not coming. 31 | \item Harry muss es aus eigener Kraft schaffen. Die Kavallerie wird nicht kommen. Jeder, der Harry helfen möchte, denkt, er sei bei einem Quidditchspiel. 32 | % \item Harry may only use capabilities the story has already shown him to have; he cannot develop wordless wandless Legilimency in the next 60 seconds. 33 | \item Harry darf nur Fähigkeiten einsetzen, die ihm die Geschichte bereits gezeigt hat; er kann nicht in den nächsten 60 Sekunden wortlose Legilimentik entwickeln. 34 | % \item Voldemort is evil and cannot be persuaded to be good; the Dark Lord’s utility function cannot be changed by talking to him. 35 | \item Voldemort ist böse und kann nicht dazu überredet werden, gut zu sein; die Nutzenfunktion des Charakters des Dunklen Lords als Antagonist kann nicht verändert werden, indem man mit ihm spricht. 36 | % \item If Harry raises his wand or speaks in anything except Parseltongue, the Death Eaters will fire on him immediately. 37 | \item Wenn Harry seinen Zauberstab erhebt oder in etwas anderem als Parsel spricht, werden die Todesser sofort auf ihn schießen. 38 | % \item If the simplest timeline is otherwise one where Harry dies—if Harry cannot reach his Time-Turner without Time-Turned help—then the Time-Turner will not come into play. 39 | \item Wenn die einfachste Zeitlinie sonst eine ist, in der Harry stirbt — wenn Harry seinen Zeitumkehrer nicht ohne die Hilfe des Zeitumkehrer erreichen kann — dann kommt der Zeitumkehrer nicht ins Spiel. 40 | % \item It is impossible to tell lies in Parseltongue. 41 | \item Es ist unmöglich in Parsel Lügen zu erzählen. 42 | \end{enumerate} 43 | 44 | % Within these constraints, Harry is allowed to attain his full potential as a rationalist, now in this moment or never, regardless of his previous flaws. 45 | Innerhalb dieser Einschränkungen ist es Harry erlaubt, sein volles Potenzial als Rationalist zu erreichen, jetzt in diesem Moment oder nie, unabhängig von seinen früheren Fehlern. 46 | 47 | % Of course ‘the rational solution’, if you are using the word ‘rational’ correctly, is just a needlessly fancy way of saying ‘the best solution’ or ‘the solution I like’ or ‘the solution I think we should use’, and you should usually say one of the latter instead. (We only need the word ‘rational’ to talk about ways of thinking, considered apart from any particular solutions.) 48 | Natürlich ist ‚die rationale Lösung‘, wenn man das Wort ‚rational‘ richtig verwendet, nur eine unnötig ausgefallene Art zu sagen ‚die beste Lösung‘ oder ‚die Lösung, die ich mag‘ oder ‚die Lösung, die ich denke, dass wir verwenden sollten‘, und man sollte normalerweise stattdessen einen der letzteren Begriffe sagen. (Wir brauchen das Wort ‚rational‘ nur, um über Denkweisen zu sprechen, die unabhängig von bestimmten Lösungen betrachtet werden.) 49 | 50 | % And by Vinge’s Principle, if you know exactly what a smart mind would do, you must be at least that smart yourself. Asking someone “What would an optimal player think is the best move?” should produce answers no better than “What do you think is best?” 51 | 52 | Und nach dem Vinge-Prinzip gilt: Wenn man genau weiß, was ein kluger Kopf tun würde, muss man selbst mindestens genauso so klug sein. Jemanden zu fragen 53 | „Was würde ein optimaler Spieler für den besten Zug halten?“ sollte keine bessere Antwort hervorbringen als 54 | „Was denkst du ist der beste Zug?“ 55 | 56 | % So what I mean in practice, when I say Harry is allowed to attain his full potential as a rationalist, is that Harry is allowed to solve this problem the way \emph{you} would solve it. If you can tell me exactly how to do something, Harry is allowed to think of it. 57 | Was ich also in der Praxis meine, wenn ich sage, dass Harry sein volles Potenzial als Rationalist ausschöpfen darf, ist, dass Harry dieses Problem so lösen darf, wie \emph{du} es lösen würdest. Wenn du mir genau sagen kannst, wie ich etwas tun soll, dann ist es Harry erlaubt, daran zu denken. 58 | 59 | % But it does not serve as a solution to say, for example, “Harry should persuade Voldemort to let him out of the box” if you can’t yourself figure out how. 60 | Aber es dient nicht als Lösung, wenn man z. B. sagt: 61 | „Harry sollte Voldemort überreden, ihn aus der Falle zu lassen“, wenn man selbst nicht herausfinden kann, wie. 62 | 63 | % For the best experience, if you have not already been following Internet conversations about recent chapters, I suggest \textbf{not} doing so, trying to complete this exam on your own, not looking at other reviews, and waiting for Ch.~114 to see how you did. 64 | Um die beste Erfahrung zu machen, empfehle ich dir, wenn du die Internetdiskussionen über die letzten Kapitel noch nicht verfolgt hast, dies \emph{nicht} zu tun, sondern zu versuchen, diese Prüfung allein zu bestehen, ohne andere Rezensionen zu lesen, und auf Kapitel~114 zu warten, um zu sehen, wie du abgeschnitten hast. 65 | 66 | % I wish you all the best of luck, or rather the best of skill. 67 | Ich wünsche dir viel Glück, oder besser gesagt, das beste Können. 68 | 69 | % Ch.~114 will post at \textbf{10\am Pacific (6\pm UTC) on Tuesday, March 3rd, 2015.} 70 | Kapitel~114 wird am Dienstag, 3. März 2015, um 18~Uhr UTC veröffentlicht. 71 | 72 | Ergänzung: 73 | % If you have pending exams, then even though the bystander effect is a thing, I expect that the collective effect of ‘everyone with more urgent life issues stays out of the effort’ shifts the probabilities very little (because diminishing marginal returns on more eyes and an already-huge population that is participating). 74 | Falls du anstehende Prüfungen hast, obwohl der Bystander-Effekt real ist, erwarte ich, dass der kollektive Effekt von ‚jeder, der dringendere Lebensprobleme hat, hält sich besser raus‘ die Wahrscheinlichkeiten nur sehr wenig verändert (weil der Grenzertrag bei mehr Augen und einer bereits großen teilnehmenden Bevölkerung abnimmt). 75 | 76 | % \textbf{So if you can’t take the time, then please don’t.} Like any author, I enjoy the delicious taste of my readers’ suffering, finer than any chocolate; but I don’t want to \emph{hurt} you. 77 | \textbf{Wenn du dir also nicht die Zeit nehmen kannst, dann tu es bitte nicht.} Wie jeder Autor genieße ich den köstlichen Geschmack des Leidens meiner Leser, feiner als jede Schokolade; aber ich möchte dich nicht verletzen. 78 | 79 | % Likewise, if you hate hate hate this sort of thing, then don’t participate! Other people ARE enjoying it. Just come back in a few days. I shouldn’t even need to point this out. 80 | Wenn du diese Art von Dingen hasst, solltest du auch nicht teilnehmen! Andere Leute haben Spaß daran. Komm einfach in ein paar Tagen wieder. Ich sollte das nicht einmal erwähnen müssen. 81 | 82 | % I remind you again that you have hours to think. Use the Hold Off On Proposing Solutions, Luke. 83 | Ich erinnere dich noch einmal daran, dass du Stunden zum Nachdenken hast. Nutze das ‚Keine Lösungen vorschlagen‘, Luke. 84 | 85 | % And really truly, I do mean it, Harry cannot develop any new magical powers or transcend previously stated constraints on them in the next sixty seconds. 86 | Und ganz ehrlich, ich meine es wirklich ernst, Harry kann in den nächsten sechzig Sekunden keine neuen magischen Kräfte entwickeln oder die zuvor genannten Einschränkungen überwinden. 87 | 88 | \later 89 | 90 | % Unsurprisingly, this led to a lot of reader submissions. An awful lot. 91 | Es überrascht nicht, dass dies zu einer Vielzahl von Leserzuschriften führte. Eine unglaubliche Menge. 92 | 93 | % You can see the fallout \href{https://www.reddit.com/r/HPMOR/comments/2xnyi0/113_help_my_evil_plan_has_worked_all_too_well/}{on the /r/HPMOR subreddit}. 94 | % If you’re reading this somewhere that the previous text isn’t a link, you can go to \url{https://www.reddit.com/r/HPMOR} and search for “Help! My evil plan has worked all too well!” 95 | Du kannst das Resultat auf \href{https://www.reddit.com/r/HPMOR/comments/2xnyi0/113_help_my_evil_plan_has_worked_all_too_well/}{im /r/HPMOR Subreddit} einsehen. 96 | Wenn du das hier irgendwo liest, wo der vorherige Text kein Link ist, gehe zu \url{https://www.reddit.com/r/HPMOR} und suche nach ‚Help! My evil plan has worked all too well!‘ 97 | 98 | } 99 | -------------------------------------------------------------------------------- /chapters/hpmor-chapter-000.tex: -------------------------------------------------------------------------------- 1 | % Quelle der Übersetzung: Patneu https://www.fanfiktion.de/s/55610c610004dede273a3811/22/ 2 | % \chapter*{Foreword by Eliezer Yudkowsky} 3 | \chapter*{Vorwort von Eliezer Yudkowsky} 4 | % from https://www.hpmor.com/chapter/1 5 | 6 | % 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”. 7 | 8 | % 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. 9 | Der Text enthält viele Hinweise: offensichtliche Hinweise, nicht so offensichtliche Hinweise, wirklich obskure Hinweise, von denen ich schockiert war, dass sie von einigen Lesern erfolgreich entschlüsselt wurden, und massive Hinweise, die einfach liegen gelassen wurden. Dies ist eine rationalistische Geschichte; ihre Rätsel sind lösbar und dazu gedacht, gelöst zu werden. 10 | 11 | % 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. 12 | Das Tempo der Geschichte ist das einer seriellen Fiktion, d.~h. das einer Fernsehserie, die über eine bestimmte Anzahl von Staffeln läuft, deren Episoden einzeln gezeichnet sind, aber mit einem Gesamtbogen, der auf ein endgültiges Ende hinführt. 13 | 14 | % 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. 15 | Alle erwähnte Wissenschaft ist echte Wissenschaft. Bitte bedenken Sie aber, dass die Ansichten der Charaktere außerhalb des Bereichs der Wissenschaft nicht unbedingt die des Autors sind. Nicht alles, was der Protagonist tut, ist eine Lektion in Weisheit, und Ratschläge, die von dunkleren Charakteren angeboten werden, können unzuverlässig oder gefährlich zweischneidig sein. 16 | 17 | % TODO: better word? 18 | % \chapter*{Introduction} 19 | \chapter*{Einleitung} 20 | % from https://www.hpmor.com/chapter/22 21 | 22 | % \section*{Something, somewhere, somewhen, must have happened differently…} 23 | \section*{Irgendwas, irgendwo, irgendwann muss ganz anders abgelaufen sein …} 24 | 25 | % TODO: improve layout 26 | \begin{itemize} 27 | % \item PETUNIA EVANS married Michael Verres, a Professor of Biochemistry at Oxford. 28 | \item \textsc{Petunia Evans} heiratete Michael Verres, einen Professor für Biochemie in Oxford. 29 | % \item HARRY JAMES POTTER-EVANS-VERRES grew up in a house filled to the brim with books. He once bit a math teacher who didn't know what a logarithm was. He's read \emph{Godel, Escher, Bach} and \emph{Judgment Under Uncertainty: Heuristics and Biases} and volume one of \emph{The Feynman Lectures on Physics}. And despite what everyone who's met him seems to fear, he doesn't want to become the next Dark Lord. He was raised better than that. He wants to discover the laws of magic and become a god. 30 | \item \textsc{Harry James Potter-Evans-Verres} wuchs in einem Haus auf, das bis zum Rand mit Büchern gefüllt war. Er biss einmal eine Mathelehrerin, die nicht wusste, was ein Logarithmus ist. Er hat \emph{Godel, Escher, Bach} und \emph{Judgment Under Uncertainty: Heuristics and Biases} und Band eins der \emph{The Feynman Lectures on Physics} gelesen. Und entgegen dem, was jeder, der ihn kennt, zu fürchten scheint, will er nicht der nächste Dunkle Lord werden. Er wurde besser erzogen. Er will die Gesetze der Magie entdecken und ein Gott werden. 31 | % \item HERMIONE GRANGER is doing better than him in every class except broomstick riding. 32 | \item \textsc{Hermine Granger} ist in allen Fächern besser als er, außer beim Besenreiten. 33 | % \item DRACO MALFOY is exactly what you would expect an eleven-year-old boy to be like if Darth Vader were his doting father. 34 | \item \textsc{Draco Malfoy} ist genauso, wie man es von einem Elfjährigen erwarten würde, wenn Darth Vader sein liebender Vater wäre. 35 | % \item PROFESSOR QUIRRELL is living his lifelong dream of teaching Defense Against the Dark Arts, or as he prefers to call his class, Battle Magic. His students are all wondering what's going to go wrong with the Defense Professor this time. 36 | \item \textsc{Professor Quirrell} lebt seinen Lebenstraum, Verteidigung gegen die dunklen Künste zu unterrichten, oder, wie er seinen Unterricht lieber bezeichnet, Kampfmagie. Seine Schüler fragen sich alle, was diesmal mit dem Verteidigungsprofessor schiefgehen wird. 37 | % \item DUMBLEDORE is either insane, or playing some vastly deeper game which involved setting fire to a chicken. 38 | \item \textsc{Dumbledore} ist entweder verrückt oder spielt ein sehr viel tiefgründigeres Spiel, das es nötig machte, ein Hühnchen in Brand zu stecken. 39 | % \item DEPUTY HEADMISTRESS MINERVA MCGONAGALL needs to go off somewhere private and scream for a while. 40 | \item \textsc{Minerva McGonagall} muss sich erst einmal zurückziehen und eine Weile schreien. 41 | \end{itemize} 42 | 43 | \begin{center} 44 | % % Presenting: 45 | Dies ist: 46 | 47 | \textsc{Harrry Potter and the Methods of Rationality} 48 | 49 | % You ain't guessin' where this one's going. 50 | Du ahnst nicht, wohin diese Reise geht. 51 | \end{center} 52 | 53 | % \section*{Some notes} 54 | \section*{Anmerkungen} 55 | % The opinions of characters in this story are not necessarily those of the author. What warm!Harry thinks is \emph{often} meant as a good pattern to follow, especially if Harry thinks about how he can cite scientific studies to back up a particular principle. But not everything Harry does or thinks is a good idea. That wouldn't work as a story. And the less warm characters may sometimes have valuable lessons to offer, but those lessons may also be dangerously double-edged. 56 | Die Ansichten der Charaktere in dieser Geschichte sind nicht notwendigerweise diejenigen des Autors. Was der ‚warme‘ Harry denkt, ist \emph{meist} als gutes Beispiel zu verstehen, dem man folgen darf, besonders wenn Harry darüber nachdenkt, was für wissenschaftliche Studien er zitieren kann, um ein bestimmtes Prinzip zu untermauern. Doch nicht alles, was Harry tut oder denkt, ist eine gute Idee. Das würde als Geschichte nicht funktionieren. Die weniger warmen Charaktere mögen ab und an wertvolle Lektionen zu bieten haben, doch diese können auch gefährlich zweischneidig sein. 57 | 58 | % If you haven't visited \url{https://hpmor.com}, don't forget to do that at some point; otherwise you'll miss out on the fan art, how to learn everything Harry knows, and more. 59 | 60 | % If you haven't just enjoyed this fic, but learned something from it, then please consider blogging it or tweeting it. A work like this only does as much good as there are people who read it. 61 | Wenn dir diese Geschichte nicht nur gefallen hat, sondern du auch etwas daraus gelernt hast, dann solltest du darüber nachdenken, sie zu teilen oder zu tweeten. Ein Werk wie dieses ist nur so viel wert, wie es Menschen gibt, die es lesen. 62 | -------------------------------------------------------------------------------- /chapters/hpmor-chapter-083.tex: -------------------------------------------------------------------------------- 1 | % Quelle der Übersetzung: Schneefl0cke https://www.fanfiktion.de/s/60044849000ccc541aef297e/83/ 2 | % \partchapter{Taboo Trade-offs, Aftermath}{I} 3 | \partchapter{Tabubrüche, Nachspiel}{I} 4 | 5 | % \lettrine{W}{hen} Padma entered the Transfiguration classroom, she saw that half the class had beaten her there, a strange, deathly silence pervading the room. Harry Potter sat alone in one corner, staring off into some unknown distance, his eyes half-lidded, nearly closed. 6 | \lettrine{A}{ls} Padma das Klassenzimmer betrat, sah sie, dass die halbe Klasse ihr dort zuvorgekommen war, und eine seltsame, tödliche Stille durchdrang den Raum. Harry Potter saß allein in einer Ecke und starrte in eine unbekannte Ferne, die Augen halb geöffnet, fast geschlossen. 7 | 8 | % Rumour said that the Aurors had discovered that the Defence Professor had Polyjuiced as Granger to fool Malfoy. 9 | Gerüchte besagten, dass die Auroren herausgefunden hatten, dass der Verteidigungsprofessor sich als Granger mit Vielsaft Trank verwandelt hatte, um Malfoy zu täuschen. 10 | 11 | % Rumour said that Hermione had been bound by the Unbreakable Vow to be Draco Malfoy’s slave. 12 | Gerüchte besagten, dass Hermine durch den Unbrechbaren Schwur gebunden war, Draco Malfoys Sklavin zu sein. 13 | 14 | % Rumour said that Hermione had had the Dementor’s Kiss. 15 | Gerüchte besagten, Hermine hätte den Kuss des Dementors bekommen. 16 | 17 | % But if \emph{that} were true, Harry Potter wouldn’t be sitting there, he would be— 18 | Aber wenn das wahr wäre, würde Harry Potter nicht dort sitzen, sondern — 19 | 20 | % Padma didn’t know what General Potter would do. Her mind went blank, trying to think about it. 21 | Padma wusste nicht, was General Potter tun würde. Ihr Verstand wurde leer, als sie versuchte, darüber nachzudenken. 22 | 23 | % Even when Professor McGonagall got there, the silence hadn’t broken. The Transfiguration Professor walked up to the board without a pause, erased it with a sweep of her hand, and then began to write. 24 | Selbst als Professor McGonagall ankam, war die Stille nicht gebrochen. Die Verwandlungsprofessorin ging ohne Pause zur Tafel, wischte sie mit einer Handbewegung leer und begann dann zu schreiben. 25 | 26 | % “Today, children,” began the calm professional voice of the Transfiguration Professor, just as though nothing out of the ordinary had happened that week, “we shall learn how much effort it takes to sustain a Transfiguration, and why, at your age, you should not even try. The original Form is not gone, only suppressed; and to maintain that suppression—” 27 | „Heute, Kinder“, begann die ruhige, professionelle Stimme der Professorin, ganz so, als wäre in dieser Woche nichts Außergewöhnliches passiert, „werden wir lernen, wie viel Anstrengung es kostet, eine Verwandlung aufrechtzuerhalten, und warum man es in eurem Alter nicht einmal versuchen sollte. Die ursprüngliche Form ist nicht weg, nur unterdrückt; und um diese Unterdrückung aufrechtzuerhalten —“ 28 | 29 | % “Excuse me,” said Padma Patil. She knew her voice was shaking, she knew that she was trembling visibly, but she had to ask. “Excuse me, Professor, what happened with Miss~Granger?” 30 | „Entschuldigen Sie“, sagte Padma Patil. Sie wusste, dass ihre Stimme zitterte, sie wusste, dass sie sichtlich zitterte, aber sie musste fragen. 31 | „Entschuldigen Sie, Professor, was ist mit Miss~Granger passiert?“ 32 | 33 | % The Transfiguration Professor paused at the board, and turned to look at Padma. The Professor should have looked stern, having been interrupted without a hand being raised, but instead her face was kindly. “You don’t already know, Miss~Patil? I expected that rumour would have spread.” 34 | McGonagall hielt an der Tafel inne und drehte sich um, um Padma anzuschauen. Die Professorin hätte streng dreinschauen müssen, weil sie unterbrochen wurde, ohne die Hand zu heben, aber stattdessen war ihr Gesicht freundlich. 35 | „Sie wissen es nicht schon, Miss~Patil? Ich hatte erwartet, dass sich das Gerücht schon verbreitet hat.“ 36 | 37 | % “There’s too many rumours,” said Padma. “I don’t know what’s true.” 38 | „Es gibt zu viele Gerüchte“, sagte Padma. 39 | „Ich weiß nicht, was wahr ist.“ 40 | 41 | % Morag MacDougal raised her hand, then said without waiting to be called, “I told you, Padma, what’s \emph{true} is that the Wizengamot found Granger guilty and ordered her to get the Dementor’s Kiss and they brought in the Dementor and Potter glued it to the ceiling and wouldn’t let it down until—” 42 | Morag MacDougal hob die Hand und sagte dann, ohne auf eine Aufforderung zu warten: 43 | „Ich habe dir gesagt, Padma, was passiert ist, nämlich dass das Zaubergamot Granger für schuldig befunden hat und es befohlen hat, dass ein Dementor Sie küsst, und sie haben den Dementor hereingebracht und Harry Potter hat ihn an die Decke geklebt und wollte ihn nicht mehr herunterlassen, bis —“ 44 | 45 | % “Oh, dear Merlin,” said Professor McGonagall, her expression growing sharp, but then she visibly calmed herself. “The affair was utterly ridiculous and I shan’t go into detail. Let it stand that Miss~Granger is resting with Madam Pomfrey for now, and coming back to classes tomorrow. And if I catch anyone bothering her, I shall turn them into glass vases and drop them.” 46 | „Oh, lieber Merlin“, sagte Professor McGonagall, ihre Miene wurde scharf, aber dann beruhigte sie sich sichtlich. 47 | „Die Angelegenheit war absolut lächerlich und ich werde nicht ins Detail gehen. Lassen Sie es dabei bewenden, dass Miss~Granger sich vorerst bei Madam Pomfrey ausruht und erst morgen wieder zum Unterricht kommt. Und wenn ich jemanden erwische, der sie belästigt, werde ich ihn in eine Glasvase verwandeln und fallen lassen.“ 48 | 49 | % The entire class gasped at this; it wasn’t so much that the threat was fatal, as that it broke the safety rules for Transfiguration. 50 | Die ganze Klasse keuchte daraufhin auf; es war nicht so sehr, dass die Drohung tödlich war, sondern dass sie die Sicherheitsregeln für Verwandlung brach. 51 | 52 | % Professor McGonagall turned back to her board— 53 | Professor McGonagall wandte sich wieder ihrer Tafel zu — 54 | 55 | % From a corner of the classroom, another voice rose up. “What about Professor Quirrell?” said Terry Boot. “Has he been arrested?” 56 | Aus einer Ecke des Klassenzimmers erhob sich eine weitere Stimme. 57 | „Was ist mit Professor Quirrell?“, fragte Terry Boot. 58 | „Ist er verhaftet worden?“ 59 | 60 | % “The Aurors are only detaining him,” said the Transfiguration Professor without turning around. “If they have not given back our Defence Professor by tomorrow, I shall ask the Headmaster to go fetch him. Though I may as well tell you now that the Board of Governors has scheduled a vote on whether Professor Quirrell’s battles shall be allowed to continue.” 61 | „Die Auroren halten ihn nur in Untersuchungshaft“, sagte der Professor für Verwandlung, ohne sich umzudrehen. 62 | „Wenn Sie uns unseren Verteidigungsprofessor bis morgen nicht zurückgegeben haben, werde ich den Schulleiter bitten, ihn zu holen. Ich kann Ihnen aber auch gleich sagen, dass der Oberste Rat eine Abstimmung darüber angesetzt hat, ob Professor Quirrells Kämpfe weitergeführt werden sollen.“ 63 | 64 | % Kevin Entwhistle spoke. “And General Malfoy? When’s he getting back from St. Mungo’s?” 65 | Kevin Entwhistle ergriff das Wort. 66 | „Und General Malfoy? Wann kommt er aus St.~Mungo zurück?“ 67 | 68 | % The Transfiguration Professor paused in her drawing. 69 | Die Verwandlungsprofessorin hielt in ihrer Zeichnung inne. 70 | 71 | % She turned around again, more slowly, this time. 72 | Sie drehte sich wieder um, diesmal langsamer. 73 | 74 | % “I \emph{am} sorry, Mr~Entwhistle,” said Professor McGonagall. Her face looked a little more lined than when she had entered the room. “Mr~Malfoy’s health is in no danger, I am given to understand. Unfortunately, I have received an owl from Mr~Malfoy’s father withdrawing him from Hogwarts. I am afraid he is not coming back.” 75 | „Es tut mir leid, Mr~Entwhistle“, sagte Professor McGonagall. Ihr Gesicht sah ein wenig faltiger aus, als sie den Raum betreten hatte. 76 | „Die Gesundheit von Mr~Malfoy ist nicht in Gefahr, wie ich zu hören bekam. Aber leider habe ich eine Eule von Mr~Malfoys Vater erhalten, der ihn von Hogwarts abmeldet. Ich fürchte, er wird nicht zurückkommen.“ 77 | -------------------------------------------------------------------------------- /chapters/hpmor-chapter-099.tex: -------------------------------------------------------------------------------- 1 | % Quelle der Übersetzung: Schneefl0cke https://www.fanfiktion.de/s/60044849000ccc541aef297e/99/ 2 | % \chapter{Roles, Aftermath} 3 | \chapter{Rollen, Nachspiel} 4 | 5 | % \lettrine{T}{en} days later, the first dead unicorn was found in the Forbidden Forest. 6 | \lettrine{Z}{ehn} Tage später wurde das erste tote Einhorn im Verbotenen Wald gefunden. 7 | -------------------------------------------------------------------------------- /chapters/translations/.gitignore: -------------------------------------------------------------------------------- 1 | 1-download/ 2 | 2-extract/ 3 | 3-clean/ 4 | 4-latex/ 5 | -------------------------------------------------------------------------------- /chapters/translations/1_download.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # TODO: fix ruff findings 4 | # ruff: noqa 5 | 6 | """ 7 | Download chapter files from the web. 8 | """ 9 | 10 | import os 11 | import sys 12 | 13 | import helper 14 | import requests 15 | 16 | # my helper 17 | 18 | os.chdir(os.path.dirname(sys.argv[0])) 19 | 20 | translations = helper.translations 21 | 22 | # make output dirs 23 | for translator in translations.keys(): 24 | os.makedirs(f"1-download/{translator}/", exist_ok=True) 25 | 26 | 27 | def download_file(url: str, filepath: str): 28 | """ 29 | Download file from url to filepath. 30 | """ 31 | headers = { 32 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 ", # noqa: E501 33 | } 34 | cont = requests.get(url, headers=headers, verify=True, timeout=3).content 35 | # verify=False -> skip SSL cert verification: CERTIFICATE_VERIFY_FAILED 36 | with open(filepath, mode="bw") as fh: 37 | fh.write(cont) 38 | 39 | 40 | def download_all_chapters() -> None: 41 | """ 42 | Download all chapters. 43 | 44 | downloads only if file does not exist yet 45 | """ 46 | url_base = "https://www.fanfiktion.de/s/<---id--->/<---fileNum--->/" 47 | for translator, trans in translations.items(): 48 | chapter = trans["chStart"] 49 | for fileNum in range(1, trans["numFiles"] + 1): 50 | fileOut = f"1-download/{translator}/%03d.html" % chapter 51 | if not os.path.exists(fileOut): 52 | print("downloading chapter %03d" % chapter) 53 | url = url_base.replace("<---id--->", trans["id"]).replace( 54 | "<---fileNum--->", 55 | str(fileNum), 56 | ) 57 | download_file(url=url, filepath=fileOut) 58 | chapter += 1 59 | 60 | 61 | if __name__ == "__main__": 62 | download_all_chapters() 63 | -------------------------------------------------------------------------------- /chapters/translations/2_extract.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # TODO: fix ruff findings 4 | # ruff: noqa 5 | 6 | """ 7 | Extract text from downloaded HTML files. 8 | """ 9 | 10 | import glob 11 | import os 12 | import re 13 | import sys 14 | 15 | import helper 16 | from bs4 import BeautifulSoup # pip install beautifulsoup4 17 | 18 | # my helper 19 | 20 | os.chdir(os.path.dirname(sys.argv[0])) 21 | 22 | translations = helper.translations 23 | translators = translations.keys() 24 | 25 | # make output dirs 26 | for translator in translations.keys(): 27 | os.makedirs(f"2-extract/{translator}/", exist_ok=True) 28 | 29 | 30 | def extract_chapter_text(): 31 | """ 32 | Extract chapter text from html and writes result into 2-extracted/ . 33 | 34 | 2 modifications are done: removal of comments and removal of javascript 35 | """ 36 | for translator in translators: 37 | print("===" + translator + "===") 38 | for fileIn in sorted(glob.glob(f"1-download/{translator}/*.html")): 39 | (filePath, fileName) = os.path.split(fileIn) 40 | fileOut = f"2-extract/{translator}/{fileName}" 41 | with open(fileIn, encoding="utf-8", newline="\n") as fh: 42 | cont = fh.read() 43 | 44 | # cleanup comments and scripts 45 | cont = re.sub("", "", cont, flags=re.DOTALL) 46 | cont = re.sub( 47 | "", 48 | "", 49 | cont, 50 | flags=re.DOTALL | re.IGNORECASE, 51 | ) 52 | 53 | soup = BeautifulSoup(cont, features="html.parser") 54 | 55 | myTitle = "" 56 | myBody = "" 57 | 58 | # find chapter name from dropdown 59 | myElement = soup.find("select", {"id": "kA"}) 60 | myElement = myElement.find("option", {"selected": "selected"}) 61 | myTitle = myElement.text # chars only, no tags 62 | 63 | # find body text 64 | myElement = soup.find("div", {"class": "user-formatted-inner"}) 65 | # myBody = myElement.prettify() 66 | # myBody = myElement.encode() 67 | myBody = str(myElement) 68 | del myElement 69 | 70 | # remove linebreaks and multiple spaces 71 | myTitle = re.sub(r"\s+", " ", myTitle, flags=re.DOTALL | re.IGNORECASE) 72 | print(myTitle) 73 | # remove outer encapsolating div start and end 74 | myBody = re.sub("^]*>", "", myBody, flags=re.DOTALL | re.IGNORECASE) 75 | myBody = re.sub("[^>]*$", "", myBody, flags=re.DOTALL | re.IGNORECASE) 76 | 77 | out = f"

{myTitle}

\n{myBody}\n" 78 | 79 | with open(fileOut, mode="w", encoding="utf-8", newline="\n") as fh: 80 | fh.write(out) 81 | 82 | 83 | if __name__ == "__main__": 84 | extract_chapter_text() 85 | -------------------------------------------------------------------------------- /chapters/translations/4_html2latex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # TODO: fix ruff findings 4 | # ruff: noqa 5 | 6 | """ 7 | Convert HTML to LaTeX. 8 | """ 9 | 10 | import glob 11 | import os 12 | import subprocess 13 | import sys 14 | 15 | import helper 16 | 17 | # my helper 18 | 19 | os.chdir(os.path.dirname(sys.argv[0])) 20 | 21 | translations = helper.translations 22 | translators = translations.keys() 23 | 24 | # make output dirs 25 | for translator in translations.keys(): 26 | os.makedirs(f"4-latex/{translator}/", exist_ok=True) 27 | 28 | 29 | def html2latex(): 30 | """ 31 | Convert LaTeX code to HTML. 32 | """ 33 | for translator in translators: 34 | print("===" + translator + "===") 35 | for fileIn in sorted(glob.glob(f"3-clean/{translator}/*.html")): 36 | print(fileIn) 37 | fileOut = fileIn.replace("3-clean/", "4-latex/").replace(".html", ".tex") 38 | # pandoc -s fileIn -o fileOut 39 | process = subprocess.run( 40 | ["pandoc", "-s", fileIn, "-o", fileOut], 41 | capture_output=True, 42 | text=True, 43 | check=False, 44 | ) 45 | print(process.stdout) 46 | 47 | 48 | if __name__ == "__main__": 49 | html2latex() 50 | -------------------------------------------------------------------------------- /chapters/translations/5_latex_cleanup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # TODO: fix ruff findings 4 | # ruff: noqa 5 | 6 | """ 7 | Cleanup LaTeX Code. 8 | """ 9 | 10 | import glob 11 | import os 12 | import re 13 | import sys 14 | 15 | import helper 16 | 17 | # my helper 18 | 19 | os.chdir(os.path.dirname(sys.argv[0])) 20 | 21 | translations = helper.translations 22 | translators = translations.keys() 23 | 24 | settings = {"lang": "DE"} 25 | 26 | # make output dirs 27 | for translator in translations.keys(): 28 | os.makedirs(f"5-latex-clean/{translator}/", exist_ok=True) 29 | 30 | 31 | def loop_files_for_cleanup(): 32 | """ 33 | Loop over all files. 34 | 35 | Call cleanup_latex() 36 | """ 37 | for translator in translators: 38 | print("===" + translator + "===") 39 | for fileIn in sorted(glob.glob(f"4-latex/{translator}/*.tex")): 40 | fileOut = fileIn.replace("4-latex/", "5-latex-clean/") 41 | with open(fileIn, encoding="utf-8") as fh: 42 | cont = fh.read() 43 | cont = cleanup_latex(s=cont) 44 | with open(fileOut, mode="w", encoding="utf-8", newline="\n") as fh: 45 | fh.write(cont) 46 | 47 | 48 | def cleanup_latex(s): 49 | """ 50 | Clean LaTeX Code. 51 | """ 52 | # end of line 53 | s = re.sub(r"\r\n", "\n", s) 54 | s = re.sub(r"^.*\\begin\{document\}", "", s, flags=re.DOTALL) 55 | s = re.sub(r"\\end\{document\}.*$", "", s, flags=re.DOTALL) 56 | 57 | # quotations 58 | s = s.replace("''", '"') 59 | s = s.replace("``", "“") 60 | # "...“ -> „...“ 61 | s = re.sub(r"\"([^\"]+)“", r"„\1“", s) 62 | 63 | # latex stuff 64 | s = s.replace("{}", "") 65 | s = re.sub(r"(?<=\n)\\hfill\\break *", r"", s) 66 | # s = re.sub(r"(?<=\n)\\hypertarget.*$", r"", s) 67 | s = s.replace(r"\maketitle", "") 68 | s = s.replace(r"\ldots", "…") 69 | s = s.replace("\\\\", "\n\n") 70 | 71 | # empty lines 72 | s = re.sub(r"\n\n\n+", "\n\n", s) 73 | 74 | # \later 75 | s = re.sub(r"\-\-\-\-+", r"\\later", s) 76 | s = re.sub(r"\* \* \*", r"\\later", s) 77 | 78 | # 1 line per paragraph 79 | s = re.sub(r"(? str: 107 | """ 108 | Fix spaces. 109 | """ 110 | # trailing spaces 111 | s = re.sub(r" +$", "", s) 112 | # remove spaces from empty lines 113 | s = re.sub(r"^\s+$", "", s) 114 | # multiple spaces (excluding start of new line) 115 | s = re.sub(r"(? str: 120 | # Latex: \begin and \end{...} at new line 121 | s = re.sub(r"([^\s+%])\s*\\(begin|end)\{", r"\1\n\\\2{", s) 122 | # Latex: \\ at new line 123 | s = re.sub(r"\\\\\s*(?!$)", r"\\\\\n", s) 124 | return s 125 | 126 | 127 | def fix_dots(s: str) -> str: 128 | # ... -> … 129 | s = s.replace("...", "…") 130 | # ... with spaces around 131 | s = s.replace(" … ", "…") 132 | # NOT '… ' as in ', no… “I' 133 | # s = re.sub(r" *… *", r"…", s) 134 | 135 | # … at end of quotation ' …"' -> '…"' 136 | s = s.replace(' …"', '…"') 137 | # … at end of line 138 | s = re.sub(r" +…\n", r"…\n", s) 139 | # Word…"Word -> Word…" Word 140 | s = re.sub(r'(\w…")(\w)', r"\1 \2", s) 141 | # … after . or , 142 | s = re.sub(r"([,\.])…", r"\1 …", s) 143 | return s 144 | 145 | 146 | def fix_MrMrs(s: str) -> str: 147 | # Mr / Mrs 148 | s = s.replace("Mr. H. Potter", "Mr~H.~Potter") 149 | # s = s.replace("Mr. Potter", "Mr~Potter") 150 | s = re.sub(r"\b(Mr|Mrs|Miss|Dr)\b\.?\s+(?!”)", r"\1~", s) 151 | # Dr.~ -> Dr~Potter 152 | s = re.sub(r"\b(Mr|Mrs|Miss|Dr)\b\.~", r"\1~", s) 153 | # "Dr. " -> "Dr~" 154 | # s = re.sub(r"\b(Dr)\b\.?~?\s*", r"\1~", s) 155 | # s = s.replace("Mr~and Mrs~", "Mr and Mrs~") 156 | return s 157 | 158 | 159 | def fix_numbers(s: str) -> str: 160 | if settings["lang"] == "DE": 161 | s = re.sub(r"(\d) +(Uhr)", r"\1~\2", s) 162 | return s 163 | 164 | 165 | def fix_common_typos(s: str) -> str: 166 | if settings["lang"] == "DE": 167 | s = s.replace("ut mir Leid", "ut mir leid") 168 | return s 169 | 170 | 171 | def fix_quotations(s: str) -> str: 172 | # in EN the quotations are “...” and ‘...’ 173 | # in DE the quotations are „...“ 174 | 175 | # "....." -> “.....” 176 | if settings["lang"] == "EN": 177 | s = re.sub(r'"([^"]+)"', r"“\1”", s) 178 | if settings["lang"] == "DE": 179 | s = re.sub(r'"([^"]+)"', r"„\1“", s) 180 | 181 | # fixing ' "Word..."' and ' "\command..."' 182 | if settings["lang"] == "EN": 183 | s = re.sub(r'(^|\s)"((\\|\w).*?)"', r"\1“\2”", s) 184 | if settings["lang"] == "DE": 185 | s = re.sub(r'(^|\s)"((\\|\w).*?)"', r"\1„\2“", s) 186 | 187 | # space between "…" and "“" 188 | if settings["lang"] == "EN": 189 | s = re.sub(r"…„", r"… “", s) 190 | if settings["lang"] == "DE": 191 | s = re.sub(r"…„", r"… „", s) 192 | 193 | # ” } -> ”} 194 | if settings["lang"] == "EN": 195 | s = s.replace("” }", "”} ") 196 | if settings["lang"] == "DE": 197 | s = s.replace("“ }", "“} ") 198 | # now fix possible new double spaces created by line above 199 | s = re.sub(r"(? “\emph{.....}” 204 | if settings["lang"] == "EN": 205 | s = re.sub(r"\\(emph|shout)\{“([^”]+?)”\}", r"“\\\1{\2}”", s) 206 | if settings["lang"] == "DE": 207 | s = re.sub(r"\\(emph|shout)\{„([^“]+?)“\}", r"„\\\1{\2}“", s) 208 | 209 | # lone “ at end of \emph 210 | # “...\emph{.....”} -> “...\emph{.....}” 211 | if settings["lang"] == "EN": 212 | s = re.sub(r"(\\emph\{[^“]+?)”\}", r"\1}”", s) 213 | if settings["lang"] == "DE": 214 | s = re.sub(r"(\\emph\{[^„]+?)“\}", r"\1}“", s) 215 | 216 | if settings["lang"] == "DE": 217 | # migrate EN quotations 218 | s = re.sub(r"“([^“”]+?)”", r"„\1“", s) 219 | 220 | # migrate EN quotations at first word of chapter 221 | s = re.sub(r"\\(lettrine|lettrinepara)\[ante=“\]", r"\\\1[ante=„]", s) 222 | return s 223 | 224 | 225 | def fix_emph(s: str) -> str: 226 | # space at start of emph 227 | s = re.sub(r"(\\emph{) +", " \1", s) 228 | 229 | # move punctuation out of 1-word-emph 230 | # ... \emph{WORD.} -> \emph{WORD}. 231 | # Note: only for , and . 232 | if settings["lang"] == "EN": 233 | s = re.sub(r"(? \emph{... \emph{word} ... 239 | # s = re.sub(r"(\\emph\{[^\}]+)\} ([^ ]+) \\emph\{", r"\1 \\emph{\2} ", s) 240 | return s 241 | 242 | 243 | def fix_hyphens(s: str) -> str: 244 | # --- -> em dash — 245 | s = s.replace("---", "—") 246 | s = s.replace("--", "—") 247 | # hyphens: (space-hyphen-space) should be "—" (em dash). 248 | # trim space around em-dash 249 | s = s.replace(" — ", "—") 250 | # NOT for '— ' as in ', no— “I' 251 | # s = re.sub(r"— ", r"—", s) 252 | 253 | # - at start of line 254 | s = re.sub(r"^[\-—] *", r"—", s) 255 | # - at start of line 256 | s = re.sub(r" [\-—]$", r"—", s) 257 | # - at end of emph 258 | s = re.sub(r"(\s*)\-\}", r"—}\1", s) 259 | # - at end of quote 260 | if settings["lang"] == "EN": 261 | s = re.sub(r"(\s*)\-”", r"—”\1", s) 262 | if settings["lang"] == "DE": 263 | s = re.sub(r"(\s*)\-“", r"—“\1", s) 264 | 265 | # space-hyphen-quotation end 266 | if settings["lang"] == "EN": 267 | s = re.sub(r"\s+(—”)", r"\1", s) 268 | if settings["lang"] == "DE": 269 | s = re.sub(r"\s+(—“)", r"\1", s) 270 | 271 | # there is a shorter dash as well: 272 | # 2-4 -> 2–4 using mid length hyphen 273 | s = re.sub(r"(\d)\-(?=\d)", r"\1–", s) 274 | # NOT: mid-length dash -> em dash (caution: false positives!) 275 | # s = s.replace("–", "—") 276 | return s 277 | 278 | 279 | if __name__ == "__main__": 280 | loop_files_for_cleanup() 281 | -------------------------------------------------------------------------------- /chapters/translations/helper.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | """ 3 | Helper config file. 4 | """ 5 | 6 | translations = { 7 | "Schneefl0cke": {"id": "60044849000ccc541aef297e", "chStart": 0, "numFiles": 121}, 8 | "Jost": {"id": "4cb8beb50000203e067007d0", "chStart": 1, "numFiles": 21}, 9 | "DieFuechsin": { 10 | "id": "5c793dfe000a402030774dc7", 11 | "chStart": 34 - 1, 12 | "numFiles": 46, 13 | }, 14 | "Patneu": {"id": "55610c610004dede273a3811", "chStart": 1, "numFiles": 38}, 15 | "TralexHPMOR": {"id": "59a29b7f000813c22ec1454b", "chStart": 22, "numFiles": 6}, 16 | } 17 | -------------------------------------------------------------------------------- /cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "language": "de-DE,en-US", 3 | "ignorePaths": [ 4 | ".gitignore", 5 | "Dockerfile", 6 | "GNUmakefile" 7 | ], 8 | "ignoreWords": [ 9 | "erstmal" 10 | ], 11 | "dictionaryDefinitions": [ 12 | { 13 | "name": "hpmor", 14 | "path": "./cspell-words.txt" 15 | } 16 | ], 17 | "dictionaries": [ 18 | "hpmor" 19 | ], 20 | "languageSettings": [ 21 | { 22 | "languageId": "latex", 23 | "dictionaries": [ 24 | "hpmor", 25 | "latex" 26 | ], 27 | "ignoreRegExpList": [ 28 | "(^| )%.*" 29 | ] 30 | }, 31 | { 32 | "languageId": "python", 33 | "allowCompoundWords": true, 34 | "dictionaries": [ 35 | "python", 36 | "wordsEn", 37 | "wordsEnUS" 38 | ] 39 | } 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /fonts/AlegreyaSans/AlegreyaSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/AlegreyaSans/AlegreyaSans-LightItalic.ttf -------------------------------------------------------------------------------- /fonts/AlegreyaSans/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Juan Pablo del Peral (juan@huertatipografica.com), with Reserved Font Names 'Alegreya Sans' 2 | 3 | 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: 7 | http://scripts.sil.org/OFL 8 | 9 | 10 | # SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 11 | 12 | 13 | ### PREAMBLE 14 | 15 | The goals of the Open Font License (OFL) are to stimulate worldwide 16 | development of collaborative font projects, to support the font creation 17 | efforts of academic and linguistic communities, and to provide a free and 18 | open framework in which fonts may be shared and improved in partnership 19 | with others. 20 | 21 | The OFL allows the licensed fonts to be used, studied, modified and 22 | redistributed freely as long as they are not sold by themselves. The 23 | fonts, including any derivative works, can be bundled, embedded, 24 | redistributed and/or sold with any software provided that any reserved 25 | names are not used by derivative works. The fonts and derivatives, 26 | however, cannot be released under any other type of license. The 27 | requirement for fonts to remain under this license does not apply 28 | to any document created using the fonts or their derivatives. 29 | 30 | ### DEFINITIONS 31 | 32 | "Font Software" refers to the set of files released by the Copyright 33 | Holder(s) under this license and clearly marked as such. This may 34 | include source files, build scripts and documentation. 35 | 36 | "Reserved Font Name" refers to any names specified as such after the 37 | copyright statement(s). 38 | 39 | "Original Version" refers to the collection of Font Software components as 40 | distributed by the Copyright Holder(s). 41 | 42 | "Modified Version" refers to any derivative made by adding to, deleting, 43 | or substituting -- in part or in whole -- any of the components of the 44 | Original Version, by changing formats or by porting the Font Software to a 45 | new environment. 46 | 47 | "Author" refers to any designer, engineer, programmer, technical 48 | writer or other person who contributed to the Font Software. 49 | 50 | ### PERMISSION & CONDITIONS 51 | 52 | Permission is hereby granted, free of charge, to any person obtaining 53 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 54 | redistribute, and sell modified and unmodified copies of the Font 55 | Software, subject to the following conditions: 56 | 57 | 1. Neither the Font Software nor any of its individual components, 58 | in Original or Modified Versions, may be sold by itself. 59 | 60 | 2. Original or Modified Versions of the Font Software may be bundled, 61 | redistributed and/or sold with any software, provided that each copy 62 | contains the above copyright notice and this license. These can be 63 | included either as stand-alone text files, human-readable headers or 64 | in the appropriate machine-readable metadata fields within text or 65 | binary files as long as those fields can be easily viewed by the user. 66 | 67 | 3. No Modified Version of the Font Software may use the Reserved Font 68 | Name(s) unless explicit written permission is granted by the corresponding 69 | Copyright Holder. This restriction only applies to the primary font name as 70 | presented to the users. 71 | 72 | 4. The name(s) of the Copyright Holder(s) or the Author(s) of the Font 73 | Software shall not be used to promote, endorse or advertise any 74 | Modified Version, except to acknowledge the contribution(s) of the 75 | Copyright Holder(s) and the Author(s) or with their explicit written 76 | permission. 77 | 78 | 5. The Font Software, modified or unmodified, in part or in whole, 79 | must be distributed entirely under this license, and must not be 80 | distributed under any other license. The requirement for fonts to 81 | remain under this license does not apply to any document created 82 | using the Font Software. 83 | 84 | ### TERMINATION 85 | 86 | This license becomes null and void if any of the above conditions are 87 | not met. 88 | 89 | ### DISCLAIMER 90 | 91 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 92 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 93 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 94 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 95 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 96 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 97 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 98 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 99 | OTHER DEALINGS IN THE FONT SOFTWARE. 100 | -------------------------------------------------------------------------------- /fonts/Florante/Florante.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/Florante/Florante.ttf -------------------------------------------------------------------------------- /fonts/Licenses.md: -------------------------------------------------------------------------------- 1 | # Font Licenses 2 | 3 | There follow author license details for all the fonts supplied. Where available, a web page is given. 4 | 5 | ## Alegreya 6 | 7 | By Juan Pablo del Peral, distributed under the SIL Open Font License 1.1; see `alegreya/SIL Open Font License.txt`. 8 | 9 | ## Alegreya Sans 10 | 11 | By Juan Pablo del Paral, distributed under the SIL Open Font License 1.1; see `AlegreyaSans/LICENSE.md`. 12 | 13 | ## Architects Daughter 14 | 15 | By Kimberley Gesweln, distributed under the SIL Open Font License 1.1; see `architects-daughter/SIL Open Font License.txt`. 16 | 17 | ## Florante at Laura 18 | 19 | Free font by Nyek! Pinoy Komek Fonts; see `Florante/Nyek! License.txt`. 20 | 21 | ## Lumos 22 | 23 | Freeware by Sarah McFalls; see `lumos/readme.txt`. The web page listed there is now at: http://www.geocities.ws/carpesaponem/lumos.htm 24 | 25 | ## Miscelanea 26 | 27 | FIXME: This contains the star glyphs for the 3-star divider. The author and license are currently unknown, but the font seems to have been produced specifically for HPMOR. 28 | 29 | ## NarniaBLL 30 | 31 | Freeware for personal use only by Luis Huacuja García; see `narnia_bll/SpecialReadMe.txt`. 32 | 33 | ## Ringbearer 34 | 35 | Freeware for non-commercial use only by Pete Klassen; see `ringbearer/readme.html`. 36 | 37 | ## Thundercats 38 | 39 | Freeware by Neale Davidson. Redistribution not allowed without written consent; this consent was obtained on 26th May 2017. See `thundercats/Thundercats.txt`. 40 | 41 | ## Twilight 42 | 43 | Freeware by sheslikeadream; see http://www.fonts2u.com/twilight.font 44 | -------------------------------------------------------------------------------- /fonts/Miscelanea.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/Miscelanea.ttf -------------------------------------------------------------------------------- /fonts/Parseltongue/PARSELTO.TTF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/Parseltongue/PARSELTO.TTF -------------------------------------------------------------------------------- /fonts/Parseltongue/Parseltongue.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/Parseltongue/Parseltongue.ttf -------------------------------------------------------------------------------- /fonts/Parseltongue/readme.txt: -------------------------------------------------------------------------------- 1 | Original font: https://www.harrypotterfanzone.com/fonts/parseltongue-font/ 2 | yeKcim adds accents: 2022-02-27 3 | -------------------------------------------------------------------------------- /fonts/Twilight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/Twilight.ttf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-Black.otf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-BlackItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-BlackItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-Bold.otf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-BoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-BoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-Italic.otf -------------------------------------------------------------------------------- /fonts/alegreya/Alegreya-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/Alegreya-Regular.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-Black.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-BlackItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-BlackItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-Bold.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-BoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-BoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-Italic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSC-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSC-Regular.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Black.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-BlackItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-BlackItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Bold.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-BoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-BoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-ExtraBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-ExtraBold.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-ExtraBoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-ExtraBoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Italic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Light.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-LightItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-LightItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Medium.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-MediumItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-MediumItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Regular.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-Thin.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSans-ThinItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSans-ThinItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Black.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Black.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-BlackItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-BlackItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Bold.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-BoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-BoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-ExtraBold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-ExtraBold.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-ExtraBoldItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-ExtraBoldItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Italic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Light.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-LightItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-LightItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Medium.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-MediumItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-MediumItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Regular.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-Thin.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-Thin.otf -------------------------------------------------------------------------------- /fonts/alegreya/AlegreyaSansSC-ThinItalic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/alegreya/AlegreyaSansSC-ThinItalic.otf -------------------------------------------------------------------------------- /fonts/alegreya/SIL Open Font License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, Juan Pablo del Peral (juan@huertatipografica.com.ar), with Reserved Font Names 'Alegreya Sans' 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 5 | 6 | ----------------------------------------------------------- 7 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 8 | ----------------------------------------------------------- 9 | 10 | PREAMBLE 11 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 12 | 13 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 14 | 15 | DEFINITIONS 16 | "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 17 | 18 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s). 19 | 20 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). 21 | 22 | "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 23 | 24 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 25 | 26 | PERMISSION & CONDITIONS 27 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 28 | 29 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 30 | 31 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 32 | 33 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 34 | 35 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 36 | 37 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 38 | 39 | TERMINATION 40 | This license becomes null and void if any of the above conditions are not met. 41 | 42 | DISCLAIMER 43 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. 44 | -------------------------------------------------------------------------------- /fonts/automobile_contest/Automobile Contest.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/automobile_contest/Automobile Contest.otf -------------------------------------------------------------------------------- /fonts/automobile_contest/Automobile Contest.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/automobile_contest/Automobile Contest.ttf -------------------------------------------------------------------------------- /fonts/gabriele_bad_ah/gabriele-bad.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/gabriele_bad_ah/gabriele-bad.ttf -------------------------------------------------------------------------------- /fonts/gabriele_bad_ah/gabriele.txt: -------------------------------------------------------------------------------- 1 | Gabriele Font Series 2 | ==================== 3 | Gabriele was the name of his granddaughter. In 1957 Max Grundig, German industrialist, bought the two companies Triumph and Adler and merged them into his office machine label 'Triumph Adler'. Thus, 'Gabriele' became the name of a popular series of typewriters in postwar Germany. 4 | 5 | We have chosen this name for our series of typewriter fonts in reminiscence of those machines and all the ladies (called Gabriele or not) that used to type on them from the 1950s to the '80s. 6 | 7 | Ah, yes, another typewriter font. 8 | 9 | Well sort of. We are aware that there are quite a few of them around. But unlike Gabriele, most are not free for commercial use and/or have problems with umlauts and other extended characters. Gabriele has a complete West European charset, the ribbon members even many East European characters. These are monospaced fonts. The characters have all the same width - with the exception of the "ellipsis" character ("...") which is of course three spaces wide. Naturally, these fonts have and need no kerning. 10 | 11 | The Ribbon members of the Gabriele are based on the Dave-Rakowski font "Harting". On his former font activity Dave says on his web site http://home.earthlink.net/~ziodavino/album1_009.htm: 12 | "At this point, I'm no longer interested in the care and feeding of typefaces, and am ignoring any e-mails about fonts that come my way. Y'all may continue to do what you wish with the shareware fonts". 13 | On this basis I have refrained from bothering Dave and have done as I wished. 14 | 15 | Gabriele Bad is named after the somewhat darker and grungy look. Inside, she's really nice. Looking similar to the other two but not based on Rakowski's work. This is the darkest one of the three. She's not so good at Eastern European languages, but she can type Turkish fluently. 16 | 17 | All three fonts are free to use personally, publicly and commercially. Please respect the following license for redistribution. 18 | 19 | 20 | LICENSE 21 | ======= 22 | Use 23 | --- 24 | You may use this font software free of charge and at your own risk for both personal and commercial use. 25 | 26 | Conversion and modification 27 | --------------------------- 28 | You may convert this font to other formats including web font formats or modify it for your own purposes. You may use web font formats of this font to display text on your web pages, but you may not explicitly offer converted or modified versions of this font software for download or re-use by others, unless you have received permission in writing to do so. 29 | 30 | Distribution 31 | ------------ 32 | You may distribute this font on digital media or as a download on your website as long as you comply with the following rules. Violation of one or more of these rules terminates your distribution license and you have to stop distribution immediately: 33 | 34 | 1. You may offer the font only in form of a ZIP file containing only the font software and this readme file. 35 | 2. You are not allowed to distribute the font software without this text file. 36 | 3. You may not redistribute modified or converted copies of the font software (see above). 37 | 4. You may not add advertising messages in text or graphics form to the zip file. 38 | 5. You are not allowed to create a self-extracting executable file containing the font software or require the user to run or install a download manager or other software to get the download. 39 | 6. You may not charge money for the download. 40 | 7. If you want to distribute this font on storage media (CD DVD) produced in numbers of more than 50 identical copies, you must send Fontgrube a specimen copy. 41 | -------------------------------------------------------------------------------- /fonts/graphe/Graphe_Alpha_alt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/graphe/Graphe_Alpha_alt.ttf -------------------------------------------------------------------------------- /fonts/lumos/Lumos.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/lumos/Lumos.ttf -------------------------------------------------------------------------------- /fonts/lumos/readme.txt: -------------------------------------------------------------------------------- 1 | 2024, norwd note: ĉĝĥĵŝŭ… added 2 | 2022, yeKcim note: éêèàœ… added 3 | 4 | N.B. This version of Lumos has had some glyphs added for HPMOR 5 | 6 | 7 | --------------------------------------------------August 4, 2000------ 8 | readme altered 11-3-01 9 | Hi there! Thanks for checking out Lumos v.1, a freeware font inspired 10 | by the Harry Potter books! I made this font after long unsuccessful 11 | searches for the display font used in the US editions of Harry Potter. 12 | I am excited to use the font, and I am equally happy to share it with 13 | other fans of J.K. Rowling's fabulous books. 14 | 15 | TO USE THIS FONT: copy lumos.ttf to your Fonts folder in the Windows 16 | directory. 17 | 18 | You can use it in CAPS ONLY for a more true-to-the-book look, or use 19 | the 'small-caps' (lowercase) letters which have a few quirky variations. 20 | Don't forget to be on the lookout for the hidden dingbats -- I think I 21 | put in six. If you look really hard, you might find the super-tiny 22 | golden snitch! :-) 23 | 24 | You are welcome to share this font with your friends. Please distribute 25 | it with this readme (the zip file is an easy way to pass it along!) 26 | 27 | Enjoy! 28 | ><> Sarah McFalls 29 | CarpeSaponem Fonts 30 | hedwig@owlmail.com <---contact me here w/any questions! 31 | http://www.geocities.com/carpesaponem/ 32 | -------------------------------------------------------------------------------- /fonts/narnia_bll/NarniaBLL.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/narnia_bll/NarniaBLL.ttf -------------------------------------------------------------------------------- /fonts/narnia_bll/SpecialReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/narnia_bll/SpecialReadMe.txt -------------------------------------------------------------------------------- /fonts/ringbearer/RingBearer.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/ringbearer/RingBearer.ttf -------------------------------------------------------------------------------- /fonts/ringbearer/liesmich.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/ringbearer/liesmich.html -------------------------------------------------------------------------------- /fonts/ringbearer/readme.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/ringbearer/readme.html -------------------------------------------------------------------------------- /fonts/thundercats/Thundercats.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/fonts/thundercats/Thundercats.ttf -------------------------------------------------------------------------------- /fonts/thundercats/Thundercats.txt: -------------------------------------------------------------------------------- 1 | Thundercats (True Type Font) 2 | ---------------------------- 3 | Based on the logo from the toyline and cartoon. Lots of sharp angles and 4 | 'mis-sized' letters to give a stylized fantasy look. 5 | 6 | Legal Notice 7 | ------------ 8 | This font is released as freeware. It may not be sold, manipulated, edited, 9 | or redistributed without direct written consent by Neale Davidson. It may be 10 | used without royalties for any reasonable purpose. 11 | 12 | Version Information 13 | ------------------- 14 | 1.00 - August 28, 2000 15 | 16 | Special Symbols 17 | --------------- 18 | 19 | '@' - Thundercats logo 20 | 21 | 22 | Written permission for distribution with HPMOR: 23 | 24 | From: Pixelsagas Contact 25 | To: Reuben Thomas 26 | Date: Thu, 25 May 2017 20:16:04 -0400 27 | 28 | Thanks for checking with me! The biggest concern was that it would 29 | get “wild” without the license text along with it or resold in a 30 | bundle. As long as the license stays paired up as it is in the GitHub, this 31 | should be fine. 32 | 33 | Enjoy! 34 | -------------------------------------------------------------------------------- /hpmor-1.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-1} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-001} 15 | \include{chapters/hpmor-chapter-002} 16 | \include{chapters/hpmor-chapter-003} 17 | \include{chapters/hpmor-chapter-004} 18 | \include{chapters/hpmor-chapter-005} 19 | \include{chapters/hpmor-chapter-006} 20 | \include{chapters/hpmor-chapter-007} 21 | \include{chapters/hpmor-chapter-008} 22 | \include{chapters/hpmor-chapter-009} 23 | \include{chapters/hpmor-chapter-010} 24 | \include{chapters/hpmor-chapter-012} 25 | \include{chapters/hpmor-chapter-013} 26 | \include{chapters/hpmor-chapter-014} 27 | \include{chapters/hpmor-chapter-015} 28 | \include{chapters/hpmor-chapter-016} 29 | \include{chapters/hpmor-chapter-017} 30 | \include{chapters/hpmor-chapter-018} 31 | \include{chapters/hpmor-chapter-019} 32 | \include{chapters/hpmor-chapter-020} 33 | \include{chapters/hpmor-chapter-021} 34 | 35 | % \include{layout/hp-colophon} 36 | \end{document} 37 | -------------------------------------------------------------------------------- /hpmor-2.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-2} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-022} 15 | \include{chapters/hpmor-chapter-023} 16 | \include{chapters/hpmor-chapter-024} 17 | \include{chapters/hpmor-chapter-025} 18 | \include{chapters/hpmor-chapter-026} 19 | \include{chapters/hpmor-chapter-027} 20 | \include{chapters/hpmor-chapter-028} 21 | \include{chapters/hpmor-chapter-029} 22 | \include{chapters/hpmor-chapter-030} 23 | \include{chapters/hpmor-chapter-031} 24 | \include{chapters/hpmor-chapter-032} 25 | \include{chapters/hpmor-chapter-033} 26 | \include{chapters/hpmor-chapter-034} 27 | \include{chapters/hpmor-chapter-035} 28 | \include{chapters/hpmor-chapter-036} 29 | \include{chapters/hpmor-chapter-037} 30 | 31 | % \include{layout/hp-colophon} 32 | \end{document} 33 | -------------------------------------------------------------------------------- /hpmor-3.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-3} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-038} 15 | \include{chapters/hpmor-chapter-039} 16 | \include{chapters/hpmor-chapter-040} 17 | \include{chapters/hpmor-chapter-041} 18 | \include{chapters/hpmor-chapter-042} 19 | \include{chapters/hpmor-chapter-043} 20 | \include{chapters/hpmor-chapter-044} 21 | \include{chapters/hpmor-chapter-045} 22 | \include{chapters/hpmor-chapter-046} 23 | \include{chapters/hpmor-chapter-047} 24 | \include{chapters/hpmor-chapter-048} 25 | \include{chapters/hpmor-chapter-049} 26 | \include{chapters/hpmor-chapter-050} 27 | \include{chapters/hpmor-chapter-051} 28 | \include{chapters/hpmor-chapter-052} 29 | \include{chapters/hpmor-chapter-053} 30 | \include{chapters/hpmor-chapter-054} 31 | \include{chapters/hpmor-chapter-055} 32 | \include{chapters/hpmor-chapter-056} 33 | \include{chapters/hpmor-chapter-057} 34 | \include{chapters/hpmor-chapter-058} 35 | \include{chapters/hpmor-chapter-059} 36 | \include{chapters/hpmor-chapter-060} 37 | \include{chapters/hpmor-chapter-061} 38 | \include{chapters/hpmor-chapter-062} 39 | \include{chapters/hpmor-chapter-063} 40 | 41 | % \include{layout/hp-colophon} 42 | \end{document} 43 | -------------------------------------------------------------------------------- /hpmor-4.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-4} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-064} % OMake 15 | \include{chapters/hpmor-chapter-065} 16 | \include{chapters/hpmor-chapter-066} 17 | \include{chapters/hpmor-chapter-067} 18 | \include{chapters/hpmor-chapter-068} 19 | \include{chapters/hpmor-chapter-069} 20 | \include{chapters/hpmor-chapter-070} 21 | \include{chapters/hpmor-chapter-071} 22 | \include{chapters/hpmor-chapter-072} 23 | \include{chapters/hpmor-chapter-073} 24 | \include{chapters/hpmor-chapter-074} 25 | \include{chapters/hpmor-chapter-075} 26 | \include{chapters/hpmor-chapter-076} 27 | \include{chapters/hpmor-chapter-077} 28 | \include{chapters/hpmor-chapter-078} 29 | \include{chapters/hpmor-chapter-079} 30 | \include{chapters/hpmor-chapter-080} 31 | \include{chapters/hpmor-chapter-081} 32 | \include{chapters/hpmor-chapter-082} 33 | \include{chapters/hpmor-chapter-083} 34 | \include{chapters/hpmor-chapter-084} 35 | \include{chapters/hpmor-chapter-085} 36 | 37 | % \include{layout/hp-colophon} 38 | \end{document} 39 | -------------------------------------------------------------------------------- /hpmor-5.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-5} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-086} 15 | \include{chapters/hpmor-chapter-087} 16 | \include{chapters/hpmor-chapter-088} 17 | \include{chapters/hpmor-chapter-089} 18 | \include{chapters/hpmor-chapter-090} 19 | \include{chapters/hpmor-chapter-091} 20 | \include{chapters/hpmor-chapter-092} 21 | \include{chapters/hpmor-chapter-093} 22 | \include{chapters/hpmor-chapter-094} 23 | \include{chapters/hpmor-chapter-095} 24 | \include{chapters/hpmor-chapter-096} 25 | \include{chapters/hpmor-chapter-097} 26 | \include{chapters/hpmor-chapter-098} 27 | \include{chapters/hpmor-chapter-099} 28 | 29 | % \include{layout/hp-colophon} 30 | \end{document} 31 | -------------------------------------------------------------------------------- /hpmor-6.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title-6} 7 | \input{layout/hp-intro} 8 | \pagenumbering{gobble} 9 | \input{layout/hp-contents} 10 | \cleartorecto 11 | } 12 | \pagenumbering{arabic} 13 | 14 | \include{chapters/hpmor-chapter-100} 15 | \include{chapters/hpmor-chapter-101} 16 | \include{chapters/hpmor-chapter-102} 17 | \include{chapters/hpmor-chapter-103} 18 | \include{chapters/hpmor-chapter-104} 19 | \include{chapters/hpmor-chapter-105} 20 | \include{chapters/hpmor-chapter-106} 21 | \include{chapters/hpmor-chapter-107} 22 | \include{chapters/hpmor-chapter-108} 23 | \include{chapters/hpmor-chapter-109} 24 | \include{chapters/hpmor-chapter-110} 25 | \include{chapters/hpmor-chapter-111} 26 | \include{chapters/hpmor-chapter-112} 27 | \include{chapters/hpmor-chapter-113} 28 | \include{chapters/hp-exam} 29 | \include{chapters/hpmor-chapter-114} 30 | \include{chapters/hpmor-chapter-115} 31 | \include{chapters/hpmor-chapter-116} 32 | \include{chapters/hpmor-chapter-117} 33 | \include{chapters/hpmor-chapter-118} 34 | \include{chapters/hpmor-chapter-119} 35 | \include{chapters/hpmor-chapter-120} 36 | \include{chapters/hpmor-chapter-121} 37 | \include{chapters/hpmor-chapter-122} 38 | 39 | % \include{layout/hp-colophon} 40 | \end{document} 41 | -------------------------------------------------------------------------------- /hpmor.tex: -------------------------------------------------------------------------------- 1 | \RequirePackage[pdf]{layout/hp-book} 2 | 3 | \begin{document} 4 | { 5 | \pagestyle{empty} 6 | \input{layout/hpmor-title} 7 | \def\volumenumber{} 8 | % \def\volumetitle{Version vom \today{}} 9 | \def\volumetitle{} 10 | \input{layout/hp-intro} 11 | % \input{hp-warning} 12 | \pagenumbering{gobble} 13 | \input{layout/hp-contents} 14 | % \include{layout/hp-blurbs} 15 | \cleartorecto 16 | } 17 | \pagenumbering{arabic} 18 | \setcounter{page}{1} 19 | 20 | \include{chapters/hpmor-chapter-000} 21 | \part{Harry James Potter-Evans-Verres und die Methoden des rationalen Denkens} 22 | \include{chapters/hpmor-chapter-001} 23 | \include{chapters/hpmor-chapter-002} 24 | \include{chapters/hpmor-chapter-003} 25 | \include{chapters/hpmor-chapter-004} 26 | \include{chapters/hpmor-chapter-005} 27 | \include{chapters/hpmor-chapter-006} 28 | \include{chapters/hpmor-chapter-007} 29 | \include{chapters/hpmor-chapter-008} 30 | \include{chapters/hpmor-chapter-009} 31 | \include{chapters/hpmor-chapter-010} 32 | \include{chapters/hpmor-chapter-011} % OMake I-III 33 | \include{chapters/hpmor-chapter-012} 34 | \include{chapters/hpmor-chapter-013} 35 | \include{chapters/hpmor-chapter-014} 36 | \include{chapters/hpmor-chapter-015} 37 | \include{chapters/hpmor-chapter-016} 38 | \include{chapters/hpmor-chapter-017} 39 | \include{chapters/hpmor-chapter-018} 40 | \include{chapters/hpmor-chapter-019} 41 | \include{chapters/hpmor-chapter-020} 42 | \include{chapters/hpmor-chapter-021} 43 | \part{Harry James Potter-Evans-Verres und die Spiele des Professors} 44 | \include{chapters/hpmor-chapter-022} 45 | \include{chapters/hpmor-chapter-023} 46 | \include{chapters/hpmor-chapter-024} 47 | \include{chapters/hpmor-chapter-025} 48 | \include{chapters/hpmor-chapter-026} 49 | \include{chapters/hpmor-chapter-027} 50 | \include{chapters/hpmor-chapter-028} 51 | \include{chapters/hpmor-chapter-029} 52 | \include{chapters/hpmor-chapter-030} 53 | \include{chapters/hpmor-chapter-031} 54 | \include{chapters/hpmor-chapter-032} 55 | \include{chapters/hpmor-chapter-033} 56 | \include{chapters/hpmor-chapter-034} 57 | \include{chapters/hpmor-chapter-035} 58 | \include{chapters/hpmor-chapter-036} 59 | \include{chapters/hpmor-chapter-037} 60 | \part{Harry James Potter-Evans-Verres und die Schatten des Todes} 61 | \include{chapters/hpmor-chapter-038} 62 | \include{chapters/hpmor-chapter-039} 63 | \include{chapters/hpmor-chapter-040} 64 | \include{chapters/hpmor-chapter-041} 65 | \include{chapters/hpmor-chapter-042} 66 | \include{chapters/hpmor-chapter-043} 67 | \include{chapters/hpmor-chapter-044} 68 | \include{chapters/hpmor-chapter-045} 69 | \include{chapters/hpmor-chapter-046} 70 | \include{chapters/hpmor-chapter-047} 71 | \include{chapters/hpmor-chapter-048} 72 | \include{chapters/hpmor-chapter-049} 73 | \include{chapters/hpmor-chapter-050} 74 | \include{chapters/hpmor-chapter-051} 75 | \include{chapters/hpmor-chapter-052} 76 | \include{chapters/hpmor-chapter-053} 77 | \include{chapters/hpmor-chapter-054} 78 | \include{chapters/hpmor-chapter-055} 79 | \include{chapters/hpmor-chapter-056} 80 | \include{chapters/hpmor-chapter-057} 81 | \include{chapters/hpmor-chapter-058} 82 | \include{chapters/hpmor-chapter-059} 83 | \include{chapters/hpmor-chapter-060} 84 | \include{chapters/hpmor-chapter-061} 85 | \include{chapters/hpmor-chapter-062} 86 | \include{chapters/hpmor-chapter-063} 87 | \part{Hermine Jean Granger und der Ruf des Phönix} 88 | \include{chapters/hpmor-chapter-064} % OMake IV 89 | \include{chapters/hpmor-chapter-065} 90 | \include{chapters/hpmor-chapter-066} 91 | \include{chapters/hpmor-chapter-067} 92 | \include{chapters/hpmor-chapter-068} 93 | \include{chapters/hpmor-chapter-069} 94 | \include{chapters/hpmor-chapter-070} 95 | \include{chapters/hpmor-chapter-071} 96 | \include{chapters/hpmor-chapter-072} 97 | \include{chapters/hpmor-chapter-073} 98 | \include{chapters/hpmor-chapter-074} 99 | \include{chapters/hpmor-chapter-075} 100 | \include{chapters/hpmor-chapter-076} 101 | \include{chapters/hpmor-chapter-077} 102 | \include{chapters/hpmor-chapter-078} 103 | \include{chapters/hpmor-chapter-079} 104 | \include{chapters/hpmor-chapter-080} 105 | \include{chapters/hpmor-chapter-081} 106 | \include{chapters/hpmor-chapter-082} 107 | \include{chapters/hpmor-chapter-083} 108 | \include{chapters/hpmor-chapter-084} 109 | \include{chapters/hpmor-chapter-085} 110 | \part{Harry James Potter-Evans-Verres und der letzte Feind} 111 | \include{chapters/hpmor-chapter-086} 112 | \include{chapters/hpmor-chapter-087} 113 | \include{chapters/hpmor-chapter-088} 114 | \include{chapters/hpmor-chapter-089} 115 | \include{chapters/hpmor-chapter-090} 116 | \include{chapters/hpmor-chapter-091} 117 | \include{chapters/hpmor-chapter-092} 118 | \include{chapters/hpmor-chapter-093} 119 | \include{chapters/hpmor-chapter-094} 120 | \include{chapters/hpmor-chapter-095} 121 | \include{chapters/hpmor-chapter-096} 122 | \include{chapters/hpmor-chapter-097} 123 | \include{chapters/hpmor-chapter-098} 124 | \include{chapters/hpmor-chapter-099} 125 | \part{Harry James Potter-Evans-Verres und der Stein der Weisen} 126 | \include{chapters/hpmor-chapter-100} 127 | \include{chapters/hpmor-chapter-101} 128 | \include{chapters/hpmor-chapter-102} 129 | \include{chapters/hpmor-chapter-103} 130 | \include{chapters/hpmor-chapter-104} 131 | \include{chapters/hpmor-chapter-105} 132 | \include{chapters/hpmor-chapter-106} 133 | \include{chapters/hpmor-chapter-107} 134 | \include{chapters/hpmor-chapter-108} 135 | \include{chapters/hpmor-chapter-109} 136 | \include{chapters/hpmor-chapter-110} 137 | \include{chapters/hpmor-chapter-111} 138 | \include{chapters/hpmor-chapter-112} 139 | \include{chapters/hpmor-chapter-113} 140 | \include{chapters/hp-exam} 141 | \include{chapters/hpmor-chapter-114} 142 | \include{chapters/hpmor-chapter-115} 143 | \include{chapters/hpmor-chapter-116} 144 | \include{chapters/hpmor-chapter-117} 145 | \include{chapters/hpmor-chapter-118} 146 | \include{chapters/hpmor-chapter-119} 147 | \include{chapters/hpmor-chapter-120} 148 | \include{chapters/hpmor-chapter-121} 149 | \include{chapters/hpmor-chapter-122} 150 | % 151 | 152 | % \setcounter{chapter}{122}\label{last:chapter} 153 | 154 | % % Appendices, etc. 155 | % \appendix 156 | % \renewcommand\chaptername{Appendix} 157 | 158 | % \include{layout/hp-colophon} 159 | 160 | % TODO 161 | % \part{TESTs} \include{layout/test-layout} 162 | 163 | \end{document} 164 | -------------------------------------------------------------------------------- /images/Deathly_Hallows_Sign.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/images/Deathly_Hallows_Sign.pdf -------------------------------------------------------------------------------- /images/cover0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/images/cover0.jpg -------------------------------------------------------------------------------- /images/cover1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/images/cover1.pdf -------------------------------------------------------------------------------- /images/cover2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/entorb/hpmor-de/1d7c7af11b9006f2d8e7fe0463acb8c8c24b7d42/images/cover2.pdf -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | # latexmk configuration to build HPMOR -*- mode: perl -*- 2 | 3 | use Config; 4 | use File::Spec::Functions; 5 | 6 | @default_files = ( 7 | 'hpmor', 8 | 'hpmor-1', 'hpmor-2', 'hpmor-3', 'hpmor-4', 'hpmor-5', 'hpmor-6', 9 | 'layout/hpmor-dust-jacket-1', 'layout/hpmor-dust-jacket-2', 10 | 'layout/hpmor-dust-jacket-3', 'layout/hpmor-dust-jacket-4', 11 | 'layout/hpmor-dust-jacket-5', 'layout/hpmor-dust-jacket-6', 12 | ); 13 | 14 | # Install git hooks for gitinfo2 if not already installed 15 | my $hooks_dir = catdir('.git', 'hooks'); 16 | if (-d $hooks_dir) { 17 | my $checkout = catfile($hooks_dir, 'post-checkout'); 18 | if (!-e $checkout) { 19 | use File::Copy; 20 | foreach ('post-checkout', 'post-commit', 'post-merge') { 21 | my $hook = catfile($hooks_dir, $_); 22 | copy('post-checkout', $hook) or die "Could not copy `post-checkout' to `$hook'\n"; 23 | my $mode = (stat($hook))[2]; 24 | chmod $mode | 0111, $hook; 25 | } 26 | system "git", "checkout", "main"; # Generate .git/gitHeadInfo.gin 27 | } 28 | } 29 | 30 | # Use XeLaTeX (equivalent to command-line -xelatex option) 31 | $xelatex = "xelatex %O \"\\PassOptionsToPackage{$options}{hp-book}\\input{%S}\"" if $options; 32 | my $basedir = curdir(); 33 | if (defined($chapter) || defined($chapterfile)) { 34 | if (defined($chapter)) { 35 | die "Not in `chapters' directory" if !-d catdir('..', $hooks_dir); 36 | $basedir = updir(); 37 | $ENV{TEXINPUTS} = ".$Config{path_sep}$basedir$Config{path_sep}"; 38 | $chapterfile = 'hpmor-chapter-' . sprintf('%03d', $chapter); 39 | } else { 40 | $chapter = 1; 41 | } 42 | $xelatex = "xelatex -jobname=$chapterfile %O \"\\RequirePackage[pdf]{layout/hp-book}\\begin{document}\\setcounter{chapter}{" . ($chapter - 1) . "}\\input{$chapterfile}\\end{document}\""; 43 | } 44 | $pdf_mode = 5; 45 | $postscript_mode = $dvi_mode = 0; 46 | 47 | # Make our fonts available to TeX 48 | $ENV{TEXFONTS} = catfile($basedir, 'fonts') . catfile('', '') x 2 . $Config{path_sep}; 49 | -------------------------------------------------------------------------------- /layout/hp-blurbs.tex: -------------------------------------------------------------------------------- 1 | \makeatletter 2 | \newlength{\beforeblurbskip} 3 | \setlength{\beforeblurbskip}{.5\baselineskip} 4 | \newlength{\afterblurbskip} 5 | \setlength{\afterblurbskip}{.5\baselineskip} 6 | \newlength{\blurbwidth} 7 | \setlength{\blurbwidth}{.6\textwidth} 8 | \newlength{\blurbrule} 9 | \setlength{\blurbrule}{.4\p@} 10 | \newcommand{\blurbsize}{\small} 11 | \newcommand{\blurbflush}{flushright} 12 | 13 | \newcommand{\blurbfontsize}[1]{\def\blurbsize{#1}} 14 | \newcommand{\blurbposition}[1]{\long\def\blurbflush{#1}} 15 | \newcommand{\blurbtextposition}[1]{\def\textflush{#1}} 16 | \newcommand{\blurbsourceposition}[1]{\def\sourceflush{#1}} 17 | 18 | \newcommand{\@blurbrule}{\rule[.5ex]{\blurbwidth}{\blurbrule}} 19 | 20 | \newcommand{\@blurbtext}[1]{% 21 | \begin{minipage}{\blurbwidth}\begin{\textflush} #1\par 22 | \ifdim\blurbrule>\z@ \@blurbrule \else \vspace*{1ex} \fi 23 | \end{\textflush}\end{minipage}} 24 | 25 | \newcommand{\@blurbsource}[1]{% 26 | \begin{minipage}{\blurbwidth} 27 | \begin{\sourceflush} #1\par 28 | \end{\sourceflush}\end{minipage}} 29 | 30 | \newcommand{\blurb}[2]{ 31 | \vspace{\beforeblurbskip} 32 | {\blurbsize 33 | \begin{\blurbflush} 34 | \begin{minipage}{8cm} \@blurbtext{#1}\\ \@blurbsource{#2} \end{minipage} 35 | \end{\blurbflush} 36 | \vspace{\afterblurbskip}}} 37 | \makeatother 38 | 39 | \thispagestyle{empty} 40 | \blurb{“[...A] terrific series, subtle and dramatic and stimulating.”}{David Brin} 41 | \blurb{“Oh Thoth Trismegistus, oh Ma’at, oh Ganesha, oh sweet lady Eris… I have not laughed so hard in years!”}{Eric S. Raymond} 42 | \thispagestyle{empty} 43 | -------------------------------------------------------------------------------- /layout/hp-book.sty: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e} 2 | \ProvidesPackage{layout/hp-book} 3 | 4 | % Options 5 | \gdef\hplrmargins{1.5} 6 | \DeclareOption{pdf}{\gdef\hplrmargins{1}} 7 | \newif\ifcover\covertrue 8 | \DeclareOption{nocover}{\coverfalse} 9 | \ProcessOptions % process now as some are used immediately 10 | 11 | \documentclass[12pt,extrafontsizes,twoside,openright,final,msmallroyalvopaper,german]{memoir} 12 | 13 | \input{layout/hp-header} 14 | 15 | % translation / localization 16 | \usepackage{polyglossia} 17 | \setdefaultlanguage[variant = german, spelling = new, babelshorthands = true, script = latin]{german} % for Germany hyphenation 18 | \enablehyphenation 19 | % \setmainlanguage = \setdefaultlanguage 20 | 21 | % Book-specific settings 22 | 23 | % 24 | % Set up page 25 | % FIXME: Improve the layout: margins not perhaps as wide as the default, but 26 | % wider than currently. (The type block is currently the same as for the previous, larger paper.) 27 | % 28 | \settypeblocksize{\topskip + 34\baselineskip}{352pt}{*} 29 | \setlrmargins{*}{*}{\hplrmargins} 30 | \setulmargins{*}{*}{1} 31 | \setheadfoot{\topskip + \baselineskip}{2\baselineskip} 32 | \checkandfixthelayout[fixed] 33 | 34 | 35 | % 36 | % Page header 37 | % 38 | \usepackage{graphicx} % for \reflectbox 39 | \makeevenhead{headings}{\Stars}{ 40 | \hpfont\hyperref[contents]{\textls[50]{\rightmark}}}{\reflectbox{\Stars}} 41 | \makeoddhead{headings}{\Stars}{\parbox{97mm}{\centering\hpfont\textls[50]{\leftmark}}}{\reflectbox{\Stars}} 42 | \renewcommand*{\sectionmark}[1]{} 43 | 44 | 45 | % 46 | % Page numbering/footer 47 | % 48 | \def\pageInFooter{\Star\ \hpfont\makebox[4em][c]{\textls[30]{\thepage}}\Star} 49 | \makeevenfoot{plain}{}{\pageInFooter}{} 50 | \makeoddfoot{plain}{}{\pageInFooter}{} 51 | \makeevenfoot{headings}{}{\pageInFooter}{} 52 | \makeoddfoot{headings}{}{\pageInFooter}{} 53 | 54 | 55 | % 56 | % Custom chapter style 57 | % 58 | \makeatletter 59 | \makechapterstyle{evans}{% 60 | \renewcommand*{\partnamefont}{\hpfont\huge} 61 | \renewcommand*{\partnumfont}{\partnamefont} 62 | \renewcommand*{\parttitlefont}{\hpfont\Huge} 63 | \renewcommand*{\chapnamefont}{\hpfont\large} 64 | \renewcommand*{\chapnumfont}{\chapnamefont} 65 | \renewcommand*{\chaptitlefont}{\hpfont\huge} 66 | 67 | \setlength{\beforechapskip}{4\baselineskip plus 2\baselineskip minus 2\baselineskip } 68 | \setlength{\midchapskip}{0pt} 69 | \setlength{\afterchapskip}{1\baselineskip} 70 | 71 | \renewcommand*{\printchapternum}{% 72 | \chapnumfont \hyperref[contents]{\textls[30]{ 73 | \IfInteger{\thechapter}{\NUMBERstring{chapter}}{\thechapter} 74 | }}} 75 | 76 | \renewcommand*{\printchaptername}{% 77 | \centering \chapnamefont \hyperref[contents]{\MakeUppercase{\textls[30]{\@chapapp}}} 78 | } 79 | 80 | \renewcommand*{\printchaptertitle}[1]{% 81 | \vskip 0pt\begin{center}\chaptitlefont \textls[50]{\MakeUppercase{##1}}\end{center}\par 82 | } 83 | 84 | \renewcommand*{\chaptermark}[1]{ 85 | \markboth{ 86 | \MakeUppercase{##1} 87 | }{ 88 | \MakeUppercase{\chaptername}~ 89 | \thechapter 90 | } 91 | } 92 | 93 | \renewcommand*{\tocmark}{\markboth{}{\MakeUppercase{Contents}}} 94 | \renewcommand{\tocheadstart}{\chapterheadstart} 95 | \renewcommand{\aftertoctitle}{\thispagestyle{empty}\afterchaptertitle} 96 | } 97 | \makeatother 98 | \chapterstyle{evans} 99 | 100 | \def\chapterheadstart{\vspace*{-1\baselineskip}\vspace*{-1\topskip}\vspace*{\beforechapskip}} 101 | 102 | % 103 | % Section 104 | % 105 | \setsecheadstyle{\scshape} 106 | \beforesecskip=1.5\baselineskip % skip before the heading 107 | \aftersecskip=.5\baselineskip plus .5\baselineskip % skip after the heading 108 | \setsechook{\nopagebreak\vskip 0pt plus 3\baselineskip\setsecnumformat{}} 109 | -------------------------------------------------------------------------------- /layout/hp-colophon.tex: -------------------------------------------------------------------------------- 1 | \cleartorecto 2 | {\null\vfil% 3 | \thispagestyle{empty}\noindent\rightskip=0pt plus 1fil\leftskip=0pt plus 1fil\parfillskip=0pt% 4 | \vbox{ 5 | \parshape 1 0em 18em 6 | \noindent 7 | \leftskip=0pt\rightskip=0pt\parfillskip=0pt plus 1fil{}This book was 8 | formatted by fans of the story, and built on 9 | \today\ from version \gitFirstTagDescribe. 10 | The text was set in 11 | Huerta Tipografica's Alegreya type family. 12 | Chapter headings were set in Lumos, inspired by 13 | the display font used in the US editions of the Harry Potter books, 14 | drawn by Sarah McFalls. 15 | The book was typeset with \LaTeX, and the cover artwork was created with Inkscape. 16 | The source code can be found at \url{https://github.com/entorb/hpmor-de/}. 17 | }\vskip\footskip% 18 | \vfil\vfil 19 | \newpage} 20 | 21 | % LocalWords: Huerta Tipografica's Alegreya McFalls 22 | -------------------------------------------------------------------------------- /layout/hp-contents.tex: -------------------------------------------------------------------------------- 1 | \cleartorecto 2 | \renewcommand*{\printtoctitle}[1]{\centering\Huge{\hpfont\MakeUppercase{#1}}} 3 | \setlength{\cftbeforechapterskip}{.5\baselineskip plus 12pt minus 3pt} 4 | \setlength{\cftbeforepartskip}{1\baselineskip plus 12pt minus 3pt} 5 | \renewcommand*{\cftpartleader}{\space—\space} 6 | \renewcommand*{\cftpartfillnum}[1]{% 7 | \cftpartafterpnum\par} 8 | \renewcommand*{\cftchapterleader}{\space—\space} 9 | \renewcommand*{\cftchapterfillnum}[1]{% 10 | {\cftchapterleader}\nobreak% 11 | {#1}% 12 | \cftchapterafterpnum\par} 13 | \setrmarg{0em} 14 | \setlength\cftpartindent{0pt} 15 | \setlength\cftpartnumwidth{0pt} 16 | \setlength\cftchapterindent{0pt} 17 | \setlength\cftchapternumwidth{0pt} 18 | \renewcommand*{\cftpartafterpnum}{\cftparfillskip} 19 | \renewcommand*{\cftchapterafterpnum}{\cftparfillskip} 20 | \renewcommand*{\cftpartfont}{} 21 | \renewcommand*{\cftchapterfont}{} 22 | 23 | \renewcommand\partnumberline[1]{\hfil\thispagestyle{empty}{\hpfont\textls[30]{\large\MakeUppercase{\partname} #1}}\hfil\strut\par\nopagebreak\hfil} 24 | \renewcommand\chapternumberline[1]{\hfil\thispagestyle{empty}{\hpfont\textls[30]{\IfInteger{#1}{\NUMBERstringnum{#1}}{Appendix #1}}}\hfil\strut\par\nopagebreak\hfil} 25 | 26 | \settocdepth{chapter} 27 | \phantomsection 28 | \label{contents} 29 | 30 | \thispagestyle{empty} 31 | 32 | \tableofcontents* 33 | 34 | \clearpage 35 | \thispagestyle{empty} 36 | \hbox{} 37 | -------------------------------------------------------------------------------- /layout/hp-dust-jacket.tex: -------------------------------------------------------------------------------- 1 | \input{layout/hp-paper-type} 2 | 3 | % N.B. All text and images should be 6mm away from all edges 4 | \newcounter{bookpagecount} 5 | \setcounter{bookpagecount}{\XeTeXpdfpagecount"\bookfile"} 6 | \RequirePackage{calc} % This line must be after the previous to avoid an error 7 | \newlength{\hppaperwidth} % no. of pages ÷ 2 × width per sheet 8 | \setlength{\hppaperwidth}{\bookpaper * \value{bookpagecount} / \real{2.0}} 9 | \newlength{\hpspinewidth} % paper thickness + 5mm 10 | \setlength{\hpspinewidth}{\hppaperwidth + 5mm} 11 | \makeatletter 12 | \setbox\z@=\hbox{\XeTeXpdffile"\bookfile"\relax} 13 | \newlength{\hpcoverwidth} % paper width + 8mm 14 | \setlength{\hpcoverwidth}{\the\wd\z@ + 8mm} 15 | \newlength{\hpcoverheight} % coverheight: paper height + 1mm 16 | \setlength{\hpcoverheight}{\the\ht\z@ + 1mm} 17 | \makeatother 18 | % flapwidth: 60mm+3mm each side 19 | \documentclass[12pt,coverwidth=\the\hpcoverwidth,coverheight=\the\hpcoverheight,spinewidth=\the\hpspinewidth,marklength=0mm,bleedwidth=5mm,flapwidth=63mm,german]{bookcover} 20 | % ,french 21 | 22 | % translation 23 | \usepackage{polyglossia} 24 | \setdefaultlanguage[variant = german, spelling = new, babelshorthands = true, script = latin]{german} % for Germany hyphenation 25 | \enablehyphenation 26 | 27 | \input{layout/hp-header} 28 | 29 | \usepackage{contour} 30 | 31 | \input{layout/hp-title} 32 | 33 | \begin{document} 34 | \begin{bookcover} 35 | \bookcovercomponent{color}{bg whole}{black} 36 | \bookcovercomponent{center}{above front}{\bfseries\color{blue}DUST JACKET} 37 | \bookcovercomponent{picture}{front}{images/cover1.pdf} 38 | \bookcovercomponent{normal}{front}{\hptitle[\coverwidth]{\fullvolumetitle{\volumenumber}}} 39 | 40 | % Spine 41 | \begin{bookcoverelement}{normal}{spine} 42 | \centering 43 | \color{white}\scshape 44 | \vspace{0.5cm}\huge \volumenumber\\[2ex]\Large 45 | \vfill 46 | \rotatebox[origin=c]{90}{\contour[120]{black}{\volumetitle}} 47 | \vfill 48 | \end{bookcoverelement} 49 | 50 | % Back cover 51 | \begin{bookcoverelement}{normal}{back} 52 | \centering 53 | \vspace{20mm} 54 | \parbox{110mm}{\color{white}\Large\raggedright 55 | % Petunia married a biochemist, and Harry grew up reading science and science fiction. Then came the Hogwarts letter, and a world of intriguing new possibilities to exploit. And new friends, like Hermione Granger, and Professor McGonagall, and Professor Quirrell… 56 | Petunia heiratete einen Biochemiker, und Harry wuchs mit wissenschaftlichen Büchern und Science-Fiction auf. Dann kam der Hogwarts-Brief und eine Welt voller faszinierender neuer Möglichkeiten, die es zu nutzen galt. Und neue Freunde, wie Hermine Granger, Professor McGonagall und Professor Quirrell… 57 | } 58 | \end{bookcoverelement} 59 | 60 | % Text on the front flap 61 | \begin{bookcoverelement}{normal}{front flap} 62 | \centering 63 | \vspace{20mm} 64 | \parbox{40mm}{\color{white}\raggedright\small 65 | % HPMOR comes from the world of fan-fiction. With J.~K.~Rowling’s approval, it tells the story of an alternate Harry, an auto-didact rationalist who brings all his powers to bear on the strange new vistas of the world of magic. 66 | HPMOR stammt aus der Welt der Fan-Fiction. Mit der Zustimmung von J.~K.~Rowling erzählt es die Geschichte eines alternativen Harry, eines rationalen Autodidakten, der all seine Kräfte einsetzt, um die seltsamen neuen Möglichkeiten der Welt der Magie zu erkunden. 67 | 68 | \bigskip Die Bücher führen den Leser in die Denkweisen ein, die Yudkowsky in seinem Blog vorstellt, \url{lesswrong.com}.} 69 | \end{bookcoverelement} 70 | 71 | % Text on the back flap 72 | \begin{bookcoverelement}{normal}{back flap} 73 | \centering 74 | \vspace{20mm} 75 | \parbox{40mm}{\color{white}\small\raggedright 76 | % PUT YOUR BACK DUST-FLAP TEXT HERE! 77 | } 78 | \end{bookcoverelement} 79 | 80 | \end{bookcover} 81 | \end{document} 82 | -------------------------------------------------------------------------------- /layout/hp-format.tex: -------------------------------------------------------------------------------- 1 | % This file includes all the generic formatting for HPatMoR. This mostly entails configuring 2 | % the memoir package, though “configuring” on occasion means “completely messing it up”. 3 | 4 | \RequirePackage{fmtcount} 5 | \RequirePackage{calc} 6 | 7 | % Fonts used generally (specific fonts used only once or twice are not here). 8 | \usepackage{xltxtra} 9 | \defaultfontfeatures{Ligatures={TeX}} 10 | \setmainfont[ 11 | Extension=.otf 12 | , UprightFont=*-Regular 13 | , ItalicFont=*-Italic 14 | , BoldFont=*-Bold 15 | , BoldItalicFont=*-BoldItalic 16 | , SmallCapsFont=AlegreyaSC-Regular 17 | ]{Alegreya} 18 | 19 | \newfontface\hpfont[ExternalLocation]{Lumos} 20 | \newfontface\ptsansi[ExternalLocation]{AlegreyaSans-Italic} 21 | 22 | % Drop-caps at start of chapters 23 | \renewcommand{\LettrineFontHook}{\hpfont} 24 | \renewcommand{\LettrineTextFont}{} 25 | \renewcommand{\DefaultLoversize}{.2} 26 | \renewcommand{\DefaultLraise}{0.1} 27 | 28 | % Extend lettrine cutout when more than one paragraph goes alongside the drop-cap 29 | % Copied, with different macro names, from 30 | % https://tex.stackexchange.com/questions/369868/using-lettrine-with-short-paragraphs 31 | \newcount\hplettrinecount 32 | \makeatletter 33 | \def\hplettrineextrapara{% 34 | \ifnum\prevgraf<\c@L@lines 35 | \hplettrinecount\z@ 36 | \loop 37 | \ifnum\hplettrinecount<\prevgraf 38 | \advance\hplettrinecount\@ne 39 | \afterassignment\hplettrinedima\count@\L@parshape\relax 40 | \repeat 41 | \parshape\L@parshape 42 | \fi} 43 | \def\hplettrinedima{\afterassignment\hplettrinedimb\dimen@} 44 | \def\hplettrinedimb{\afterassignment\hplettrinedef\dimen@} 45 | \def\hplettrinedef#1\relax{\edef\L@parshape{\the\numexpr\count@-1\relax\space #1}} 46 | \makeatother 47 | \newcommand{\lettrinepara}[3][]{\lettrine[nindent=0pt,#1]{#2}{#3}} 48 | 49 | % Allow linebreaks after em-dash and hyphens, except when they’re followed by punctuation 50 | \newXeTeXintercharclass \punctuationClass 51 | 52 | \XeTeXcharclass `\’ \punctuationClass 53 | \XeTeXcharclass `\‘ \punctuationClass 54 | \XeTeXcharclass `\“ \punctuationClass 55 | \XeTeXcharclass `\” \punctuationClass 56 | \XeTeXcharclass `\. \punctuationClass 57 | \XeTeXcharclass `\, \punctuationClass 58 | \XeTeXcharclass `\: \punctuationClass 59 | \XeTeXcharclass `\? \punctuationClass 60 | \XeTeXcharclass `\! \punctuationClass 61 | \XeTeXcharclass `\: \punctuationClass 62 | 63 | \newXeTeXintercharclass \digitClass 64 | \XeTeXcharclass `\0 \digitClass 65 | \XeTeXcharclass `\1 \digitClass 66 | \XeTeXcharclass `\2 \digitClass 67 | \XeTeXcharclass `\3 \digitClass 68 | \XeTeXcharclass `\4 \digitClass 69 | \XeTeXcharclass `\5 \digitClass 70 | \XeTeXcharclass `\6 \digitClass 71 | \XeTeXcharclass `\7 \digitClass 72 | \XeTeXcharclass `\8 \digitClass 73 | \XeTeXcharclass `\9 \digitClass 74 | 75 | \newXeTeXintercharclass \dashClass 76 | \XeTeXcharclass `\— \dashClass % em 77 | \XeTeXcharclass `\– \dashClass % en 78 | \XeTeXcharclass `\- \dashClass % hyphen 79 | \XeTeXcharclass `\… \dashClass 80 | 81 | \XeTeXinterchartokenstate = 1 82 | 83 | \def\morhyphenpenalty{75} 84 | \exhyphenpenalty=10000 85 | 86 | \XeTeXinterchartoks \dashClass 0 = {\hskip 0pt\penalty \morhyphenpenalty} 87 | 88 | % Adjust space around lists 89 | \setlength{\topsep}{.5\baselineskip plus 1\baselineskip minus .5\baselineskip} 90 | \setlength{\partopsep}{.5\baselineskip plus 1\baselineskip minus .5\baselineskip} 91 | 92 | % Miscellaneous global typesetting parameters 93 | \frenchspacing 94 | \setlength{\emergencystretch}{.06\textwidth} 95 | 96 | % Try to avoid excessive hyphens 97 | \doublehyphendemerits=30000 98 | \finalhyphendemerits=30000 99 | \adjdemerits=10000 100 | \brokenpenalty10000\relax 101 | 102 | % Make it easier to manage hyphenation 103 | \makeatletter 104 | \newcommand{\emdashhyp}{\leavevmode% 105 | \prw@zbreak—\discretionary{}{}{}\prw@zbreak} 106 | \makeatother 107 | 108 | % Avoid widows and orphans 109 | % https://mailman.ntg.nl/pipermail/ntg-context/2013/074250.html 110 | \widowpenalty 10000 111 | \clubpenalty 10000 112 | 113 | % Various packages used 114 | \usepackage[normalem]{ulem} 115 | \usepackage{xfrac} 116 | \usepackage{censor} 117 | \usepackage[useregional]{datetime2} 118 | \usepackage[nopagecolor=white,pagecolor=white]{pagecolor} 119 | \usepackage{afterpage} 120 | \usepackage{gitinfo2} 121 | \usepackage{hyphenat} 122 | -------------------------------------------------------------------------------- /layout/hp-header.tex: -------------------------------------------------------------------------------- 1 | \usepackage{lettrine} % Used for the fancy caps at each start of each chapter. 2 | \usepackage{xspace} % Takes care of spaces after macros 3 | \usepackage{amsmath} % Provides the align environment, used in chapter 13 for the notes 4 | 5 | \usepackage[protrusion=true]{microtype} 6 | 7 | \usepackage{fontspec} % For the many fonts 8 | \usepackage{xunicode} 9 | 10 | \usepackage{xstring} 11 | 12 | \usepackage{eso-pic,picture} 13 | 14 | \usepackage[bookmarks=true,unicode=true,pdfborder={0 0 0}, 15 | pdftitle={Harry Potter and the Methods of Rationality - Deutsche Fan-Übersetzung}, 16 | pdfauthor={Eliezer Yudkowsky}, breaklinks={true}, 17 | pdfkeywords={Harry Potter, rationality, hpmor},pdfencoding=auto 18 | ]{hyperref} 19 | 20 | \input{layout/hp-format} 21 | \input{layout/hp-markup} 22 | 23 | \hyphenation{Her-mi-o-ne Gran-ger bru-shes Gryf-fin-dor Le-strange 24 | some-where which-ev-er Hog-warts re-pli-cat-ed ran-dom sta-tis-ti-cal 25 | Wi-zen-gam-ot an-aly-se an-aly-sis remem-ber Sly-the-rin Sly-the-rins 26 | Se-ve-rus Mc-Gon-agall Dum-ble-do-re Quir-rell Mal-foy % 27 | % DE addon 28 | Her-mi-ne re-sig-na-tion} 29 | 30 | 31 | % Redefine \textls for XeTeX 32 | \usepackage{calc} 33 | \newcounter{hpletterspacing} 34 | \renewcommand{\textls}[2][100]{% 35 | \setcounter{hpletterspacing}{#1 / \real{10.0}}% 36 | \addfontfeature{LetterSpace=\thehpletterspacing}#2% 37 | } 38 | -------------------------------------------------------------------------------- /layout/hp-intro.tex: -------------------------------------------------------------------------------- 1 | \input{layout/hp-title} 2 | \ifcover% 3 | \definecolor{backgroundcover}{HTML}{272c36} 4 | \newpagecolor{backgroundcover}\afterpage{\restorepagecolor} 5 | \newcommand\BackgroundPic{ 6 | \put(0,0){% 7 | \parbox[b][\paperheight]{\paperwidth}{% 8 | \vfill% 9 | \centering% 10 | \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{images/cover1.pdf}% 11 | \vfill% 12 | }}}\AddToShipoutPicture*{\BackgroundPic}% 13 | \AddToShipoutPicture*{\put(0,0){% 14 | \parbox[b][\paperheight]{\paperwidth}{% 15 | \hptitle{\fullvolumetitle{\volumenumber}}% 16 | }}}% 17 | \ % 18 | \cleartorecto 19 | \fi 20 | 21 | \begin{center} 22 | \thispagestyle{empty} 23 | \vspace*{0.5cm} 24 | \makebox[0pt][c]{% 25 | \raisebox{-\totalheight}[0pt][0pt]{% 26 | \includegraphics[scale=0.75]{images/cover0.jpg}}}% 27 | 28 | \vspace*{-1.5cm} 29 | {\hpfont 30 | \Huge\MakeUppercase{Harry Potter}\vspace*{0.5cm} 31 | 32 | \Large\MakeUppercase{and the Methods of Rationality} % 33 | \vspace*{1\baselineskip} 34 | % \includegraphics[scale=0.5]{images/cover2.pdf} 35 | 36 | 37 | 38 | 39 | \vspace*{7.0cm} 40 | 41 | % \vspace*{1\baselineskip} 42 | \Large Fanfiction von \vspace*{.10cm} 43 | 44 | \huge \MakeUppercase{Eliezer Yudkowsky}% 45 | 46 | \small 47 | 48 | \vspace*{1\baselineskip} 49 | Basierend auf der Harry Potter Reihe von J.~K.~Rowling\\ 50 | } 51 | \vfill 52 | { 53 | \vspace*{1\baselineskip} 54 | Author's disclaimer:\\J.~K.~Rowling owns Harry Potter, and no one owns the methods of rationality. 55 | % Disclaimer: ~K.~Rowling besitzt alle Rechte an Harry Potter, aber niemandem gehören die Methods of Rationality. 56 | 57 | \vspace*{1\baselineskip} 58 | Die englische Originalfassung gibt es unter {\small\href{https://hpmor.com}{hpmor.com}}\\ 59 | und als überarbeitetes PDF und eBook unter\\ 60 | {\small\href{https://github.com/rrthomas/hpmor/}{github.com/rrthomas/hpmor/}}\\ 61 | %\\\vspace*{1\baselineskip}\fullvolumetitle{\volumenumber} 62 | } 63 | \end{center} 64 | 65 | 66 | \newpage 67 | \begin{center} 68 | \noindent 69 | \vfill 70 | Dies ist ein OpenSource Projekt beheimatet auf \\ 71 | {\small\href{https://github.com/entorb/hpmor-de/}{github.com/entorb/hpmor-de/}}\\ 72 | gestartet und verwaltet von \href{https://entorb.net}{Torben Menke} 73 | 74 | \vspace*{1\baselineskip} 75 | Verbesserungsvorschläge sind herzlich willkommen, siehe\\ 76 | {\small\href{https://github.com/entorb/hpmor-de/wiki/Mitmachen}{github.com/entorb/hpmor-de/wiki/Mitmachen}} 77 | 78 | \vspace*{1\baselineskip} 79 | Großer Dank gebührt den initialen Übersetzern\\ 80 | Jost (Kapitel 1-21) {\small\href{https://www.fanfiktion.de/s/4cb8beb50000203e067007d0/}{fanfiktion.de/s/4cb8beb50000203e067007d0/}}\\ 81 | Patneu (Kapitel 22-38) {\small\href{https://www.fanfiktion.de/s/55610c610004dede273a3811/}{fanfiktion.de/s/55610c610004dede273a3811/}}\\ 82 | DieFuechsin (Kapitel 39-78) {\small\href{https://www.fanfiktion.de/s/5c793dfe000a402030774dc7/}{fanfiktion.de/s/5c793dfe000a402030774dc7/}}\\ 83 | Schneefl0cke (Kapitel 79-122) {\small\href{https://www.fanfiktion.de/s/60044849000ccc541aef297e/}{fanfiktion.de/s/60044849000ccc541aef297e/}} 84 | 85 | \vspace*{1\baselineskip} 86 | Sowie den Kollegen der internationalen Ausgaben\\ 87 | für den tollen Austausch von Ideen und Quellcode\\ 88 | {\small\href{https://github.com/rrthomas/hpmor/}{github.com/rrthomas/hpmor/}} (EN)\\ 89 | {\small\href{https://github.com/yeKcim/hpmor/}{github.com/yeKcim/hpmor/}} (FR) 90 | 91 | \vspace*{1\baselineskip} 92 | Diese Version ist vom \today{}.\\ 93 | Das aktuellste PDF und eBook gibt es unter\\ 94 | {\small\href{https://github.com/entorb/hpmor-de/releases/tag/WorkInProgress}{github.com/entorb/hpmor-de/releases/tag/WorkInProgress}}\\ 95 | \end{center} 96 | -------------------------------------------------------------------------------- /layout/hp-markup.tex: -------------------------------------------------------------------------------- 1 | % Logical markup 2 | 3 | % These commands should be used to help make the source easy to understand 4 | % and consistently typeset. 5 | % Search for them in the source files to see how to use them. 6 | 7 | % Special types of text 8 | \newcommand{\abbrev}[1]{\textsc{\MakeLowercase{#1}}\xspace} 9 | 10 | % Common abbreviations 11 | \newcommand{\am}{~a.m.\xspace} 12 | \renewcommand{\pm}{~p.m.\xspace} 13 | \newcommand{\SPHEW}{\abbrev{BELFER}} % EN: SPHEW, DE: BELFER 14 | 15 | % Tone of voice 16 | \newcommand{\shout}[1]{\textsc{#1}} 17 | \newcommand{\scream}[1]{\MakeUppercase{#1}} 18 | \newcommand{\prophesy}[1]{\shout{#1}} 19 | 20 | % \parsel 21 | \newcommand{\parselify}[1]{% 22 | % ss -> ß 23 | \StrSubstitute{#1}{ss}{ß}[\parselstring]% 24 | % s -> ss 25 | \StrSubstitute{\parselstring}{s}{ss}[\parsselstring]% 26 | % ß -> sss 27 | \StrSubstitute{\parsselstring}{ß}{sss}[\parssselstring]% 28 | % S -> Ss 29 | \StrSubstitute{\parssselstring}{S}{Ss}[\parsssselstring]% for DE 30 | % x -> xs 31 | \StrSubstitute{\parsssselstring}{x}{xs}[\parxelstring]% for DE 32 | % zz -> ß 33 | \StrSubstitute{\parxelstring}{zz}{ß}[\parzzelstring]% for DE 34 | % z -> zz 35 | \StrSubstitute{\parzzelstring}{z}{zz}[\parzzzelstring]% for DE 36 | % ß -> zzz 37 | \StrSubstitute{\parzzzelstring}{ß}{zzz}[\parzzzzelstring]% for DE 38 | % Z -> Zz 39 | \StrSubstitute{\parzzzzelstring}{Z}{Zz}[\parzzzzzelstring]% for DE 40 | } 41 | % 42 | % old version of parsel 43 | \newcommand{\parsela}[1]{\parselify{#1}{\ptsansi\parzzzzzelstring}} 44 | % 45 | % new FR version of parsel 46 | % N.B. Other commands, such as \emph, cannot be used inside \parsel 47 | \newcommand{\parselb}[1]{{\fontspec[ExternalLocation]{Parseltongue.ttf}#1}{\ptsansi}} % no more \parselify (can’t convert to epub) 48 | % 49 | % select one of above 50 | \newcommand{\parsel}[1]{\parsela{#1}} 51 | 52 | % \spell macro experiments 53 | 54 | % \newcommand{\spell}[1]{„\emph{#1}“} 55 | % \usepackage{marvosym} 56 | % \newcommand{\spell}[1]{„{\small\Lightning}\emph{#1}{\small\,\Lightning}“} 57 | % \newcommand{\spell}[1]{{\small\Lightning\,}\emph{#1}{\small\,\Lightning}} 58 | \newcommand{\spell}[1]{{\Star}\emph{#1}{\Star}} 59 | % \spell{Wingardium Leviosa} 60 | % \Lightning \Emailct \Laserbeam 61 | 62 | 63 | % Author’s and translators notes 64 | % 65 | % Use with \footnotemark 66 | % \newcommand{\authorsnotetext}[1]{\footnotetext{Anmerkung des Authors: #1}} 67 | % translator notes 68 | \newcommand{\translatorsnote}[1]{\footnote{Übersetzerhinweis: #1}} 69 | % do not print translator notes 70 | % \renewcommand{\translatorsnote}[1]{} 71 | 72 | 73 | % McGonagall Whiteboard (chapter15) 74 | % 75 | \newcommand{\McGonagallWhiteBoard}[1]{ 76 | \begin{center}% 77 | \fontspec[ExternalLocation,Color=AA0000]{Automobile Contest.ttf} 78 | \textcolor{blue}{\Huge{\underline{\textcolor{red}{#1}}}}% 79 | \end{center}% 80 | } 81 | 82 | 83 | % Newspaper headlines 84 | 85 | \newcommand{\headline}[1]{% 86 | \begin{center}% 87 | \textsc{\fontspec[ExternalLocation]{gabriele-bad.ttf}#1}% 88 | \end{center}% 89 | } 90 | 91 | \newcommand{\inlineheadline}[1]{% 92 | \textsc{\fontspec[ExternalLocation]{gabriele-bad.ttf}#1}% 93 | } 94 | 95 | \newcommand{\newspaperHeader}[1]{\begin{SingleSpace}\upshape #1\end{SingleSpace}} 96 | \newcommand{\newspaperName}[1]{\upshape\itshape #1} 97 | 98 | \newenvironment{headlines}{% 99 | \begin{Spacing}{0.75}% 100 | \begin{center}% 101 | \scshape% 102 | \nonzeroparskip% 103 | }{% 104 | \end{center}% 105 | \end{Spacing}% 106 | } 107 | 108 | 109 | % Letters / writtenNote 110 | 111 | \newenvironment{writtenNote}{% 112 | \fontspec[ExternalLocation]{Graphe_Alpha_alt.ttf}\scriptsize% 113 | \renewcommand{\emph}{\uline}% 114 | \vskip .1\baselineskip plus .1\baselineskip minus .1\baselineskip% 115 | \begin{adjustwidth}{\parindent}{\parindent}% 116 | \par\setlength{\parindent}{0pt}\setlength{\parskip}{\baselineskip}% 117 | \itshape% 118 | \setlength{\parindent}{0pt}% 119 | \setlength{\parskip}{.5\baselineskip}% 120 | } 121 | {% 122 | \par 123 | \end{adjustwidth}% 124 | \vskip 1\baselineskip plus 1\baselineskip minus 1\baselineskip% 125 | } 126 | 127 | % \letterAddress 128 | \newcommand{\letterAddress}[1]{% 129 | \pagebreak[1]\fontspec[ExternalLocation]{Graphe_Alpha_alt.ttf}% 130 | \scriptsize#1\nopagebreak[4]\par% 131 | } 132 | 133 | % \letterClosing 134 | \newcommand{\letterClosing}[2][\vskip 1\baselineskip]{% 135 | \nopagebreak[4]\fontspec[ExternalLocation]{Graphe_Alpha_alt.ttf}% 136 | \par\scriptsize#1% 137 | \par\nopagebreak[5]#2% 138 | } 139 | 140 | 141 | % PartChapters 142 | % \partchapter{Das Stanford-Prison-Experiment}{V} 143 | % \partchapter{The Stanford Prison Experiment}{TSPE}{XIII}{Aftermaths} 144 | % TOC: TSPE part XIII: Aftermaths 145 | % Page header: The Stanford Prison Experiment XIII: \\? Aftermaths 146 | % Title: The Stanford Prison Experiment, Part XIII: \\? Aftermaths 147 | \newcommand{\partchapter}[3][\relax]{% 148 | % \chapter[\texorpdfstring{#2, \abbrev{Teil #3}}{#2, Teil #3}]% 149 | % [#2 #3]{#2, Teil~#3#1}} 150 | \chapter[#2~#3]% 151 | [#2~#3]{#2~#3#1}} 152 | 153 | % \namedpartchapter{The Stanford Prison Experiment}{TSPE}{VII}{Constrained Cognition} 154 | \newcommand{\namedpartchapter}[5][\relax]{% 155 | % \chapter[% 156 | % \texorpdfstring{% 157 | % \abbrev{#3, Teil #4}: #5}{% 158 | % #3, Teil #4: #5}][% 159 | % \mbox{#2 #4:} \mbox{#5}]{% 160 | % #2, Teil~#4:\protect\linebreak[1] #5#1}% 161 | % } 162 | \chapter[% 163 | #3~#4: #5][% 164 | \mbox{#2 #4:} \mbox{#5}]{% 165 | #2~#4:\protect\linebreak[1] #5#1}% 166 | } 167 | 168 | % Hanging paras for play scripts (used in Omake IV) 169 | \newenvironment{playdialog}{\begin{hangparas}{2em}{1}}{\end{hangparas}} 170 | 171 | % Chapter openings 172 | % Definition of chapterOpeningAuthorNote when they are desired to be printed 173 | % FIXME: Make the environment definition switchable with a flag 174 | \newenvironment{chapterOpeningAuthorNote}{% 175 | \par\noindent% 176 | E.~Y.:~ 177 | } 178 | {% 179 | \newline\rule[1ex]{\textwidth}{.1pt}\newline% 180 | } 181 | % \excludecomment{chapterOpeningAuthorNote} 182 | 183 | % chapterOpeningQuote 184 | \newenvironment{chapterOpeningQuote}{% 185 | \parindent=0pt% 186 | % \rule{\textwidth}{.1pt}% 187 | \itshape} 188 | {\newline\rule[1ex]{\textwidth}{.1pt}\newline} 189 | 190 | 191 | 192 | 193 | 194 | 195 | % Stars and breaks 196 | 197 | % Single “magic star” decoration 198 | \newcommand{\Star}{{\fontspec[ExternalLocation]{Miscelanea.ttf}*}} 199 | 200 | % Three “magic stars” decoration 201 | \def\Stars{{\large\Star\kern-.6ex\lower1.3ex\hbox{\large\Star}\kern-.1ex\raise.2ex\hbox{\tiny\Star}\spacefactor1000}} 202 | 203 | % Text break made of \Stars (only used to define other commands) 204 | \makeatletter 205 | \def\sbreak{\mbox{}\nobreak\hfill\mbox{}\allowbreak\rule{.60\textwidth}{.0pt}\par% 206 | \vskip 0pt plus 2\baselineskip\noindent{% 207 | \parbox[c][0pt][c]{\textwidth}{% 208 | \hfil \hbox{\lower14pt\hbox{\normalsize\Stars}}% 209 | }% 210 | }} 211 | 212 | % A standalone break 213 | \def\later{\sbreak% 214 | \vskip 0pt plus 2\baselineskip% 215 | \par\rule{.5\textwidth}{.0pt}\vskip1pt\noindent} 216 | 217 | % A break followed by a new section 218 | \newcommand{\latersection}[1]{\sbreak\section{#1}} 219 | \makeatother 220 | -------------------------------------------------------------------------------- /layout/hp-paper-type.tex: -------------------------------------------------------------------------------- 1 | % Paper weight used 2 | \input{layout/papers} 3 | \def\bookpaper{\lxxxgsm} 4 | -------------------------------------------------------------------------------- /layout/hp-title.tex: -------------------------------------------------------------------------------- 1 | \definecolor{gold}{rgb}{0.77,0.69,0.37} 2 | \newlength{\hptitlewidth} 3 | \newlength{\rationalh} 4 | \newcommand{\hptitle}[2][\stockwidth]{% 5 | \setlength{\hptitlewidth}{#1}% 6 | \centering\color{white}% 7 | \vskip 3cm\resizebox{.95\hptitlewidth}{!}{\textls[100]{HARRY POTTER AND THE}}% 8 | \vskip 2mm% 9 | \color{gold}% 10 | \settoheight{\rationalh}{\resizebox{.95\hptitlewidth}{!}{\textls[20]{RATIONALITY}}} 11 | \resizebox{!}{0.9\rationalh}{\textls[50]{METHODS}}% 12 | \hfil\resizebox{!}{0.3\rationalh}{\textls[50]{Of}}% 13 | \vskip 2mm% 14 | \resizebox{.95\hptitlewidth}{!}{\textls[20]{RATIONALITY}}% 15 | \vskip 8mm% 16 | \color{white}% 17 | \resizebox{.75\hptitlewidth}{!}{\textls[50]{\scshape{}Fanfiction von Eliezer Yudkowsky}}% 18 | \vskip 4mm% 19 | \resizebox{.4\hptitlewidth}{!}{\textls[50]{\scshape{}Deutsche Ausgabe}}% 20 | \vfill% 21 | \textls[50]{\scshape #2}% 22 | \color{black}% 23 | \vskip 1cm\ % 24 | } 25 | \providecommand{\fullvolumetitle}[1]{Buch #1: \volumetitle} 26 | -------------------------------------------------------------------------------- /layout/hp-warning.tex: -------------------------------------------------------------------------------- 1 | \chapter*{Content warnings} 2 | \thispagestyle{empty} 3 | 4 | Discussion (not depiction) of non-consensual sex: About 60\% of the way through Chapter 7; very briefly in an omake in Chapter 11. 5 | 6 | First-person depiction (experienced by viewpoint character) of intense school bullying. Starting halfway through Chapter 19. 7 | 8 | Violent character death. Chapter 89. 9 | 10 | For more information (with spoilers!), see: 11 | \begin{center}\url{https://wiki.lesswrong.com/wiki/MethodsOfRationality/TriggerWarnings}\end{center} 12 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-1.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-1.pdf} 2 | \input{layout/hpmor-title-1} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-2.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-2.pdf} 2 | \input{layout/hpmor-title-2} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-3.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-3.pdf} 2 | \input{layout/hpmor-title-3} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-4.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-4.pdf} 2 | \input{layout/hpmor-title-4} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-5.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-5.pdf} 2 | \input{layout/hpmor-title-5} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-dust-jacket-6.tex: -------------------------------------------------------------------------------- 1 | \def\bookfile{hpmor-6.pdf} 2 | \input{layout/hpmor-title-6} 3 | 4 | \input{layout/hp-dust-jacket} 5 | -------------------------------------------------------------------------------- /layout/hpmor-title-1.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{1} 2 | \def\volumetitle{Harry James Potter-Evans-Verres und die Methoden des rationalen Denkens} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title-2.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{2} 2 | \def\volumetitle{Harry James Potter-Evans-Verres und die Spiele des Professors} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title-3.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{3} 2 | \def\volumetitle{Harry James Potter-Evans-Verres und die Schatten des Todes} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title-4.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{4} 2 | \def\volumetitle{Hermine Jean Granger und der Ruf des Phönix} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title-5.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{5} 2 | \def\volumetitle{Harry James Potter-Evans-Verres und der letzte Feind} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title-6.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{6} 2 | \def\volumetitle{Harry James Potter-Evans-Verres und der Stein der Weisen} 3 | -------------------------------------------------------------------------------- /layout/hpmor-title.tex: -------------------------------------------------------------------------------- 1 | \def\volumenumber{} 2 | \def\volumetitle{Kapitel 1--\ref{last:chapter}} % plus omake files 1--{4} 3 | \newcommand{\fullvolumetitle}{\volumetitle} 4 | -------------------------------------------------------------------------------- /layout/papers.tex: -------------------------------------------------------------------------------- 1 | % Paper thicknesses 2 | 3 | % 70gsm Bond 4 | \def\lxxgsm{0.095mm} 5 | % 80gsm Bond 6 | \def\lxxxgsm{0.1mm} 7 | % 90gsm Bond 8 | \def\xcgsm{0.12mm} 9 | % 100gsm Bond 10 | \def\cgsm{0.125mm} 11 | % 115gsm Silk Bond 12 | \def\cxvgsmsilk{0.105mm} 13 | % 115gsm Gloss Bond 14 | \def\cxvgsmgloss{0.09mm} 15 | % 120gsm Bond 16 | \def\cxxgsm{0.13mm} 17 | % 135gsm Silk Bond 18 | \def\cxxxvgsmsilk{0.118mm} 19 | % 135gsm Gloss Bond 20 | \def\cxxxvgsmgloss{0.1mm} 21 | % 170gsm Silk Bond 22 | \def\clxxgsmsilk{0.165mm} 23 | % 170gsm Gloss Bond 24 | \def\clxxgsmgloss{0.146mm} 25 | -------------------------------------------------------------------------------- /layout/test.tex: -------------------------------------------------------------------------------- 1 | 2 | \RequirePackage[pdf]{layout/hp-book} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | \begin{document} 14 | { 15 | \pagestyle{empty} 16 | \input{layout/hpmor-title} 17 | \def\volumenumber{} 18 | % \def\volumetitle{Layout-Test vom \today{}} 19 | \def\volumetitle{} 20 | \input{layout/hp-intro} 21 | % \input{hp-warning} 22 | \pagenumbering{gobble} 23 | \input{layout/hp-contents} 24 | % \include{layout/hp-blurbs} 25 | \cleartorecto 26 | } 27 | \pagenumbering{arabic} 28 | \setcounter{page}{1} 29 | 30 | \part{Layout Tests} 31 | 32 | 33 | \chapter{Example Chapter ä-ö-ü-ß-Ä-Ö-Ü-SS} 34 | 35 | \begin{chapterOpeningAuthorNote} 36 | chapterOpeningAuthorNote: Every inch of wall space is covered by a bookcase. Each bookcase has six shelves, going almost to the ceiling. 37 | \end{chapterOpeningAuthorNote} 38 | \begin{chapterOpeningQuote} 39 | chapterOpeningQuote: Other shelves have two layers of paperback science fiction, with the back layer of books propped up on old tissue boxes or lengths of wood, so that you can see the back layer of books above the books in front. 40 | \end{chapterOpeningQuote} 41 | 42 | % \lettrine{E}{very} inch of wall space is covered by a bookcase. Each bookcase has six shelves, going almost to the ceiling. Some bookshelves are stacked to the brim with hardback books: science, maths, history, and everything else. Other shelves have two layers of paperback science fiction, with the back layer of books propped up on old tissue boxes or lengths of wood, so that you can see the back layer of books above the books in front. And it still isn’t enough. Books are overflowing onto the tables and the sofas and making little heaps under the windows. 43 | \lettrine{J}{edes} Stückchen Wand wird von Bücherschränken verdeckt. Jeder Bücherschrank hat sechs Ebenen, die fast bis an die Decke reichen. Einige von ihnen sind bis an den Rand gefüllt mit dicken Wälzern über Naturwissenschaften, Mathematik, Geschichte und all das. Andere beherbergen Science-Fiction-Taschenbücher in Zweierreihen, die hintere auf alten Pappkartons oder Holzplatten höhergestellt, so dass man die Titel über die Bücher der vorderen Reihe hinweg lesen kann. Doch selbst das reicht nicht aus. Die Bücher quellen über, belegen Tische, Sofas und bilden kleine Stapel unter den Fenstern. 44 | 45 | % This is the living-room of the house occupied by the eminent Professor Michael Verres-Evans, and his wife, Mrs~Petunia Evans-Verres, and their adopted son, Harry James Potter-Evans-Verres. There is a letter lying on the living-room table, and an unstamped envelope of yellowish parchment, addressed to \emph{Mr~H.~Potter} in emerald-green ink. 46 | Dies ist das Wohnzimmer des Hauses, in dem der angesehene Professor Michael Verres-Evans, seine Frau Mrs~Petunia Evans-Verres und ihr Adoptivsohn Harry James Potter-Evans-Verres leben. 47 | 48 | ä-ö-ü-ß-Ä-Ö-Ü-SS 49 | 50 | \chapter{Font Styles ä-ö-ü-ß-Ä-Ö-Ü-SS} 51 | 52 | \section{Basic Font Styles ä-ö-ü-ß-Ä-Ö-Ü-SS} 53 | 54 | underline: \underline{underline ä-ö-ü-ß-Ä-Ö-Ü-SS} 55 | 56 | textsc: \textsc{textsc ä-ö-ü-ß-Ä-Ö-Ü-SS} 57 | 58 | textbf: \textbf{textbf ä-ö-ü-ß-Ä-Ö-Ü-SS} 59 | 60 | emph: \emph{outeremph \emph{inneremph \emph{innerinneremph} outeremph} outeremph ä-ö-ü-ß-Ä-Ö-Ü-SS} 61 | 62 | MakeUppercase: start \MakeUppercase{MakeUppercase ä-ö-ü-ß-Ä-Ö-Ü-SS} end 63 | 64 | \section{tone of voice ä-ö-ü-ß-Ä-Ö-Ü-SS} 65 | 66 | shout: \shout{shout ä-ö-ü-ß-Ä-Ö-Ü-SS} 67 | 68 | scream: \scream{scream ä-ö-ü-ß-Ä-Ö-Ü-SS} 69 | 70 | prophesy: \prophesy{prophesy ä-ö-ü-ß-Ä-Ö-Ü-SS} 71 | 72 | parsel: \parsel{parsel ä-ö-ü-ß-Ä-Ö-Ü-SS Fußball, Fussball, Hexe, Dizzy} 73 | 74 | spell: \spell{spell ä-ö-ü-ß-Ä-Ö-Ü-SS} 75 | 76 | abbrev: \abbrev{abbrev SPHEW ä-ö-ü-ß-Ä-Ö-Ü-SS} 77 | 78 | \section{abbreviations} 79 | SPHEW: \SPHEW. 80 | 81 | \section{Newspaper} 82 | 83 | 1. headline: start \headline{my headline ä-ö-ü-ß-Ä-Ö-Ü-SS} end 84 | 85 | 2. inlineheadline: start \inlineheadline{my inline headline ä-ö-ü-ß-Ä-Ö-Ü-SS} end 86 | 87 | 3. headline env: 88 | \begin{headlines} 89 | my headline env ä-ö-ü-ß-Ä-Ö-Ü-SS 90 | \end{headlines} 91 | end 92 | 93 | \section{special} 94 | start McGonagallWhiteBoard: \McGonagallWhiteBoard{Hallo ä-ö-ü-ß-Ä-Ö-Ü-SS} end 95 | 96 | translatorsnote:\translatorsnote{Translator's note is here ä-ö-ü-ß-Ä-Ö-Ü-SS. And it still isn’t enough. Books are overflowing onto the tables and the sofas and making little heaps under the windows.} 97 | 98 | \section{writtenNote} 99 | \begin{writtenNote} 100 | \letterAddress{Sehr geehrte stellvertretende Schulleiterin ä-ö-ü-ß-Ä-Ö-Ü-SS} 101 | \end{writtenNote} 102 | 103 | \begin{writtenNote} 104 | \letterAddress{Sehr geehrte stellvertretende Schulleiterin ä-ö-ü-ß-Ä-Ö-Ü-SS} 105 | And it still isn’t enough. Books are overflowing onto the tables and the sofas and making little heaps under the windows. 106 | 107 | This is the living-room of the house occupied by the eminent Professor Michael Verres-Evans, and his wife, Mrs~Petunia Evans-Verres, and their adopted son, Harry James Potter-Evans-Verres. There is a letter lying on the living-room table, and an unstamped envelope of yellowish parchment, addressed to \emph{Mr~H.~Potter} in emerald-green ink. 108 | \letterClosing[Mit freundlichen Grüßen]{Harry James Potter-Evans-Verres.} 109 | \end{writtenNote} 110 | 111 | \part{Doc Structure} 112 | 113 | \partchapter{partchapter: The Stanford Prison Experiment}{I} 114 | Text 115 | This is the living-room of the house occupied by the eminent Professor Michael Verres-Evans, and his wife, Mrs~Petunia Evans-Verres, and their adopted son, Harry James Potter-Evans-Verres. There is a letter lying on the living-room table, and an unstamped envelope of yellowish parchment, addressed to \emph{Mr~H.~Potter} in emerald-green ink. 116 | 117 | This is the living-room of the house occupied by the eminent Professor Michael Verres-Evans, and his wife, Mrs~Petunia Evans-Verres, and their adopted son, Harry James Potter-Evans-Verres. There is a letter lying on the living-room table, and an unstamped envelope of yellowish parchment, addressed to \emph{Mr~H.~Potter} in emerald-green ink. 118 | 119 | \namedpartchapter{namedpartchapter: The Stanford Prison Experiment}{TSPE}{VI}{Constrained Optimization} 120 | Text 121 | 122 | later: text \later end later 123 | 124 | 125 | \latersection{latersection ä-ö-ü-ß-Ä-Ö-Ü-SS} 126 | start latersection 127 | 128 | 129 | 130 | 131 | \include{chapters/hpmor-chapter-001} 132 | % \include{chapters/hpmor-chapter-013} 133 | 134 | 135 | 136 | 137 | 138 | \end{document} 139 | -------------------------------------------------------------------------------- /post-checkout: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2015 Brent Longborough 3 | # Part of gitinfo2 package Version 2 4 | # Release 2.0.7 2015-11-22 5 | # Please read gitinfo2.pdf for licencing and other details 6 | # ----------------------------------------------------- 7 | # Post-{commit,checkout,merge} hook for the gitinfo2 package 8 | # 9 | # Get the first tag found in the history from the current HEAD 10 | FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null) 11 | # Get the first tag in history that looks like a Release 12 | RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null) 13 | # Hoover up the metadata 14 | git --no-pager log -1 --date=short --decorate=short \ 15 | --pretty=format:"\usepackage[% 16 | shash={%h}, 17 | lhash={%H}, 18 | authname={%an}, 19 | authemail={%ae}, 20 | authsdate={%ad}, 21 | authidate={%ai}, 22 | authudate={%at}, 23 | commname={%cn}, 24 | commemail={%ce}, 25 | commsdate={%cd}, 26 | commidate={%ci}, 27 | commudate={%ct}, 28 | refnames={%d}, 29 | firsttagdescribe={$FIRSTTAG}, 30 | reltag={$RELTAG} 31 | ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin 32 | -------------------------------------------------------------------------------- /python-requirements.txt: -------------------------------------------------------------------------------- 1 | lxml 2 | pytest 3 | -------------------------------------------------------------------------------- /ruff.toml: -------------------------------------------------------------------------------- 1 | fix = true # auto-fix findings 2 | line-length = 88 # same as Black 3 | target-version = "py313" # Python 3.13 4 | 5 | [lint] 6 | # comment this out to use only default rules (["E4", "E7", "E9", "F"]) 7 | select = ["ALL"] # activate all rules 8 | 9 | # add some more rules to include 10 | # extend-select = ["B", "Q", "E", "W"] 11 | 12 | # rule not to apply 13 | extend-ignore = [ 14 | "COM812", # missing-trailing-comma, 15 | "D200", # fits-on-one-line" 16 | "D211", # blank-line-before-class 17 | "D212", # multi-line-summary-second-line 18 | "ERA", # commented-out code 19 | "FIX002", # line-contains-todo 20 | "ISC001", # implicit-str-concat 21 | "PD901", # df name 22 | "PGH003", # blanket-type-ignore 23 | "RET504", # unnecessary-assign 24 | "T201", # print 25 | "TD002", # missing-todo-author 26 | "TD003", # missing-todo-link 27 | ] 28 | 29 | 30 | [format] 31 | line-ending = "lf" # force lf 32 | preview = false # enable unstable preview style formatting 33 | -------------------------------------------------------------------------------- /scripts/check_chapters_settings.py: -------------------------------------------------------------------------------- 1 | # ruff: # noqa: INP001 2 | 3 | """ 4 | Settings. 5 | 6 | lang: EN, DE, FR, ... 7 | raise_error: true -> script exits with error, used for autobuild of releases 8 | print_diff: true : print line of issues 9 | inline_fixing: modify the source file directly, USE WITH CAUTION 10 | """ 11 | 12 | settings = { 13 | "lang": "DE", 14 | "print_diff": True, 15 | "raise_error": True, 16 | "inline_fixing": False, 17 | } 18 | -------------------------------------------------------------------------------- /scripts/check_chapters_test.py: -------------------------------------------------------------------------------- 1 | # ruff: noqa: INP001 D103 RUF001 S101 2 | """Tests for check_chapters.py.""" 3 | 4 | from collections.abc import Callable 5 | 6 | import pytest 7 | from check_chapters import ( 8 | fix_common_typos, 9 | fix_ellipsis, 10 | fix_emph, 11 | fix_hyphens, 12 | fix_latex, 13 | fix_line, 14 | fix_linebreaks_speech, 15 | fix_mr_mrs, 16 | fix_numbers, 17 | fix_punctuation, 18 | fix_quotations, 19 | fix_spaces, 20 | fix_spell, 21 | ) 22 | from check_chapters_settings import settings 23 | 24 | 25 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 26 | def test_fix_common_typos(lang: str) -> None: 27 | settings["lang"] = lang 28 | pairs = [ 29 | ("Test King's Cross", "Test King’s Cross"), 30 | ("Test", "Test"), 31 | ] 32 | if lang == "EN": 33 | pairs.extend( 34 | [ 35 | ("I'm happy", "I’m happy"), 36 | ("can't be", "can’t be"), 37 | ] 38 | ) 39 | elif lang == "DE": 40 | # cspell:disable 41 | pairs.extend( 42 | [ 43 | ("Junge-der-überlebt-hat", "Junge-der-überlebte"), 44 | ("Fritz'sche Gesetz", "Fritz’sche Gesetz"), 45 | ("Fritz'schen Gesetz", "Fritz’schen Gesetz"), 46 | ("Fritz'scher Gesetz", "Fritz’scher Gesetz"), 47 | ] 48 | # cspell:enable 49 | ) 50 | check_it(fix_common_typos, pairs) 51 | 52 | 53 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 54 | def test_fix_ellipsis(lang: str) -> None: 55 | settings["lang"] = lang 56 | pairs = [] 57 | if lang != "DE": 58 | # cspell:disable 59 | pairs.extend( 60 | [ 61 | ("foo...bar", "foo…bar"), 62 | ("foo…bar", "foo…bar"), 63 | ("foo … bar", "foo…bar"), 64 | ("foo… bar", "foo…bar"), 65 | ("foo …bar", "foo…bar"), 66 | ("foo, …", "foo, …"), 67 | ("foo …! bar", "foo…! bar"), 68 | ] 69 | ) 70 | # cspell:enable 71 | if lang == "DE": 72 | pairs.extend( 73 | [ 74 | ("foo...bar", "foo … bar"), 75 | ("foo…bar", "foo … bar"), 76 | ("foo … bar", "foo … bar"), 77 | ("foo… bar", "foo … bar"), 78 | ("foo …bar", "foo … bar"), 79 | ("foo, …“", "foo, …“"), 80 | ("foo,…“", "foo, …“"), 81 | ("foo …! bar", "foo …! bar"), 82 | ("\\emph{…ihm", "\\emph{… ihm"), 83 | ] 84 | ) 85 | 86 | check_it(fix_ellipsis, pairs) 87 | 88 | 89 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 90 | def test_fix_emph(lang: str) -> None: 91 | settings["lang"] = lang 92 | pairs = [ 93 | (r"That’s not \emph{true!}", r"That’s not \emph{true}!"), 94 | (r"she got \emph{magic,} can you", r"she got \emph{magic}, can you"), 95 | ("foo", "foo"), 96 | ] 97 | if lang == "EN": 98 | pairs.extend( 99 | [ 100 | (r"briefly. \emph{Hopeless.} Both", r"briefly. \emph{Hopeless.} Both"), 101 | ("foo", "foo"), 102 | ] 103 | ) 104 | elif lang == "DE": 105 | pairs.extend( 106 | [ 107 | (r"briefly. \emph{Hopeless.} Both", r"briefly. \emph{Hopeless}. Both"), 108 | ("foo", "foo"), 109 | ] 110 | ) 111 | check_it(fix_emph, pairs) 112 | 113 | 114 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 115 | def test_fix_hyphens(lang: str) -> None: 116 | settings["lang"] = lang 117 | pairs = [ 118 | ("2-3-4", "2–3–4"), 119 | ] 120 | if lang != "DE": 121 | pairs.extend( 122 | ( 123 | (" —,", "—,"), 124 | (" —.", "—."), 125 | (" —!", "—!"), 126 | (" —?", "—?"), 127 | ("— foo", "—foo"), 128 | ("- foo", "—foo"), 129 | ("-foo", "—foo"), 130 | ) 131 | ) 132 | if lang == "DE": 133 | pairs.extend( 134 | ( 135 | ("foo - bar", "foo — bar"), 136 | ("foo -- bar", "foo — bar"), 137 | ("foo --- bar", "foo — bar"), 138 | ("foo—bar", "foo — bar"), 139 | ("foo — bar", "foo — bar"), 140 | ("foo – bar", "foo — bar"), # mid dash 141 | # quote start 142 | ("foo—„", "foo — „"), 143 | ("foo—‚", "foo — ‚"), 144 | ("foo —„", "foo — „"), 145 | ("foo „ —quote", "foo „— quote"), 146 | ("foo „ — quote", "foo „— quote"), 147 | ("foo—„— quote", "foo — „— quote"), 148 | # quote end 149 | ("quote —“foo", "quote —“ foo"), 150 | ("foo —“", "foo —“"), 151 | # emph 152 | ("\\emph{foo—}", "\\emph{foo —}"), 153 | ("\\emph{foo —}", "\\emph{foo —}"), 154 | ("\\emph{foo—} bar", "\\emph{foo —} bar"), 155 | ("foo—\\emph{bar}", "foo — \\emph{bar}"), 156 | ("\\emph{—ihm", "\\emph{— ihm"), 157 | ) 158 | ) 159 | check_it(fix_hyphens, pairs) 160 | 161 | 162 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 163 | def test_fix_latex(lang: str) -> None: 164 | settings["lang"] = lang 165 | pairs = [ 166 | ("begin at new line\\begin{em}", "begin at new line\n\\begin{em}"), 167 | ("end at new line\\end{em}", "end at new line\n\\end{em}"), 168 | ("new line after \\\\ foo", "new line after \\\\\nfoo"), 169 | ("no new line after \\\\", "no new line after \\\\"), 170 | ] 171 | check_it(fix_latex, pairs) 172 | 173 | 174 | @pytest.mark.parametrize("lang", ["DE"]) 175 | def test_fix_linebreaks_speech(lang: str) -> None: 176 | settings["lang"] = lang 177 | pairs = [ 178 | (" „Hello", "\n„Hello"), 179 | (" „hello", " „hello"), 180 | ("„hello", "„hello"), 181 | ] 182 | check_it(fix_linebreaks_speech, pairs) 183 | 184 | 185 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 186 | def test_fix_mr_mrs(lang: str) -> None: 187 | settings["lang"] = lang 188 | pairs = [ 189 | ("Mr. H. Potter", "Mr~H.~Potter"), 190 | ("it’s Doctor now, not Miss.", "it’s Doctor now, not Miss."), 191 | ] 192 | if lang == "DE": 193 | pairs.extend( 194 | [ 195 | ("Mr. Potter", "Mr~Potter"), 196 | ("Mrs. Potter", "Mrs~Potter"), 197 | ("Miss. Potter", "Miss~Potter"), 198 | ("Dr. Potter", "Dr~Potter"), 199 | ("Dr Potter", "Dr~Potter"), 200 | ("Mr Potter", "Mr~Potter"), 201 | ("Mr. and Mrs. Davis", "Mr~and Mrs~Davis"), 202 | ] 203 | ) 204 | check_it(fix_mr_mrs, pairs) 205 | 206 | 207 | @pytest.mark.parametrize("lang", ["DE"]) 208 | def test_fix_numbers(lang: str) -> None: 209 | settings["lang"] = lang 210 | pairs = [ 211 | ("Es ist 12:23 Uhr.", "Es ist 12:23~Uhr."), 212 | ] 213 | check_it(fix_numbers, pairs) 214 | 215 | 216 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 217 | def test_fix_spaces(lang: str) -> None: 218 | settings["lang"] = lang 219 | pairs = [ 220 | ("Hallo Harry", "Hallo Harry"), 221 | ("tabs\tto\t\tspace", "tabs to space"), 222 | ("trailing spaces ", "trailing spaces"), 223 | (" ", ""), 224 | ("multiple spaces", "multiple spaces"), 225 | ] 226 | check_it(fix_spaces, pairs) 227 | 228 | 229 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 230 | def test_fix_punctuation(lang: str) -> None: 231 | settings["lang"] = lang 232 | pairs = [ 233 | ("foo,, bar", "foo, bar"), 234 | ("foo.. bar", "foo. bar"), 235 | ("foo!! bar", "foo! bar"), 236 | ("foo?? bar", "foo? bar"), 237 | ("foo:: bar", "foo: bar"), 238 | ("foo;; bar", "foo; bar"), 239 | ] 240 | check_it(fix_punctuation, pairs) 241 | 242 | 243 | @pytest.mark.parametrize("lang", ["EN", "DE"]) 244 | def test_fix_quotations(lang: str) -> None: 245 | settings["lang"] = lang 246 | if settings["lang"] == "EN": 247 | pairs = [ 248 | ('"foo"', "“foo”"), 249 | ("'foo'", "‘foo’"), 250 | (' "foo bar"', " “foo bar”"), 251 | # space at opening " 252 | ("“ foo ”", "“foo”"), 253 | ("\\emph{foo} ” bar", "\\emph{foo}” bar"), 254 | ("\\heading{“foo ”} bar", "\\heading{“foo”} bar"), 255 | ("\\emph{“foo”} bar", "“\\emph{foo}” bar"), 256 | ("\\emph{“ foo ”} bar", "“\\emph{foo}” bar"), 257 | ("\\emph{foo ”} bar", "\\emph{foo}” bar"), 258 | ("‘\\emph{foo}’", "‘foo’"), 259 | ] 260 | if settings["lang"] == "DE": 261 | pairs = [ 262 | ('"foo"', "„foo“"), 263 | ("“foo”", "„foo“"), 264 | ("»foo«", "„foo“"), 265 | ("'foo'", "‚foo‘"), 266 | ("’foo‘", "‚foo‘"), 267 | (' "foo bar"', " „foo bar“"), 268 | ("…„", "… „"), 269 | ("„ foo “", "„foo“"), 270 | ("\\heading{„foo “} bar", "\\heading{„foo“} bar"), 271 | ("\\emph{„foo“} bar", "„\\emph{foo}“ bar"), 272 | ("\\emph{„ foo “} bar", "„\\emph{foo}“ bar"), 273 | ("\\emph{foo “} bar", "\\emph{foo}“ bar"), 274 | ("foo,“ bar", "foo“, bar"), 275 | ("‚\\emph{foo}‘", "‚foo‘"), 276 | ("„foo,“", "„foo“,"), 277 | ("„foo“bar", "„foo“ bar"), 278 | # EN closing 279 | ("„foo”", "„foo“"), 280 | ] 281 | check_it(fix_quotations, pairs) 282 | 283 | 284 | @pytest.mark.parametrize("lang", ["DE"]) 285 | def test_fix_spell(lang: str) -> None: 286 | settings["lang"] = lang 287 | pairs = [ 288 | ("‚Lumos‘", "\\spell{Lumos}"), 289 | ("„Lumos“", "\\spell{Lumos}"), 290 | ("„\\emph{Lumos}“", "\\spell{Lumos}"), 291 | ("\\emph{„Lumos“}", "\\spell{Lumos}"), 292 | ("\\emph{Lumos!}", "\\spell{Lumos}"), 293 | ("„\\spell{Lumos}“", "\\spell{Lumos}"), 294 | ] 295 | check_it(fix_spell, pairs) 296 | 297 | 298 | def check_it(fct: Callable, pairs: list[tuple[str, str]]) -> None: 299 | for text, expected_output in pairs: 300 | # test of isolated function 301 | assert fct(text) == expected_output, ( 302 | f"'{text}' -> '{fct(text)}' != '{expected_output}'" 303 | ) 304 | 305 | # test in complete fix_line context 306 | assert fix_line(text) == expected_output, ( 307 | f"'{text}' -> '{fix_line(text)}' != '{expected_output}' (fix_line)" 308 | ) 309 | -------------------------------------------------------------------------------- /scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(cd $(dirname $0) && pwd) 5 | cd $script_dir/.. 6 | 7 | latexmk -C 8 | rm -rf chapters/*.aux 9 | rm -rf chapters/*-autofix.tex 10 | rm -rf tmp/ 11 | -------------------------------------------------------------------------------- /scripts/compare-translations.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # by Torben Menke https://entorb.net 3 | 4 | # TODO: fix ruff findings 5 | # ruff: noqa 6 | 7 | """ 8 | Compare chapters between translations. 9 | 10 | downloads other translation chapter files 11 | chapter-wise comparison of my version to other language 12 | by counting the use of LaTeX commands like parsel etc.s 13 | """ 14 | 15 | import os 16 | import re 17 | import sys 18 | 19 | import requests 20 | 21 | list_of_latex_commands_to_search_for = [ 22 | "\\chapter", 23 | "\\partchapter", 24 | "\\section", 25 | "\\latersection", 26 | "\\later", 27 | "\\shout", 28 | "\\scream", 29 | "\\prophesy", 30 | "\\parsel", 31 | "\\headline", 32 | "\\inlineheadline", 33 | "\\SPHEW", 34 | "\\begin{writtenNote}", 35 | "\\begin{em}", 36 | "—", 37 | "…", 38 | "\\emph", 39 | "\\spell", 40 | ] 41 | 42 | # set repo language to compare with 43 | other_lang = "en" 44 | 45 | # ensure we are in chapter dir 46 | dir_root = os.path.dirname(sys.argv[0]) + "/.." 47 | os.chdir(dir_root + "/chapters") 48 | 49 | translations = { 50 | "en": { 51 | "repo": "rrthomas/hpmor/", 52 | }, 53 | "fr": { 54 | "repo": "yeKcim/hpmor/", 55 | }, 56 | "de": { 57 | "repo": "entorb/hpmor-de/", 58 | }, 59 | } 60 | 61 | 62 | def download_file(url: str, filepath: str): 63 | """ 64 | Download file from url to filepath. 65 | """ 66 | headers = { 67 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 ", # noqa: E501 68 | } 69 | cont = requests.get(url, headers=headers, verify=True, timeout=3).content 70 | # verify=False -> skip SSL cert verification: CERTIFICATE_VERIFY_FAILED 71 | with open(filepath, mode="bw") as fh: 72 | fh.write(cont) 73 | 74 | 75 | # TODO: FR uses master as branch name 76 | def download_all_chapters(): 77 | baseurl = "https://raw.githubusercontent.com/<>/main/chapters/hpmor-chapter-<>.tex" # noqa: E501 78 | 79 | # for lang in translations.keys(): 80 | lang = other_lang 81 | print(f"===downloading translation : {lang}===") 82 | dirout = f"translation-{lang}/" 83 | os.makedirs(dirout, exist_ok=True) 84 | 85 | repo = translations[lang]["repo"] 86 | for i in range(0, 122 + 1): 87 | ch_no = "%03d" % i 88 | url = baseurl.replace("<>", repo).replace("<>", ch_no) 89 | filepath = f"{dirout}/hpmor-chapter-{ch_no}.tex" 90 | if not os.path.exists(filepath): 91 | print(filepath) 92 | download_file(url=url, filepath=filepath) 93 | 94 | 95 | def get_list_of_my_chapter_files() -> list: 96 | """ 97 | Read hpmor.tex, extract list of (not-commented out) chapter files. 98 | 99 | returns list of filesnames 100 | """ 101 | list_of_chapter_files = [] 102 | with open("../hpmor.tex", encoding="utf-8") as fh: 103 | lines = fh.readlines() 104 | lines = [elem for elem in lines if elem.startswith(r"\include{chapters/")] 105 | for line in lines: 106 | my_match = re.search(r"^.*include\{chapters/(.+?)\}.*$", line) 107 | assert my_match 108 | fileName = my_match.group(1) 109 | list_of_chapter_files.append(fileName + ".tex") 110 | return list_of_chapter_files 111 | 112 | 113 | def get_list_of_my_chapter_files_v2() -> list: 114 | """ 115 | Return list of chapter files (0..122). 116 | """ 117 | list_of_chapter_files = [] 118 | for i in range(0, 122 + 1): 119 | ch_no = "%03d" % i 120 | f = f"hpmor-chapter-{ch_no}.tex" 121 | list_of_chapter_files.append(f) 122 | return list_of_chapter_files 123 | 124 | 125 | def remove_comments(cont: str) -> str: 126 | """ 127 | Remove Latex comments from file contents. 128 | """ 129 | # fix end of line 130 | cont = re.sub(r"\r\n?", r"\n", cont) 131 | l_cont = cont.split("\n") 132 | l_cont_clean = [] 133 | # remove comments 134 | for line in l_cont: 135 | if re.match(r"^\s*%", line): 136 | continue 137 | line = re.sub(r"(? dict: 144 | res = {} 145 | for command in list_of_latex_commands_to_search_for: 146 | c = cont.count(command) 147 | # print(f"{command} \t {c}") 148 | res[command] = c 149 | return res 150 | 151 | 152 | def compare_to_lang(my_files: list, lang="en"): 153 | for myFile in my_files: 154 | ch_no = myFile[14:17] 155 | # in DE I added a prefix to the files, so this would not work for lang == "de" 156 | otherFile = f"translation-{lang}/hpmor-chapter-{ch_no}.tex" 157 | 158 | with open(myFile, encoding="utf-8") as fh: 159 | cont = fh.read() 160 | cont = remove_comments(cont) 161 | res_my_file = count_latex_commands(cont) 162 | 163 | with open(otherFile, encoding="utf-8") as fh: 164 | cont = fh.read() 165 | cont = remove_comments(cont) 166 | res_other_file = count_latex_commands(cont) 167 | 168 | has_finding = False 169 | for command in list_of_latex_commands_to_search_for: 170 | c_myFile = res_my_file[command] 171 | c_otherFile = res_other_file[command] 172 | if c_myFile != c_otherFile: 173 | if has_finding is False: 174 | has_finding = True 175 | print(myFile) 176 | print(f" {command}: {c_myFile} vs. {c_otherFile}") 177 | # exit() 178 | 179 | 180 | if __name__ == "__main__": 181 | download_all_chapters() 182 | myFiles = get_list_of_my_chapter_files_v2() 183 | compare_to_lang(my_files=myFiles, lang=other_lang) 184 | -------------------------------------------------------------------------------- /scripts/cspell-find-unused-words.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # by Torben Menke https://entorb.net 3 | 4 | """ 5 | Remove unused words from cspell wordlist. 6 | 7 | reads wordlist 8 | reads chapter LaTeX files, removes comments 9 | """ 10 | 11 | import re 12 | from pathlib import Path 13 | 14 | path_to_wordlist = Path("cspell-words.txt") 15 | words = path_to_wordlist.read_text(encoding="utf-8").splitlines() 16 | 17 | # remove duplicates in source file 18 | words = set(words) 19 | words = sorted(words, key=lambda x: x.lower()) 20 | # path_to_wordlist.write_text("\n".join(words)) 21 | 22 | cont_all_chapter: str = "" 23 | for chapter_file in sorted(Path("chapters").glob("*.tex")): 24 | cont_all_chapter += chapter_file.read_text(encoding="utf-8") 25 | 26 | # remove comments 27 | cont_all_chapter = re.sub(r"(? epub 4 | no longer in use, since now using calibri instead, which uses html.css 5 | */ 6 | 7 | em { 8 | font-style: italic; 9 | } 10 | 11 | em em { 12 | font-style: normal; 13 | } 14 | 15 | em em em { 16 | font-style: italic; 17 | } 18 | 19 | /* 20 | pandoc copies the fonts to ../fonts/*.ttf inside the .epub file 21 | */ 22 | @font-face { 23 | font-family: "Automobile Contest"; 24 | font-weight: normal; 25 | font-style: normal; 26 | src: url("../fonts/Automobile Contest.ttf"); 27 | } 28 | 29 | span.McGonagallWhiteBoard { 30 | font: 5em "Automobile Contest"; 31 | color: #cc3333; 32 | text-decoration: underline; 33 | text-decoration-color: #3333cc; 34 | text-decoration-thickness: 1px; 35 | } 36 | 37 | @font-face { 38 | font-family: "gabriele-bad"; 39 | font-weight: normal; 40 | font-style: normal; 41 | src: url("../fonts/gabriele-bad.ttf"); 42 | } 43 | 44 | span.headline { 45 | font: 1.2em "gabriele-bad"; 46 | color: #424242; 47 | } 48 | 49 | 50 | @font-face { 51 | font-family: "Parseltongue"; 52 | font-weight: normal; 53 | font-style: normal; 54 | src: url("../fonts/Parseltongue.ttf"); 55 | } 56 | 57 | span.parsel { 58 | font: 1.2em "Parseltongue"; 59 | /* color: #003300; */ 60 | } 61 | 62 | div.parsel { 63 | font: 1.2em "Parseltongue"; 64 | /* color: #003300; */ 65 | } 66 | 67 | @font-face { 68 | font-family: "Graphe_Alpha_alt"; 69 | font-weight: normal; 70 | font-style: normal; 71 | src: url("../fonts/Graphe_Alpha_alt.ttf"); 72 | } 73 | 74 | div.adjustwidth { 75 | font: 1em "Graphe_Alpha_alt"; 76 | color: #3333cc; 77 | } 78 | 79 | div.writtenNote { 80 | font: 1em "Graphe_Alpha_alt"; 81 | /* color: #3333cc; */ 82 | } 83 | 84 | span.writtenNote { 85 | font: 1em "Graphe_Alpha_alt"; 86 | /* color: #3333cc; */ 87 | } 88 | 89 | div.flushright { 90 | margin-top: 6em; 91 | text-align: right; 92 | } 93 | 94 | /* end epub.css */ 95 | -------------------------------------------------------------------------------- /scripts/ebook/step_1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # based on work by yeKcim 4 | # https://github.com/yeKcim/hpmor/tree/master/ebook 5 | 6 | echo === 1. extract cover from PDF to image=== 7 | 8 | # ensure we are in the hpmor root dir 9 | script_dir=$(dirname $0) 10 | cd $script_dir/../.. 11 | 12 | mkdir -p tmp/ 13 | 14 | source_file="hpmor.pdf" 15 | target_file="tmp/title.png" 16 | 17 | # extract title page from PDF and convert to jpeg 18 | # V1 via imagemagick 19 | # sudo apt install imagemagick 20 | # convert -density 150 tmp/hpmor.pdf[0] -quality 75 tmp/title-en.jpg 21 | # imagemagick complains: 22 | # attempt to perform an operation not allowed by the security policy 23 | 24 | # V2 via ghostscript 25 | gs -dSAFER -r600 -sDEVICE=pngalpha -dFirstPage=1 -dLastPage=1 -o $target_file $source_file 26 | 27 | # now imagemagick can be used for converting to the proper size 28 | source_file="tmp/title.png" 29 | target_file="tmp/title.jpg" 30 | convert -density 150 $source_file -resize 1186x1186\> -quality 75 $target_file 31 | -------------------------------------------------------------------------------- /scripts/ebook/step_2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # based on work by yeKcim 4 | # https://github.com/yeKcim/hpmor/tree/master/ebook 5 | 6 | echo === 2. flatten .tex files === 7 | 8 | # ensure we are in the hpmor root dir 9 | script_dir=$(dirname $0) 10 | cd $script_dir/../.. 11 | 12 | source_file="scripts/ebook/hpmor-ebook.tex" 13 | target_file="tmp/hpmor-epub-2-flatten.tex" 14 | 15 | # flatten the .tex files to one file 16 | latexpand $source_file -o $target_file 17 | -------------------------------------------------------------------------------- /scripts/ebook/step_3.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # by Torben Menke https://entorb.net 3 | 4 | """ 5 | Modify flattened .tex file. 6 | """ 7 | 8 | import datetime as dt 9 | import os 10 | import re 11 | from pathlib import Path 12 | 13 | os.chdir(Path(__file__).parent.parent.parent) 14 | 15 | source_file = Path("tmp/hpmor-epub-2-flatten.tex") 16 | target_file = Path("tmp/hpmor-epub-3-flatten-mod.tex") 17 | 18 | if __name__ == "__main__": 19 | print("=== 3. modify flattened file ===") 20 | 21 | with source_file.open(encoding="utf-8", newline="\n") as fh_in: 22 | cont = fh_in.read() 23 | 24 | # \today 25 | date_str = dt.datetime.now(dt.UTC).date().strftime("%d.%m.%Y") 26 | cont = cont.replace("\\today{}", date_str) 27 | 28 | # empty the newenvironments: headlines, writtenNote, playdialog 29 | # to prevent implications on other cleanup scripts 30 | cont = re.sub( 31 | r"\\newenvironment\{(headlines|writtenNote|playdialog)\}.*?\n\n", 32 | r"\\newenvironment{\1}{}{}\n\n", 33 | cont, 34 | flags=re.DOTALL, 35 | count=3, 36 | ) 37 | 38 | # writtenNote env -> \writtenNoteA 39 | cont = re.sub( 40 | r"\s*\\begin\{writtenNote\}\s*(.*?)\s*\\end\{writtenNote\}", 41 | r"\\writtenNoteA{\1}", 42 | cont, 43 | flags=re.DOTALL, 44 | ) 45 | 46 | # fix chapterOpeningAuthorNote 47 | # not used in DE version 48 | 49 | # some cleanup 50 | cont = cont.replace("\\hplettrineextrapara\n", "") 51 | 52 | # additional linebreaks in verses of chapter 64 53 | cont = cont.replace("\\\\\n\n", "\n\n") 54 | 55 | # manual pagebreaks 56 | cont = re.sub(r"\\clearpage(\{\}|)\n?", "", cont) 57 | 58 | # \vskip 1\baselineskip plus .5\textheight minus 1\baselineskip 59 | cont = re.sub(r"\\vskip .*\\baselineskip", "", cont) 60 | 61 | # remove \settowidth{\versewidth}... \begin{verse}[\versewidth] 62 | cont = re.sub( 63 | r"\n[^\n]*?\\settowidth\{\\versewidth\}[^\n]*?\n(\\begin\{verse\}\[\\versewidth\])", 64 | r"\n\\begin{verse}", 65 | cont, 66 | ) 67 | 68 | # remove \settowidth 69 | cont = re.sub( 70 | r"\\settowidth\{[^\}]*\}\{([^\}]*)\}", 71 | r"\1", 72 | cont, 73 | flags=re.DOTALL, 74 | ) 75 | 76 | # fix „ at start of chapter 77 | # \lettrine[ante=„] -> „\lettrine 78 | # \lettrinepara[ante=„] -> „\lettrine 79 | cont = re.sub( 80 | r"\\(lettrine|lettrinepara)\[ante=(.)\]", 81 | r"\2\\lettrine", 82 | cont, 83 | ) 84 | 85 | # OMakeIV sections 86 | # not used in DE version 87 | 88 | # \censor 89 | cont = re.sub(r"\\censor\{[^}]*\}", r"xxxxxx", cont) 90 | 91 | # # remove Deathly_Hallows_Sign.pdf and other pdf images 92 | # # \includegraphics[scale=0.125]{images/Deathly_Hallows_Sign.pdf} 93 | # cont = re.sub( 94 | # # r"\\includegraphics.*?\{images/Deathly_Hallows_Sign.*?\}", 95 | # r"\\includegraphics.*?\.pdf\}", 96 | # "", 97 | # cont, 98 | # ) 99 | 100 | # remove all images 101 | cont = re.sub( 102 | r"\\includegraphics\[[^\]]*\]\{[^\}]*\}", 103 | "", 104 | cont, 105 | flags=re.DOTALL, 106 | ) 107 | 108 | # remove empty envs 109 | cont = re.sub( 110 | r"\\begin\{([^\}]*)\}\s*\\end\{\1}", 111 | "", 112 | cont, 113 | flags=re.DOTALL, 114 | ) 115 | 116 | # remove end stuff 117 | cont = re.sub( 118 | r"(.*)\\end\{chapterOpeningAuthorNote\}.*?\\end\{document\}", 119 | r"\1\\end{chapterOpeningAuthorNote}\n\\end{document}", 120 | cont, 121 | flags=re.DOTALL, 122 | count=1, 123 | ) 124 | 125 | with target_file.open(mode="w", encoding="utf-8", newline="\n") as fh_out: 126 | fh_out.write(cont) 127 | -------------------------------------------------------------------------------- /scripts/ebook/step_4.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # by Torben Menke https://entorb.net 3 | 4 | """ 5 | Parselify flattened .tex file. 6 | """ 7 | 8 | import os 9 | import re 10 | from pathlib import Path 11 | 12 | os.chdir(Path(__file__).parent.parent.parent) 13 | 14 | source_file = Path("tmp/hpmor-epub-3-flatten-mod.tex") 15 | target_file = Path("tmp/hpmor-epub-4-flatten-parsel.tex") 16 | 17 | 18 | def convert_parsel(s: str) -> str: 19 | """Convert text to Parsel.""" 20 | # for spellcheck of .doc version we should return here 21 | # return s 22 | # small ss -> ß -> sss ; s->ss 23 | s = s.replace("ss", "ß").replace("s", "ss").replace("ß", "sss") 24 | # capital S -> Ss ; capital SS -> SSS ; S->SS 25 | s = s.replace("SS", "ẞ").replace("S", "Ss").replace("ẞ", "SSS") 26 | # small zz -> zzz ; z->zz 27 | s = s.replace("zz", "ß").replace("z", "zz").replace("ß", "zzz") 28 | # capital Z -> Zz ; ZZ->ZZZ 29 | s = s.replace("ZZ", "ẞ").replace("Z", "Zz").replace("ß", "ZZZ") 30 | # small x -> xs 31 | s = s.replace("x", "xs") 32 | return s 33 | 34 | 35 | if __name__ == "__main__": 36 | print("=== 4. parselify flattened file in python ===") 37 | 38 | with source_file.open(encoding="utf-8", newline="\n") as fh_in: 39 | cont = fh_in.read() 40 | 41 | # \parsel 42 | my_matches = re.finditer(r"(\\parsel\{([^\}\\]+)\})", cont) 43 | for my_match in my_matches: 44 | was = my_match.group(1) 45 | womit = convert_parsel(my_match.group(2)) 46 | cont = cont.replace(was, "\\parsel{" + womit + "}") 47 | 48 | with target_file.open(mode="w", encoding="utf-8", newline="\n") as fh_out: 49 | fh_out.write(cont) 50 | -------------------------------------------------------------------------------- /scripts/ebook/step_4_test.py: -------------------------------------------------------------------------------- 1 | # ruff: noqa: INP001 S101 2 | # cspell:disable 3 | 4 | """Unit Tests.""" 5 | 6 | import pytest 7 | from step_4 import convert_parsel 8 | 9 | 10 | @pytest.mark.parametrize( 11 | ("text", "expected"), 12 | [ 13 | ("foo", "foo"), 14 | # s 15 | ("house", "housse"), 16 | ("Special", "Sspecial"), 17 | # ss and ß 18 | ("Professor", "Professsor"), 19 | ("muß", "musss"), 20 | # z 21 | ("zero", "zzero"), 22 | ("Zero", "Zzero"), 23 | # zz 24 | ("puzzled", "puzzzled"), 25 | # x -> xs 26 | ("Bellatrix", "Bellatrixs"), 27 | # combined 28 | ("expression", "exspresssion"), 29 | ("Salazar", "Ssalazzar"), 30 | ], 31 | ) 32 | def test_convert_parsel(text: str, expected: str) -> None: # noqa: D103 33 | assert convert_parsel(text) == expected 34 | -------------------------------------------------------------------------------- /scripts/ebook/step_5.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # based on work by yeKcim 4 | # https://github.com/yeKcim/hpmor/tree/master/ebook 5 | 6 | echo === 5. LaTeX -\> HTML via pandoc === 7 | 8 | # ensure we are in the hpmor root dir 9 | script_dir=$(dirname $0) 10 | cd $script_dir/../.. 11 | 12 | source_file="tmp/hpmor-epub-4-flatten-parsel.tex" 13 | target_file="tmp/hpmor-epub-5-html-unmod.html" 14 | 15 | # extract title and author from hp-header.tex 16 | title=$(grep "pdftitle=" layout/hp-header.tex | awk -F '[{}]' '{print $2}') 17 | author=$(grep "pdfauthor=" layout/hp-header.tex | awk -F '[{}]' '{print $2}') 18 | 19 | pandoc --standalone -V lang=de --from=latex+latex_macros $source_file -o $target_file --metadata title="$title" --metadata author="$author" 20 | -------------------------------------------------------------------------------- /scripts/ebook/step_6.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # by Torben Menke https://entorb.net 3 | # ruff: noqa: RUF001 4 | 5 | """ 6 | HTML modifications. 7 | """ 8 | 9 | import re 10 | import sys 11 | from pathlib import Path 12 | 13 | from lxml import etree # pip install lxml 14 | 15 | sys.path.append(str(Path(__file__).resolve().parent.parent)) 16 | from check_chapters_settings import settings 17 | 18 | LANG = settings["lang"] 19 | 20 | source_file = Path("tmp/hpmor-epub-5-html-unmod.html") 21 | target_file = Path("hpmor.html") 22 | 23 | 24 | def check_html(cont: str) -> None: 25 | """Check html syntax.""" 26 | parser = etree.XMLParser(recover=False) # Do not auto-fix errors 27 | try: 28 | etree.fromstring(cont, parser) 29 | except etree.XMLSyntaxError as e: 30 | print("HTML Error:", e) 31 | sys.exit(1) 32 | # raise 33 | 34 | 35 | def fix_ellipsis(s: str) -> str: 36 | """ 37 | Fix ellipsis spacing for ebooks. 38 | """ 39 | if LANG == "DE": 40 | # this was redundant to the new DE rules in check_chapters.py 41 | # before opening DE-quotes: add space 42 | # s = re.sub(r"…(?=[„])", "… ", s) 43 | return s 44 | # 1. remove all spaces around ellipsis 45 | s = re.sub(r" *… *", "…", s) 46 | # 2. recreate some spaces 47 | # before punctuation : no space, so covered by 1. 48 | # between words 49 | s = re.sub(r"(?<=[\w])…(?=[\w])", "… ", s) 50 | # after punctuation: add space 51 | s = re.sub(r"(?<=[\.\?!:,;])…", r" …", s) 52 | # fine-tuning … and … 53 | s = re.sub(r"(?<=)…", "… ", s) 54 | s = re.sub(r"…(?=)", "… ", s) 55 | # before opening EN-quotes: add space 56 | # s = re.sub(r"…(?=[“])", "… ", s) 57 | # NO: before opening DE-quotes: add space 58 | # s = re.sub(r"…(?=[„])", "… ", s) 59 | return s 60 | 61 | 62 | if __name__ == "__main__": 63 | print("=== 6. HTML modifications ===") 64 | 65 | with source_file.open(encoding="utf-8", newline="\n") as fh_in: 66 | cont = fh_in.read() 67 | print("checking source html") 68 | check_html(cont) 69 | 70 | # remove strange leftovers from tex -> html conversion 71 | cont = re.sub( 72 | r"().*?(

Fanfiction von)", 73 | r"\1\n\2", 74 | cont, 75 | flags=re.DOTALL | re.IGNORECASE, 76 | count=1, 77 | ) 78 | 79 | # stray leftover 80 | cont = re.sub( 81 | r"(github.com/rrthomas/hpmor/
\s+

)\s+", 82 | r"\1", 83 | cont, 84 | flags=re.DOTALL | re.IGNORECASE, 85 | count=1, 86 | ) 87 | 88 | # remove duplication of author name 89 | cont = re.sub( 90 | r"""

Fanfiction.*?

Basierend auf der Harry Potter Reihe von J. K. Rowling.*?

""", # noqa: E501 91 | "

Fanfiction basierend auf der Harry Potter Reihe von J. K. Rowling

", 92 | cont, 93 | flags=re.DOTALL | re.IGNORECASE, 94 | count=1, 95 | ) 96 | 97 | # now done via pandoc -V lang=de in step_5.sh 98 | # # set language 99 | # cont = re.sub( 100 | # r'(]*) lang="" xml:lang=""', 101 | # r'\1 lang="de" xml:lang="de"', 102 | # cont, 103 | # count=1, 104 | # ) 105 | 106 | # fix spaces around ellipsis 107 | cont = fix_ellipsis(cont) 108 | 109 | # doc structure (not needed any more, using calibi --level1-toc flag instead) 110 | # sed -i 's/

" in cont: 131 | part_no += 1 132 | cont = cont.replace("

", f"{part_no}. ", 1) 133 | cont = cont.replace("", "

") 134 | 135 | # add chapter numbers 136 | chapter_no = 0 137 | while "

" in cont: 138 | chapter_no += 1 139 | cont = cont.replace("

", f"{chapter_no}. ", 1) 140 | cont = cont.replace("", "

") 141 | 142 | # fix double rules 143 | # cont = cont.replace("
\n
", "
") 144 | cont = re.sub( 145 | r"
\n
", 146 | r"
", 147 | cont, 148 | flags=re.DOTALL | re.IGNORECASE, 149 | ) 150 | # fixing linebreak at author's comment 151 | cont = cont.replace("

E. Y.: 

\n

", "

E.Y.: ") 152 | 153 | # converting "color-marked" styles of 1.sh back to proper style classes 154 | cont = re.sub( 155 | r'<(div|span) style="color: (parsel|writtenNote|McGonagallWhiteBoard|headline)"', # noqa: E501 156 | r'<\1 class="\2"', 157 | cont, 158 | ) 159 | 160 | # add css style file format for \emph in \emph 161 | with Path("scripts/ebook/html.css").open(encoding="utf-8", newline="\n") as fh_in: 162 | css = fh_in.read() 163 | cont = cont.replace("\n", css + "\n\n") 164 | 165 | print("checking target html") 166 | check_html(cont) 167 | 168 | # remove training slashes to satisfy https://validator.w3.org 169 | cont = cont.replace("
", "
") 170 | cont = cont.replace("


", "
") 171 | cont = re.sub( 172 | r"(]*) />", 173 | r"\1>", 174 | cont, 175 | ) 176 | 177 | with target_file.open(mode="w", encoding="utf-8", newline="\n") as fh_out: 178 | fh_out.write(cont) 179 | -------------------------------------------------------------------------------- /scripts/ebook/step_6_test.py: -------------------------------------------------------------------------------- 1 | # ruff: noqa: INP001 S101 D103 2 | # cspell:disable 3 | 4 | """Unit Tests.""" 5 | # ruff: noqa: S101 6 | 7 | import sys 8 | from pathlib import Path 9 | 10 | import pytest 11 | from step_6 import fix_ellipsis 12 | 13 | sys.path.append(str(Path(__file__).resolve().parent.parent)) 14 | from check_chapters_settings import settings 15 | 16 | LANG = settings["lang"] 17 | 18 | if LANG == "EN": 19 | 20 | @pytest.mark.parametrize( 21 | ("text", "expected"), 22 | [ 23 | # quotations 24 | ("foo…”", "foo…”"), 25 | ("“…foo", "“…foo"), 26 | # html 27 | ("foo…

", "foo…

"), 28 | ("

…foo", "

…foo"), 29 | # between 2 words 30 | ("foo…bar", "foo… bar"), 31 | ("foo …bar", "foo… bar"), 32 | ("foo … bar", "foo… bar"), 33 | ("foo… bar", "foo… bar"), 34 | # start of sentence 35 | ("foo.…bar", "foo. …bar"), 36 | ("foo!…bar", "foo! …bar"), 37 | ("foo?…bar", "foo? …bar"), 38 | # end of sentence 39 | ("foo…. bar", "foo…. bar"), 40 | ("foo…! bar", "foo…! bar"), 41 | ("foo…? bar", "foo…? bar"), 42 | # emph 43 | ("foo…bar", "foo… bar"), 44 | ("foo…bar", "foo… bar"), 45 | ], 46 | ) 47 | def test_fix_ellipsis_en(text: str, expected: str) -> None: 48 | assert fix_ellipsis(text) == expected 49 | -------------------------------------------------------------------------------- /scripts/ebook/step_7.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # based on work by yeKcim 4 | # https://github.com/yeKcim/hpmor/tree/master/ebook 5 | 6 | echo === 7. HTML -\> epub,mobi, doc === 7 | 8 | script_dir=$(dirname $0) 9 | cd $script_dir/../.. 10 | 11 | source_file="hpmor.html" 12 | target_file="hpmor.epub" 13 | 14 | # echo ==== 7.1a pandoc: html -\> epub==== 15 | # version 1. trying pandoc 16 | # pandoc --standalone --from=html $source_file -o $target_file --epub-cover-image="ebook/tmp/title.jpg" --epub-chapter-level=2 --epub-embed-font="fonts/automobile_contest/Automobile Contest.ttf" --epub-embed-font="fonts/graphe/Graphe_Alpha_alt.ttf" --epub-embed-font="fonts/Parseltongue/Parseltongue.ttf" --epub-embed-font="fonts/graphe/Graphe_Alpha_alt.ttf" --epub-embed-font="fonts/gabriele_bad_ah/gabriele-bad.ttf" -c "./ebook/pandoc.css" 17 | 18 | echo ==== 7.1b calibre: html -\> epub ==== 19 | # calibre is a bit better in ebook generation than pandoc and the result can be converted to mobi and docx 20 | ebook-convert $source_file $target_file --language de-DE --no-default-epub-cover --cover "tmp/title.jpg" --book-producer "Torben Menke" --level1-toc "//h:h1" --level2-toc "//h:h2" --level3-toc "//h:h3" 21 | 22 | source_file="hpmor.epub" 23 | echo ==== 7.2 calibre: epub -\> mobi ==== 24 | # note: fonts are not included for some strange reason, so not using special fonts for headlines, writtenNotes and McGonagallWhiteBoard any more in html.css 25 | target_file="hpmor.mobi" 26 | ebook-convert $source_file $target_file 27 | 28 | echo ==== 7.3 epub -\> docx ==== 29 | target_file="hpmor.docx" 30 | ebook-convert $source_file $target_file 31 | # pandoc --standalone $source_file -o $target_file 32 | 33 | echo ==== 7.4 epub -\> fb2 ==== 34 | target_file="hpmor.fb2" 35 | # ebook-convert does not support fb2 36 | pandoc --standalone $source_file -o $target_file 37 | -------------------------------------------------------------------------------- /scripts/ebook/step_8.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo === 8. HTML comparison with latest release === 4 | 5 | script_dir=$(dirname $0) 6 | cd $script_dir/../.. 7 | 8 | source_file="hpmor.html" 9 | target_file="hpmor-html-diff.log" 10 | 11 | echo ==== 8.1 downloading from latest release ==== 12 | wget --quiet https://github.com/entorb/hpmor-de/releases/latest/download/hpmor.html -O hpmor-prev.html 13 | # latest release https://github.com/entorb/hpmor-de/releases/latest/download/hpmor.html 14 | # WorkInProgress https://github.com/entorb/hpmor-de/releases/download/WorkInProgress/hpmor.html 15 | 16 | echo ==== 8.2 diff ==== 17 | diff -U 0 -s hpmor-prev.html $source_file >$target_file 18 | -------------------------------------------------------------------------------- /scripts/ebook/v1/2_html2epub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # by Torben Menke https://entorb.net 4 | 5 | # run from within ebook dir via 6 | # ./2_html2epub.sh 7 | 8 | mkdir -p tmp 9 | 10 | echo 1. extract titlepage from PDF 11 | cp ../hpmor.pdf tmp/ 12 | 13 | # 1.2 extract title page from PDF and convert to jpeg 14 | # 1.2a via imagemagick 15 | # sudo apt install imagemagick 16 | # convert -density 150 tmp/hpmor.pdf[0] -quality 75 tmp/title-en.jpg 17 | # imagemagick complains: 18 | # attempt to perform an operation not allowed by the security policy 19 | 20 | # 1.2b via ghostscript 21 | gs -dSAFER -r600 -sDEVICE=pngalpha -dFirstPage=1 -dLastPage=1 -o tmp/title-en.png tmp/hpmor.pdf 22 | # now imagemagick can be used for converting to the proper size 23 | convert -density 150 tmp/title-en.png -resize 1186x1186\> -quality 75 tmp/title-en.jpg 24 | 25 | echo 2. convert html to epub 26 | # use calibre instead of pandoc, as pandoc looses the css style 27 | # see https://manual.calibre-ebook.com/generated/en/ebook-convert.html 28 | # linux: sudo apt install calibre 29 | # windows: obtain from https://calibre-ebook.com/download_windows 30 | echo 2.1 calibre: html to epub 31 | ebook-convert output/hpmor.html output/hpmor.epub --no-default-epub-cover --cover tmp/title-en.jpg --authors "Eliezer Yudkowsky" --title "Harry Potter and the Methods of Rationality" --book-producer "Torben Menke" --pubdate 2015-03-14 --language en-US 32 | 33 | echo 2.2 calibre: epub to mobi 34 | ebook-convert output/hpmor.epub output/hpmor.mobi 35 | -------------------------------------------------------------------------------- /scripts/install_requirements_ebook.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(cd $(dirname $0) && pwd) 5 | cd $script_dir/.. 6 | 7 | sudo apt-get install texlive-extra-utils pandoc calibre imagemagick ghostscript 8 | # pandoc calibre : for ebook converting 9 | # texlive-extra-utils : for latexpand 10 | # imagemagick ghostscript : for pdf title page to image conversion 11 | 12 | pip install -r python-requirements.txt 13 | -------------------------------------------------------------------------------- /scripts/install_requirements_pdf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(cd $(dirname $0) && pwd) 5 | cd $script_dir/.. 6 | 7 | sudo apt-get install texlive-xetex texlive-lang-greek texlive-lang-german latexmk 8 | -------------------------------------------------------------------------------- /scripts/make_6_pdfs.cmd: -------------------------------------------------------------------------------- 1 | rem change to hpmor root dir 2 | cd.. 3 | 4 | start /B "" latexmk hpmor-1 5 | start /B "" latexmk hpmor-2 6 | start /B "" latexmk hpmor-3 7 | start /B "" latexmk hpmor-4 8 | start /B "" latexmk hpmor-5 9 | start /B "" latexmk hpmor-6 10 | -------------------------------------------------------------------------------- /scripts/make_ebooks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(dirname $0) 5 | cd $script_dir/.. 6 | 7 | # TODO: 8 | # image on last page 9 | 10 | sh scripts/ebook/step_1.sh 11 | sh scripts/ebook/step_2.sh 12 | python3 scripts/ebook/step_3.py 13 | python3 scripts/ebook/step_4.py 14 | sh scripts/ebook/step_5.sh 15 | python3 scripts/ebook/step_6.py 16 | sh scripts/ebook/step_7.sh 17 | echo optionally run scripts/ebook/step_8.sh to compare HTML to latest release 18 | 19 | # rm -rf hpmor-epub*.tex 20 | # rm -rf hpmor-epub*.html 21 | # rm -rf ebook/tmp/title.png 22 | 23 | # # TODO 24 | # # cd ebook 25 | # # ./1_latex2html.py && ./2_html2epub.sh 26 | 27 | # rm -f hpmor_epub.tex hpmor_flatten.tex 28 | -------------------------------------------------------------------------------- /scripts/make_pdf-1-vol.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(dirname $0) 5 | cd $script_dir/.. 6 | 7 | latexmk hpmor 8 | -------------------------------------------------------------------------------- /scripts/make_pdf-6-vol.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(dirname $0) 5 | cd $script_dir/.. 6 | 7 | latexmk hpmor-1 & 8 | latexmk hpmor-2 & 9 | latexmk hpmor-3 & 10 | latexmk hpmor-4 & 11 | latexmk hpmor-5 & 12 | latexmk hpmor-6 & 13 | -------------------------------------------------------------------------------- /scripts/make_pdf-all.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # ensure we are in the hpmor root dir 4 | script_dir=$(dirname $0) 5 | cd $script_dir/.. 6 | 7 | # first full pdf 8 | latexmk hpmor 9 | # second parallel building for 6 volumes 10 | latexmk hpmor-1 & 11 | latexmk hpmor-2 & 12 | latexmk hpmor-3 & 13 | latexmk hpmor-4 & 14 | latexmk hpmor-5 & 15 | latexmk hpmor-6 & 16 | 17 | # # make all 18 | # latexmk 19 | -------------------------------------------------------------------------------- /spelling-list.txt: -------------------------------------------------------------------------------- 1 | Acromantula 2 | Albus 3 | Animagus 4 | Apparate 5 | Arithmancy 6 | Arsenius 7 | Auror 8 | Aurors 9 | Avada 10 | Azkaban 11 | Baba 12 | Baconian 13 | Bafflesnaffle 14 | Baggins 15 | Batman’s 16 | Bayes’s 17 | Binns 18 | Blotts 19 | bogies 20 | buzzings 21 | capper 22 | Chudley 23 | Cialdini’s 24 | Comed 25 | Confundus 26 | consequentialism 27 | Cornelion 28 | Darley’s 29 | Darth 30 | deasil 31 | Dementor 32 | Diagon 33 | Draco 34 | Draco’s 35 | drayage 36 | Dumbledore 37 | Dumbledore’s 38 | Dursley 39 | emplaced 40 | erectus 41 | Escher 42 | Feynman 43 | Figg 44 | Filius 45 | Flitwick 46 | Floo 47 | Flubber 48 | Flubberwalt 49 | Ghostbusters 50 | Gillyweed 51 | Godric 52 | Godric’s 53 | Goyle 54 | grad 55 | Granger’s 56 | Gringotts 57 | Griphook 58 | Griphook’s 59 | Gryffindor 60 | Gryffindors 61 | Gryffindor’s 62 | Hagrid 63 | Harry’d 64 | Helga 65 | Herbology 66 | Hermione’s 67 | Hogwarts 68 | Hooch 69 | Hufflepuff 70 | Hufflepuffs 71 | Ignotus 72 | Imperio 73 | Imperius 74 | Incantato 75 | incuriosity 76 | Kazuma’s 77 | Kedavra 78 | Knut 79 | Knuts 80 | Latané 81 | Lehrer 82 | Lestrange 83 | Leviosa 84 | Lived’s 85 | Longbottom 86 | Lovegood 87 | Lovegood’s 88 | magics 89 | Malfoy 90 | Malfoys 91 | Malfoy’s 92 | Malkin 93 | Malkin’s 94 | McGonagall 95 | McGonagall’s 96 | Minerva’s 97 | Moke 98 | mokeskin 99 | mudblood 100 | Muggle 101 | Muggleborn 102 | Muggleborns 103 | Muggles 104 | Mungo’s 105 | Obliviate 106 | Obliviated 107 | Obliviating 108 | Obliviation 109 | okane 110 | olds 111 | Ollivander’s 112 | omake 113 | Padma 114 | Patil 115 | Percival 116 | Peverell 117 | polymorph 118 | Pomfrey 119 | pranking 120 | Quidditch 121 | Quirinus 122 | Quirrell 123 | Quirrell’s 124 | Ravenclaw 125 | Ravenclaws 126 | sapiens 127 | Scourgify 128 | Severus 129 | Severus’s 130 | Silencio 131 | Sinistra 132 | Slytherin 133 | Slytherins 134 | Slytherin’s 135 | Snape 136 | Snape’s 137 | Spimster 138 | teleported 139 | there’re 140 | thingy 141 | Trelawney 142 | unbraced 143 | undead 144 | unitarity 145 | Ventriliquo 146 | Veritaserum 147 | Verres 148 | Verres’s 149 | Voldemort 150 | waifish 151 | wandless 152 | Weasley 153 | whatever’s 154 | why’d 155 | why’s 156 | Wibble 157 | widdershins 158 | Wingardium 159 | witchy 160 | wizarding 161 | Wizengamot 162 | Wulfric 163 | Yaga 164 | Yermy 165 | Zabini 166 | minutiæ 167 | unblockable 168 | Hufflepuff’s 169 | Ernie’s 170 | boggart 171 | Flitwick’s 172 | Mugwump 173 | Théoden 174 | Balrogs 175 | rejoinder 176 | Thestral 177 | Alohomora 178 | Bludgers 179 | skepticism 180 | Boromir 181 | skeptical 182 | Legilimency 183 | Remembrall 184 | Goyle’s 185 | Protego 186 | Apparated 187 | unforgiveable 188 | Cruciatus 189 | Crucioed 190 | Fawkes’s 191 | huzzah 192 | shalt 193 | wizardkind 194 | Legilimens 195 | Occlumency 196 | hm 197 | Amycus 198 | Carrow 199 | Pensieve 200 | mudbloods 201 | purebloods 202 | clingings 203 | whoever’d 204 | Weasleys 205 | Frigideiro 206 | Trelawney’s 207 | Blondlot 208 | Blondlot’s 209 | raters 210 | Skeeter 211 | Lucius’s 212 | pureblood 213 | Dobby 214 | wizardkind’s 215 | Dementors 216 | uncastable 217 | Expelliarmus 218 | Incantatem 219 | Lumos 220 | Numbcloth 221 | Ravenclaw’s 222 | unworkability 223 | Mendelian 224 | ribosomes 225 | Hogsmeade 226 | wizardborn 227 | Ginevra 228 | troublingly 229 | Polyjuice 230 | scrying 231 | Entwhistle’s 232 | Ginny 233 | unguessable 234 | Occlumens 235 | furcot 236 | pillock 237 | Bellatrix 238 | Longbottoms 239 | Hogwarts’s 240 | Sloper 241 | Azkaban’s 242 | Cho 243 | Lesath 244 | Lesath’s 245 | unenchanted 246 | Drexler 247 | nanofactory 248 | fullerene 249 | Diricawl 250 | paperclip 251 | der 252 | Waals 253 | Patronus 254 | Sybill 255 | Voldemort’s 256 | horcrux 257 | Alissa 258 | Cornfoot’s 259 | Alissa’s 260 | Cornfoot 261 | Morag 262 | Pettigrew’s 263 | Animagi 264 | Veritas 265 | Oculum 266 | portkey 267 | dodgeball 268 | Leanne 269 | Everto 270 | Metamorphmagus 271 | Flobberworms 272 | Finnigan 273 | Nott 274 | Chaotics 275 | Coote 276 | Sunnies 277 | Somnium 278 | Contego 279 | Fletchley’s 280 | Cthulhu 281 | Justin’s 282 | Luminos 283 | Parvati 284 | Fletchley 285 | Tacticus 286 | Zabini’s 287 | Ollivander 288 | Grinch 289 | Procopius 290 | OWLs 291 | NEWTs 292 | Incendio 293 | Entwhistle 294 | Parselmouth 295 | Dracos 296 | Newcomb’s 297 | grindylows 298 | merfolk 299 | Greengrass 300 | Weasley’s 301 | fuddy 302 | duddy 303 | Prismatis 304 | Sonorus 305 | Padma’s 306 | Longbottom’s 307 | Zabini’d 308 | susurration 309 | deus 310 | machina 311 | Grindelwald 312 | fasces 313 | Imperiuses 314 | Blaise’s 315 | Humean 316 | projectivism 317 | Grindelwald’s 318 | owling 319 | Grangers 320 | Apparating 321 | ossifrage 322 | Dementor’s 323 | Patronuses 324 | Wibble’s 325 | knockdown 326 | negentropy 327 | Mum’d 328 | Millicent 329 | Bulstrode 330 | Daphne’s 331 | Millicent’s 332 | Hestia 333 | Remus 334 | Lupin’s 335 | Remus’s 336 | Expecto 337 | Patronum 338 | wandwork 339 | unseeable 340 | Accio 341 | cetera 342 | Imperiused 343 | Confunded 344 | Legilimized 345 | Gregory’s 346 | lightless 347 | ophidarium 348 | Parkinsons 349 | Montagues 350 | saddos 351 | Padmas 352 | Narcissa 353 | Macnair 354 | Parseltongue 355 | Parselmouths 356 | Diracawl 357 | Azathoth 358 | whickering 359 | Thestrals 360 | priors 361 | Rubeus 362 | Confunding 363 | Hagrid’s 364 | self’s 365 | learnable 366 | Dementation 367 | centeredness 368 | Parvati’s 369 | Aguamenti 370 | Bester’s 371 | Polyjuiced 372 | Polyjuicing 373 | Imperviused 374 | faceful 375 | bodilessly 376 | Bellatrix’s 377 | Black’s 378 | Lestranges 379 | Auror’s 380 | blockable 381 | portkeys 382 | Confund 383 | Scrimgeour 384 | Shacklebolt 385 | level’s 386 | Azkabans 387 | murderess’s 388 | Emmeline 389 | Emmeline’s 390 | Bartemius 391 | alienness 392 | domitable 393 | indomitability 394 | trickable 395 | substanceless 396 | unbreakability 397 | Maximus 398 | Bartemy 399 | portkey’s 400 | Fiendfyre 401 | Albus’s 402 | Flamel 403 | uncushioned 404 | Unspeakables 405 | Bones’s 406 | wizardborns 407 | Alastor 408 | Minas 409 | Tirith 410 | Bree 411 | Weathertop 412 | owled 413 | Crucio 414 | Lestrange’s 415 | liberated 416 | Veela 417 | fallbacks 418 | Milgram 419 | Milgram’s 420 | Hermiones 421 | Beauxbatons 422 | Gobstones 423 | supermajority 424 | Bilbo’s 425 | Elrond 426 | Mordor 427 | Glorfindel 428 | Glóin 429 | Gimli 430 | skeptically 431 | Bilbo 432 | Sauron 433 | Númenor 434 | Isildur 435 | Isildur’s 436 | Aragorn 437 | Gollum 438 | Legolas 439 | spasmed 440 | counterstroke 441 | fanfiction 442 | Erdős 443 | fanfic 444 | Pomfrey’s 445 | snakish 446 | Diggory 447 | Bludger 448 | Lethifolds 449 | happenstance 450 | younglings 451 | Contegos 452 | ween 453 | Durmstrang 454 | Flooed 455 | Nymphadora 456 | Tonks 457 | Mugwumps 458 | Alecto 459 | rediscoverer 460 | wibble 461 | Inferi 462 | why’re 463 | not’ve 464 | Rianne 465 | Felthorne 466 | Lagann 467 | Glisseo 468 | Lethifold 469 | Katarina 470 | Sprout’s 471 | Acromantulas 472 | Jugson 473 | Cluthe 474 | Jugson’s 475 | Tonare 476 | Ravum 477 | Calvaria 478 | Lucis 479 | Gladius 480 | adamantium 481 | Belka 482 | Supergirl 483 | Astorga 484 | unidentifiability 485 | revelio 486 | chipper 487 | Astorga’s 488 | Quirinus’s 489 | angsty 490 | Belka’s 491 | Felthorne’s 492 | golems 493 | Mohandas 494 | Colloportus 495 | splendoured 496 | Twix 497 | Omnioculars 498 | Goyles 499 | Crabbes 500 | unfocusing 501 | DMLE 502 | bint 503 | Densaugeo 504 | mudblood’s 505 | scriptum 506 | offs 507 | Komodo 508 | Butnaru’s 509 | Butnaru 510 | Goryanof 511 | Goryanof’s 512 | Komodo’s 513 | Deligitor 514 | prodi 515 | Polyfluis 516 | Reverso 517 | MacDougal 518 | Pavlovian 519 | unwarmed 520 | Wizengamot’s 521 | Umbridge 522 | Gawain 523 | maned 524 | rictus 525 | Kinnison 526 | magisterium 527 | Voldie’s 528 | Aberforth 529 | What’ll 530 | Alastor’s 531 | unanchored 532 | Danegeld 533 | Tetlock’s 534 | curvily 535 | afterburn 536 | Robards 537 | Asch’s 538 | Asch 539 | se 540 | Brocklehurst 541 | incongruent 542 | reputational 543 | Szilard 544 | Rabi 545 | Polaris 546 | Penrose 547 | Firenze 548 | Smullyan 549 | lich’s 550 | QED 551 | moirail 552 | auspisticing 553 | Chloe’s 554 | emeraldine 555 | Floo’s 556 | Gilderoy 557 | Voldie 558 | Sagitta 559 | Magica 560 | unseeably 561 | taser 562 | Stuporfy 563 | retargeting 564 | Nurmengard 565 | Regulus 566 | Monroe’s 567 | Reducto 568 | spell’s 569 | hedonic 570 | hols 571 | Glowpox 572 | Critch’s 573 | hedonics 574 | s’pose 575 | mothership 576 | Flamel’s 577 | what’ve 578 | Filch’s 579 | Argus’s 580 | how’ll 581 | Incendium 582 | Clearwater’s 583 | sourceless 584 | Diffindo 585 | crossguard 586 | nihil 587 | supernum 588 | Ventus 589 | unregenerating 590 | uncaringly 591 | emotionlessly 592 | Inferius 593 | emotionlessness 594 | Obliviators 595 | Evans’s 596 | lich 597 | Legilimizing 598 | bearability 599 | Rowling’s 600 | Dumbledores 601 | unaged 602 | Peverell’s 603 | hobbyhorse 604 | Beauxbatons’s 605 | Greengrasses 606 | Brodski 607 | Carrow’s 608 | Alicorn 609 | alicorn’s 610 | Krait 611 | Obliviations 612 | Vanishment 613 | magicless 614 | Greengrass’s 615 | Silvanus 616 | Ashwinders 617 | Ashwinder 618 | unfound 619 | Quaffle 620 | Schelling 621 | Nullus 622 | confundio 623 | Legilimize 624 | synchronies 625 | horcruxes 626 | tripsigns 627 | Hermione 628 | Inflammare 629 | boggart’s 630 | horcruxed 631 | portkeying 632 | Cadmus’s 633 | Metamorphmagi 634 | Yaga’s 635 | Perenelle 636 | Perenelle’s 637 | dribs 638 | drabs 639 | Patil’s 640 | Firewhiskey 641 | Mundungus 642 | Mao’s 643 | Crouch’s 644 | Samwise 645 | Rabastan 646 | Rabastan’s 647 | crikey 648 | Atlanteans 649 | relative’s 650 | arguendo 651 | strawman 652 | Aberforth’s 653 | Hallow’s 654 | Chang’s 655 | wandlessly 656 | slippable 657 | twere 658 | Diffindos 659 | Sinistra’s 660 | knobbed 661 | Grindie 662 | Grindie’s 663 | foretellings 664 | Pettigrew 665 | portkeyed 666 | healings 667 | Voldemorts 668 | strangelets 669 | Pratchett 670 | savviness 671 | cosying 672 | alicorn 673 | merman 674 | offed 675 | heroing 676 | Outstandings 677 | rooftop’s 678 | compatibilist 679 | Rowling 680 | fanfics 681 | Vinge’s 682 | Eliezer 683 | Yudkowsky 684 | pæan 685 | phœnix’s 686 | phœnix 687 | æons 688 | manœuvre 689 | --------------------------------------------------------------------------------