I’ve been messing about with typesetting Buddhist Sutras in Japanese, inspired by @RoseWagsBlue and her scholarly and typesetting projects. What started as a fix for one file has become a collection of LaTeX code that makes typesetting your favorite Japanese text easy. I hope so anyway.
Here is the project in its latest stage. I’d love feedback, bug reports, comments, etc.
In isolation this code does not mean much, it is just a way I found to rotate a single little page with a line of kanji.
Also, you need clever ways to rotate the character “–”, (ichi) which appears quite frequently. I seem to recall some documentation for xeCJK that is in Chinese, but can be deciphered with effort.
Also, there are a few other \LaTeX heads here.
I used this to rotate ichis. Where there is an ichi in your doc, you just use the command \stick. I don’t know how I came up with the 0.75em hspace. Maybe I should document better!
Oh is that what the stick command is for… It makes lots of sense now. I’ll use it!
So far I think multicol works really well. And now that I figured out how to add chunks of text all at once, the job of typesetting has become easy. One can easily change column numbers and font sizes to get the spacings right.
Nice ichis, dude!
Actually, your documents look real sharp how they are set up.
If you need a challenge, you could use some code to set the desired number of characters in each column, and the code would calculate the right size of text so that it would fit.
Actually, what I will do soon is use the Styles to lay out a few pages, and then suggest some new features. I never wrote a Style or a Package, so I am now envious.
I have always intended to make a little package for making multifolded booklets with Japanese and English text. I have a nice system for putting them together, but I just want to make a final reproducible version of it.
Scroll down a little on that thread and you will see the finished and bound result. Another user even bound one too!
Should it be centered? Was that the function of the 0.75 em (I took that out and fiddled around with position parameters to not much avail)? Is there any way to use your \stick command to push the uchi arbitrary distances to the left?
As for packages and such, I have never really built one before. I am trying to stick to ideas of modular design and not repeating myself, but beyond that I am making things up as I go, so any ideas or strategic advice would be appreciated. I think the next step should be to organize the already burgeoning code. I think examples can be shortened, moved aside and automated as a next step. And then finally the whole things should probably be rewritten as a LaTeX .sty file I imagine. That will be a fun thing to figure out how to do!
Thank goodness! I couldn’t sleep worrying about those uncentered ichis. I will look at the code a bit. Maybe this will push me to finally write my own package of some kind.
…
Now I have looked though the .sty code. Simple, nice, functional. I like. Good work!
Also, you took enough care to fix things like turning a しゅ to a しゅう in my sloppy work.
Thanks for the kind words! I redid the \haiku \compactVerse and \spacedVerse commands to make them easier to use. You don’t need a comma separated list of characters any more but can enter a string, with the possibility of grouping them as well like so {ab}.
I have a quicker way to do this. You just use \raggedcolumns attached to the \RLmulticolumns – that allows for variable length columns. Then you use an individual \haiku{} group for each coulumn’s set, separated by \columnbreak
This is the famous Basho haiku about the frog and the pond. The last two characters are his name kanji, so they are typeset to appear side by side, with a dot before and after.
You have inspired me to work on a style for my books of 四字熟語. Somewhat backwardsly, I can never get LaTeX typesetting to work on my linux laptop, but I have no problem on my windows desktop. But my back gets sore in front of that computer, so that limits my time working on it (which is good, I suppose).
For your code, I would like to see you further abstract the whole process. In other words, instead of a renewcommand, the command would accept more options and variables. You have abstracted much of it already.
I am going to go log into my other computer and send myself some documents, so that I can work on this computer! I really need to get LaTeX set up right on this.
Well good for you and I look forward to seeing those books!
Just so you know, I modularized things so now it should be easy add new texts. So far I have files in the /texts subdirectory with titles such as four-vows-compact.tex or heart-sutra-tracing.tex that are basically pre-formatted chunks of text that can be inserted into a document with a simple input{../texts/heart-sutra-compact} command.
Things are improving! And if you have more texts to contribute, with or without readings, have a look in the /texts folder for what they look like.
Linux and LaTeX play together just fine on my laptop! For what it’s worth, I installed LaTeX in this machine in a stripped down way to avoid the bloat that I used to have with it (Linux MInt 20 xfce version on a Lenovo Y700). This time I around I installed it via RStudio (used for other projects), and in particular using the rstudio tinytex package. It is trimmed down but also installs things in a way that I don’t need to be root to install new packages as needed. Other than that it is just occasional tlmgr install package when I need things,
I need to apologize. I am such a total doofus.
I some how got this thing about rotating ichis. And I have sometimes seen text with them rotated.
But they are not usually rotated, and they certainly don’t need to be.
I was corrected here on WK, and then looked through some books.
I don’t know how I ever got the idea in my head. But I am glad I have fixed it.
In the meanwhile, I have spread my faulty knowledge on to you.
I am so sorry for that. But it can all be fixed.
Haha, thanks for letting me know! I had no idea about them being a beginning Japanese reader, but figured, sure why not, maybe there is a taboo about covering things with sticks in Japan. It’s a simple fix – find and replace \stick with 一. Now I just have to issue a recall and second edition notice to all of the myriads of people who downloaded the whole heart sutra and were happily tracing it out, vertical lines and all
This is a lesson about how something totally wrong can get stuck in a person’s head. I cannot now remember how I picked the idea up. And yet, in any text I read, the ichis are clearly horizontal. You have my deepest apologies for passing this wrong information on to you.