The Way to Mastery of<br/>Lorem Ipsum Or, How To Write and Publish a Book Terran Publishing Test Edition The Book What Is a Book

This example book is written to give readers the example of the Book Language.

What Qualifies as a Book

Under the book typesetting system, a Book is a collection of texts typesetted for an improved legibility, enumerable pages, with insertion of other helpful resources such as illustrations and hyperlinks.

Books are considered as bound and always presented in two pages for reading.

Writing a Book Using a Typewriter

Typewriter allows quick scribbling of the words in convenient manners, just click on them and get writing!

But it comes with big downsides: you cannot type in multiple writing systems, cannot have defined chapters and sections, cannot include any illustrations, no hyperlinks, and of course, ragged texts.

Typed papers are considered as non-bound and only one page at a time will be presented.

All in all, you cannot write a true Book using a typewriter.

Writing a Book with Publishers and Printing Presses

Professional-looking texts, with all the benefits of a real Book can be made, or even mass-produced easily with the help of publishers.

To have your precious texts to be printed, you must send your manuscripts to a publisher, and the manuscript must be written in a special language: the .

allows concise description of the entire shape of your book, any style the book typesetting system can support can be described and printing presses will produce the papers accordingly. You can even try to mimic the look and feel of papers created using a typewriter, if you want to.

The Introduction

(pronounced as /biːtɛk/) is a markup language based on XML, with a resemblance of the . abstracts away the meticulous styling and typesetting configurations, so you can focus on actually writing your texts than debugging the macros. This does come with a downside of not being able to change the given style.

document is divided up to five parts: the Style Declaration, the Cover, the Table of Contents, the Manuscript, and the Index Page, of which the Style Declaration and the Manuscript are the mandatory parts.

The Style Declaration

The Style Declaration is the very first line of a document. Its syntax is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE btexdoc SYSTEM "btexdoc.dtd">
<btexdoc cover="hardcover" inner="standard" papersize="standard">

The btexdoc tag takes following attributes:

The Cover

The Cover defines the text on the cover of the book. If your text has no cover, this part can be omitted. Its syntax is as follows:

<cover hue="358">
  <title>Title of your book&zwsp;</title>
  <subtitle>Subtitle if necessary&zwsp;</subtitle>
  <author>Who wrote this book&zwsp;</author>
  <edition>Edition information if necessary&zwsp;</edition>
</cover>

Only the title tag is mandatory. Cover texts will be printed using a special font that has wider gaps between characters. The title text will be printed in a double-size.

The cover can have different colour with the hue attribute, which takes a number between 0 and 360.

The Table of Contents

The contents of the Table of Contents is filled in automatically by reading through your manuscript; parts, chapters and sections will be added. Its syntax is as follows:

<tocpage title="Custom page name if necessary">&zwsp;<tableofcontents/>&zwsp;</tocpage>

The optional title attribute allows a custom name can be given to this page. If unspecified, the default name is “Table of Contents”.

The tag <tableofcontents/> is an internal tag used by the typesetter.

The Manuscript

This is the part where you actually write your body texts in. The body text can have the following tags:

Self-closing tags have no child tags. To use a self-closing tag, simply do <tagname/>.

Heading Styling

The part, chapter and section takes optional type attributes which changes how the chapter should be numbered. Available options are:

By default, parts use majuscule Roman numerals and others use Arabic. Alternative styling for the part and the chapter can be defined using the Macro Definition.

Paragraph Styling

The p and callout tags can take align attribute, which controls how the text should be aligned. Available options are:

The p, span and callout tags also take class="code" attribute, which results in the text printed using the code font.

Hyperlinking

Hyperlinks can be defined using index and a tags.

Figures

Figures, or external images can be inserted using the self-closing img tag. This tag inserts the image at the centre of the page, starting from the current line; if the size is taller than the remaining lines, the image will be printed onto the next page. Its syntax is as follows:

<img src="http(s) or file URL" height="8"/>
<img fromgame="basegame:gui/small.png" height="4"/>

The height attribute specifies the height of the image in the number of lines, rather than pixels, the width is calculated automatically; image width wider than the text width will cause an error. The tag optionally takes caption attribute which prints a text below the image.

Supported image formats: JPEG, PNG, BMP or TGA

The Index Page

The contents of the Index Page is filled in automatically by reading through your manuscript. All the usage of index tags will be shown here. Its syntax is as follows:

<indexpage title="Custom page name if necessary">&zwsp;<tableofindices/>&zwsp;</indexpage>

The optional title attribute allows a custom name can be given to this page. If unspecified, the default name is “Index”.

The tag <tableofindices/> is an internal tag used by the typesetter.

Ending the Document

The document must begin with the opening btexdoc tag, and therefore must end with a matching closing tag. Simply write away </btexdoc> and the document is finished.

Conclusion

The finished book description using can be sent to a publisher, and if there are no errors on your submission, the printed books of specified number of copies will be delivered to your location within a reasonable amount of business days. Happy writing!

Advanced Macros The Macro Definition

This part explains the set of macros the typesetting system uses, and how you can manipulate them to introduce a limited set of customisations.

Macros can be defined using the macrodef tag which comes before the cover tag. Its syntax is as follows:

<macrodef>
  <pair key="macro name" value="the value"/>
  <pair key="another macro" value="its value"/>
</macrodef>
Macro Keys

Internally, part and chapter headings are printed using macros. Changing the value of the macro will change how the heading numbers are printed. The following is a list of names and default values:

The argument key %1$s will be replaced into a number, Roman numerals, etc. depending on the value of type attribute.

These macros can be used to localise the chapter headings for your language. For example, in Korean text, the following idiomatic definition will be useful:

<macrodef>
  <pair key="thepart" value="제%1$s부"/>
  <pair key="parttype" value="1"/>
  <pair key="thechapter" value="%1$s장"/>
</macrodef>
Printing External Variables

Defining the text to be printed outside the typesetting system, such as the name of the sender and the recipient, can be desired. These texts can be used with the self-closing v tag. This tag can also be used to use an ingame string as well.

To print an external variable, use the id attribute; to print an ingame string, use fromgame attribute. Note that only one of two attributes must be used, using both attributes in a single tag will cause an error.

Printing the Ingame Currency

In order to print a text such as “The total is 1234”, the bucks tag can be used along with the v tag. The following code is an example case:

<p>The total is <bucks><v id="invoice_total_amount"/></bucks></p>

If the external variable invoice_total_amount contains a string toomany, this code would print out “The total is toomany”.

Korean Language Specific Tags

To accommodate the Korean Postposition transformations, special v series tags are added:

Either of the tag in the pair can be used; they will put the correct postposition based on the word. In other words, veun and vneun are identical.

These tags can be used in the following situation: suppose you have a document,

[en] Send your <v fromgame="GAME_ITEM_HOLOTAPE"/> that contains the manuscript to the publisher via mail to have your books printed.
[koKR] 원고가 담긴 <veul fromgame="GAME_ITEM_HOLOTAPE"/> 출판사로 우편을 통해 보내야 책이 인쇄됩니다.

The variables will be resolved based on the current ingame language, then the necessary linguistic processing is performed, which would result in a following paragraph (text in blue denotes the text is inserted using the tags):

[en] Send your Holotape that contains the manuscript to the publisher via mail to have your books printed.
[koKR] 원고가 담긴 홀로테이프를 출판사로 우편을 통해 보내야 책이 인쇄됩니다.
Non-laymen Zone Why Wait for the Books to be Printed? Why Can’t I just Print Them by Myself?

The engine is not fast; it takes at least a few seconds to print a book. The “waiting” system is there because the book is being printed in the background on separate threads (yes, they are multi-threaded!) to not interfere with the normal gameplay, or else the players will encounter the freezing every time the book is being printed, and this would be a huge minus towards the gameplay experience.

If the process exits without any error, the mailing system will be notified and will send the mail containing finished books to the player; if the process exits with errors, the mail containing details of the errors will be sent instead.

For this reason, the “printing press” is not exposed to the player, they only get to interact with it indirectly through the “publisher” via mail.

this page is intentionally left blank