Japanese can be formatted either with horizontal lines of text and pages progressing from left to right or with vertical lines of text and pages progressing from right to left. Some formatted documents mix the two. Different types of publication are predominately one writing mode or the other: for example, government documentation and educational materials both predominately use horizontal text, whereas novels predominately use vertical text.
For both writing modes, the page area is typically centered on the page media and has proportions similar to the proportions of the media. The best line length is around 52 characters per line for vertical text and around 40 characters per line for horizontal text.
In Japanese text composition, it is common to set the width of the page area in fullwidth characters. Using em for the width
property in the @page
rule sets the width in characters. Setting the left and right margin values to auto aligns the page area in the center of the page.
@page { size: A4; width: 43em; /* set width of page area to 43 em */ margin-top: 30mm; margin-bottom: 30mm; margin-left: auto; /* position page area in the center of the page */ margin-right: auto; }