Changes

Jump to navigation Jump to search
m
Explanation of the paperSize variable used in lua
==Meeting the JIS X 4051 Requirements for Japanese Text Layout==
The requirements are described actual standard was revised in 2004 and the latest version is JIS X 4051:2004. You can read it in Japanese here: https://kikakurui.com/x4/X4051-2004-02.html  The W3C technical note "Requirements for Japanese Text Layout", published on 4 June 2009, is based on JIS X 4051. This is also available in English: https://www.w3.org/TR/jlreq/
Following code is a work in progress. Its text layout output meets already some of the requirements (see comments in the code). Among the ones to still be implemented are:
* math https://www.w3.org/TR/jlreq/#fig2_7_6 and https://www.w3.org/TR/jlreq/#fig2_7_62
* tategaki (writing vertically)
 
When you read the lua code in the first <code>\directlua{}</code>, you should realize that the dimensions of almost all layout elements are depending on the value of my lua variable "paperSize".
Thanks to defining the paper size first in lua, I can apply calculations of numeric values.
 
The value of paperSize is later passed on to <code>\setuppapersize</code> via <code>\setuppapersize[\directlua{tex.print(paperSize)}]</code>
 
<texcode>
%Visual Debugging, to be commented out later:
12

edits

Navigation menu