Giter Site home page Giter Site logo

Building Riichi Book about riichibooks HOT 9 CLOSED

dainachiba avatar dainachiba commented on August 26, 2024
Building Riichi Book

from riichibooks.

Comments (9)

phoe avatar phoe commented on August 26, 2024

I have found the makepk.sh file from elsewhere, its contents are:

#!/bin/sh
progname='basename "$0"'
if [ $# = 0 ]; then
echo "usage: $progname mode_name"
echo "example: $progname CanonCX"
exit 1
fi
MODE=$1
MAGS='.5 .6 .7 .8 .9 1 magstep.5 magstep1 magstep2 magstep3 magstep4 magstep5'
for mag in $MAGS
do
mf "\mode=$MODE; mag=$mag; nonstopmode; input tsipa10"
done
MAGS='.5 .6 .7 .8 .9 magstep1 magstep3'
for mag in $MAGS
do
mf "\mode=$MODE; mag=$mag; nonstopmode;input cmr10"
done
for file in *gf
do
gftopk $file
done

I have built the files with it and added the folder into the ~/texmf directory; however, now building the book fails:

┌─[phoe][±][master U:2 ?:1 ✗][~/Projects/RiichiBooks]
└─▪ pdflatex RiichiBook1.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./RiichiBook1.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 4 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/book.cls
Document Class: book 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/bk10.clo))
Writing index file RiichiBook1.idx
(/home/emiherd/texmf/tex/latex/piemf-2.0.2/macros/pie2e.sty

! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.68 \let\yisuo\��
                  ��\let\ersuo\����\let\sansuo\����\let\sisuo\�ͺ�

It seems that the pie2e.sty file has some broken characters. Are they Japanese in some weird encoding? Do I need to reencode these files in UTF-8 to make them work?

from riichibooks.

phoe avatar phoe commented on August 26, 2024

It seems that LaTeX on my machine refuses to properly understand lines like the following:

\let\ersuo\二索

It seems to split the UTF-8 character into pieces, which results in garbage:

l.68 \let\ersuo\��
                  �索

from riichibooks.

dainachiba avatar dainachiba commented on August 26, 2024

Hi, yes, the encoding for pie2e.sty included in the piemf package is EUC. Please try following the procedures explained here:

http://yasuda.homeip.net/insomnia/2011/05/latex-mahjong-fonts-package-pi.html

Although this page is in Japanese, I'm hoping you could parse out the commands (in pink background). Let me know how it goes.

from riichibooks.

phoe avatar phoe commented on August 26, 2024

I am slowwwwwwwwly getting this to build with XeTeX since it assumes UTF-8 on everything and therefore is capable of swallowing pie2e.sty, but this causes some new issues.

Screenshot from 2019-10-01 15-23-17

I will be figuring this out in my spare time.

from riichibooks.

phoe avatar phoe commented on August 26, 2024

On which environment has the Riichi Book been built so far? Do you have any VM or container images that has the environment set up for buildling the book?

from riichibooks.

dainachiba avatar dainachiba commented on August 26, 2024

I have typeset the book using pTeX. It seems that pLaTeX also works. However, I'm afraid XeTeX won't work.

(When I was beginning to write a first draft of the book, I tried XeTeX and pTeX and decided on the latter for some reason.)

from riichibooks.

phoe avatar phoe commented on August 26, 2024

I have built the book using pLaTeX. I am currently struggling to generate the pie fonts and have them recognized by pTeX from the project directory (without installing them system-wide).

from riichibooks.

phoe avatar phoe commented on August 26, 2024

#7 should fix this.

If anyone has a Linux machine, please test it - clone the repository and attempt to build it by issuing the commands found in #7. It should build properly if texlive-full ptex2tex ptex-base ptex-jtex packages are installed on your machine; it's possible that a setup that doesn't include a full TeX installation will work, too.

from riichibooks.

dainachiba avatar dainachiba commented on August 26, 2024

Thank you very much for your work on this!

I don't have a Linux machine, but I happen to have access to a Mac machine on which I have never compiled any Japanese documents before. I downloaded the pie2e.sty, Upie.fd, pie.mf, and piemacro.mf and tried building the book. It works perfectly on my end.

from riichibooks.

Related Issues (6)

Recommend Projects

  • React photo React

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

  • Vue.js photo Vue.js

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

  • Typescript photo Typescript

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

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

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

Recommend Topics

  • javascript

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

  • web

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

  • server

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

  • Machine learning

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

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

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

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.