Tibetan Formatting LibreOffice Extension

From Digital Tibetan
Jump to: navigation, search

Introduction

[1] An LibreOffice extension for rin chen spungs shad handling an justification of text.

The Tibetan formatting LibreOffice Extension supports two tasks for Tibetan processing in LibreOffice:

  • Left/Right justification for Windows computers. (Linux versions of LibreOffice don't need an extra tool, justification works as expected with Tibetan, see Formatting rules for Tibetan text.)
  • Automatic application of rin chen spungs chad insertion. Especially for longer texts this can save a lot of time when formatting texts.
[2] Installation via LibreOffice's extension manager.

Download and installation

  • Preparations: Make sure you have followed: LibreOffice / OpenOffice configuration for Tibetan script support.
  • Download: The extension can be downloaded here: TibFormat.oxt
  • Installation: In LibreOffice choose Tools / Extension Manager. See image [2].
    • Click Add and select the file you have downloaded. You do not need to unzip the file.
    • Restart LibreOffice. After restarting LibreOffice, you will see a new menu in LibreOffice, "Tibetan". See image [1].

Uninstallation

  • To uninstall TibetanFormatter go to Tools / Extension Manager. Under My Extensions select TibetanFormatter and click Remove.
    • Restart LibreOffice.
[3]Left-right justification option for Tibetan in Linux LibreOffice

Description

Right / left justification of Tibetan text (Mac & Linux)

Note: right / left justification for Tibetan for LibreOffice for Mac and Linux works well without the extension:

  • Select a passage of Tibetan text and then select "Format / Paragraph / Alignment / Justified". Additionally tick "Expand single words". See image [3].

Right / left justification of Tibetan text (Windows)

Tibetan.png
This section contains Tibetan script. Without proper Tibetan rendering support configured, you may see other symbols instead of Tibetan script.
[4] Compressing characters to avoid ugly white spaces on justification.
  • Select a passage of Tibetan text and then select "Format / Paragraph / Alignment / Justified".
  • Select "Tibetan / Insert Justification Characters". This will insert a zero-length space character after each tsheg. LibreOffice for Windows cannot "Expand single words" for Tibetan, but it can expand zero-length characters.
  • Tip: Left/right justification, especially when using the Windows extension, and after using the automatic rin chen spungs chad insertion, might lead to ugly spaces after tshegs. In many cases this effect can be reduced by slightly compressing all characters by 0,1 to 0,2 pt using the LibreOffice command "Format / Character / Position / Condensed" option. See image [4].

Automatic insertion of rin chen spungs chad (Mac, Linux & Windows)

  • The option "Tibetan / Apply rinchen spungs shad" automatically searches the selected paragraphs for shad characters that need to be changed into rin chen spungs chad . Especially for longer texts this can save a lot of time when changing and formatting texts.
  • See Formatting rules for Tibetan text for a documentation when rin chen spungs chad is needed.
  • The function "Tibetan / Apply rinchen spungs shad" also automatically corrects illegal line breaks and shad at beginning of lines.

Corrections of invalid line breaks

LibreOffice seems to incorrectly break Tibtan syllables in the middle on some platforms. Running the "Tibetan / Apply rinchen spungs shad" function fixes the incorrect line breaks.

Restrictions and known issues

  • Important: we recommend at this stage not to use the function "Tibetan / Justify & Apply Rinchen Spungs Shad", but do all formatting in two steps:
    • "Tibetan / Insert Justification Characters",
    • "Tibetan / Apply Rinchen Spungs Shad". It is currently faster and more reliable this way.
  • "Tibetan / Insert Justification Characters" is faster if applied to the whole document.
  • Please note that OOo handles large paragraphs very badly and it slows down all operation. If you have very long texts without paragraph breaks, it is recommended to insert paragraph breaks at line ends every 10-20 pages. This will significantly speed up LibreOffice in general and the Tibetan Formatting extensions.

Change log

Version 1.1.502 beta (2011-Jun-09)

  • Extension is now in OXT format and supports also LibreOffice and OpenOffice >=3.3. The extension should now work with all versions of OpenOffice >=3.0.1

Version 1.1.5 beta

  • Rinchen Spungs Shad replaced also after ga and ka. This can be changed by editing a flag, in the macro. A dialog will be implemented in the future.

Version 1.1.2 beta

  • There was an infinite number of combination of cases, exceptions and developing mistakes... Another bug was fixed, and now (as always) hopefully it will be stable and well functioning at all times in all texts.

Version 1.1.1 beta

  • More bugs that made the extension unstable were fixed. Still some instability might be experienced. We welcome all feedbacks.
  • More menu points and new options are implemented. Please see the function description above for more details.

Version 1.1.0 beta

  • Some important bugs were fixed, so that it is more stable now. Rinchen spungs shad are correctly (not)replaced also after ka and ga.
  • Bigger flexibility in supporting multiple spaces as well as different shad alignments.

Version 1.0.2 beta

  • An add on version is implemented. A 'Tibetan' menu appears between the 'Tools' and 'Window' menus.
  • Display Unicode Character code dialog changed.

Future versions

version 1.2 - usability improvement

  • add progress bar/cancel button when macro running
  • change menu to have following options:
    • run formatter;
    • undo formatter;
    • read unicode character;
    • set formatting options
    • help - online help / about TibetanFormatter
  • formating options dialog:
    • inset justification characters
    • insert rinchen spungs shad
    • replacemants
    • insert virtual paragraphs
  • to allow manual changes - implement correct discrimination between manual and automatic formatings

version 2

  • replacement of formatting characters that are frequently mistyped (non-breaking spaces between two shad for example)
  • simple grammar check (no shad after ka or ga for example)

Credits & Acknowledgements

  • The extension was developed by Eszter Hoffmann, Rigpa IT.
  • Some code from Andrew Pitonyak was used. Thanks for the useful collection of guides and examples.
  • Thanks to the members of the OpenOffice.org Forum, with so many helpful posts.

Internal links

External links