Skip to content

start:

Grid Layout for CJK in Writer



Intro

East Asian countries, esp. Japan, are traditionally used to having a fixed number of characters per page. Example: 20 characters by 20 lines on a DINA4 page.

We need adequate page setup formatting to accomplish this goal.

Please note: The tab page introduced below will only be visible/active once “Tools - Options - Language Settings - Languages - Asian Language Support” is enabled.

New Tab Page for Page Setup

  1. This new tab page allows one to turn on a grid and define its layout.

(Note: If “No grid” is selected, all other controls are inactive)

Back to top

Grid

  • No grid: No grid is active, no changes to existing version

  • Grid (lines only): The page is set up with a defined number of lines (see also “Lines”) and characters are only snapped to this line(s).

  • Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line (see also “Lines” and “Characters”). Characters are always snapped to grid.

Back to top

Grid Layout

  • Lines per page: x (1-max.): Number of lines on page (only active if grid is selected). The maximum of lines is calculated out of set font size, set Ruby font size and grid size .
    Maximum for this control is value based on printable paragraph area divided by 2 pt. sized base and Ruby text.
    Default value is based on printable paragraph area divided by default Ruby and base text size.

  • Characters per line: x (1-max.): Number of characters on line (only active if grid is selected). The maximum of characters is calculated out of set font size, and grid size.
    Maximum for this control is value based on printable paragraph area divided by 2 pt. sized base and Ruby text.
    Default value is based on printable paragraph area divided by default Ruby and base text size.

  • Base text size: Size of base text, changes dynamically once lines per page/characters per line is changed (and vice versa).
    Default value is based on applied style (font size).
    Note: Any change on default value will be same as hard formatting!

  • Ruby text size: Size of Ruby text, changes dynamically once lines per page/characters per line is changed (and vice versa).
    Default value is based on applied style (font size).
    Note: Any change on default value will be same as hard formatting!

  • Ruby text below/left from base text: If active grid line for Ruby text is placed underneath (horizontal text layout)/left (vertical text layout) ordinary text grid.

Back to top

Grid Display

  • Display grid: Makes grid lines visible. If off, following option is inactive.

  • Print grid: The grid lines will be printed. Inactive if “Display grid” is inactive.

  • Grid colour: Select colour of grid lines (default: Automatic, same colour as text boundaries)

Back to top

Special Behaviour

Default Layout

When using default values for number of lines, characters and page margins the grid will basically look like this:

Please note that the grid always(!) produces square cells, never rectangle ones like Word!

Back to top

User Defined Layout

Once the user chooses a lesser amount of lines per page and/or characters per line the grid layout will shrink.

It will always aligned centred to its printable area.

E.g. less lines but maximum of characters per line in horizontal mode will shrink from top and bottom alike.

Example 2: Less characters per line though will have an inverse effect. Since all cells have to be square by definition not only width but also height of cells is affected. Thus less lines per page will be displayed.

This has to be taken into account also in UI. Once the characters per line are decreased, automatically amount of lines per page has to be decreased accordingly!

Back to top

Selective Font Size Changes

Even if it hardly makes any sense from a layout perspective, one can actually mark parts of text (or single characters) to change their attributes, like size.

Changing the fonts size to a smaller layout doesn't matter but sizing will!

In the figure below the blue was resized from 24 pt. to 60 pt.

A shift by x cells (depending on its new size) in text direction is accomplished plus x empty lines. This is necessary since the symbol is not only growing in its vertical (alt: horizontal) direction but also in its horizontal (alt: vertical).

Back to top

Western Text

As seen in figures above, Western text will be spread over x cells (as many as the text will need to be displayed) and will, once a locale change back to Asian input happens, be aligned centred in cells.

Back to top

Alignment

Alignment must be turned off, since it does not make any sense in grid layout.

Back to top

Columns

Columns are turned of once text grid is active (as vice versa).

Back to top

Object “Snapping”/Rename Tools - Options Tab Page

Objects like graphics, OLE, bitmaps and the like will stay where they are positioned and will not “snap” to document grid. If this function is needed, one must turn on “Tools - Options - Text Document - Grid”

Furthermore, we need to re-name those entries on the “Tools - Options - Text Document - Grid” tab page!

Re-name matrix:

Old name (English)

New name (English)

Old name (German)

New name (German)

Grid

Object Grid

Raster

Objekt Raster

Snap to grid

Snap objects to grid



Back to top

Ruby Text

If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself. In this case empty grid cells have to be inserted until Ruby Text fits.

See example figure below.

Most important:

If Ruby Text is wider than its Base Text and aligned 1-2-1 or 0-1-0 the whole construct (Base and Ruby Text) should align centred within the needed grid cells to avoid an uneven text flow.

Furthermore it is possible to have Ruby-Text below resp. left from text. This will put the Ruby space below/left instead of above/right from the base text grid line.

Back to top

Punctuation

While East Asian characters always occupy a full grid cell centred punctuation characters such as full stop are more likely to align themselves.

Thus those characters that carry alignment information are to be handled the like, e.g. a full stop will always align to it's former character instead of centred alignment in grid cell.

Back to top

Terminology Matrix (English - German)

English Term

German Term

Text Grid

Textraster

Grid

Raster

No grid

Kein Raster

Grid (lines only)

Raster (nur Linien)

Grid (lines and characters)

Raster (Linien und Zeichen)

Grid layout

Raster Layout

Lines per page

Zeilen pro Seite

Characters per line

Zeichen pro Zeile

Base text size

Basistextgröße

Ruby text size

Ruby-Textgröße

Ruby text below/left from base text

Ruby-Text unter/links vom Basistext

Grid display

Rasterdarstellung

Display grid

Raster anzeigen

Print grid

Raster ausdrucken

Grid colour

Rasterfarbe

Back to top

MS Word Compatibility

Since MS word has a different layout approach for text grids a 100% im/export filter capability is not achievable. We will try to depict as many features/formatting as possible and do a transition into StarOffice/StarSuite Writer design.

It was decided to implement a rather useful and comprehensive grid layout into Writer than to copycat Microsoft Word for the sake of compatibility!

Back to top