1. Manual

TEXTALLION [tɛkstaljɔ̃] n.m. — (2009  ; from text, and unknown suffix -llion, probably animal origin or meaning the 1st person plural. Can be written as textallion or TeXtallion.)

Word processor system using txt2tags wiki markup, allowing you edit your document's plain text source in whatever editor you prefer, allowing you to to stay focused on your writing at the keyboard rather than clicking around in a GUI. Textallion produces attractively formatted output files, including PDF, HTML and/or ePUB.

Citation:

« I send you a .t2t file as attachment, never tell me again you don't own the right piece of software to open it! »
William Grumbold, librarian

1.1. Background

The textallion project was created because of our desire for beautifully formatted LaTeX output, combined with our love for the simplicity of txt2tags.

LaTeX is perfect for writing complex scientific works, but it can be frustrating to use if you just want to quickly start writing normal prose with it, and its syntax can be intrusive and complex.

The goal of textallion is to use txt2tags as a preprocessor, keeping the document source in its non-distracting markup syntax, while wlso being able to easily export out to LaTeX, html and ePUB. While txt2tags on its own can already export to LaTeX, there is little control of the output.

Textallion enables you to publish on traditional paper and PDF (pdf example), web page (as with this current page, or this one using the slidy presentation format), or ebook (ePUB example), from a single plain text source file (source for all the previous documents).

By default, textallion will have all that is needed for writing simple and nice-looking texts, from articles through to books, including novels:

Bold, italic, underligned, striked letters, colored text, page numbering, top header with title and separating line, bullet lists and numbered lists, image includes, support for footnotes, table of content.

It also includes a CYOA (choose-your-own-adventure) creation system.

Note: This project was originally named "txt2tex".

1.2. Getting TeXtallion

The latest version can be found there: http://code.google.com/p/textallion/downloads/list

There is also a mirror located there.

Older versions can be retrieved from http://anamnese.online.fr/site2/textallion/

1.2.1. Optional packages

You can automate your document processing with 'GNU make' adapting the included example makefile, and enable further postscript processing with tools such as pstopdf, psutils (pdfnup, psbook) and pdfjam.

1.3. Prerequisites

TeXtallion has been tested on these operating systems:

1.3.1. Linux

LaTeX and python 2 must be installed on your computer. Most distributions, if not all, have this by default.

For example Archlinux, Mandriva and Debian have TeXlive

Running the textallion_install.sh script from a root shell will copy everything needed into /usr/share/textallion/, or your folder of choice.

1.3.2. Windows

Python must be installed on your computer. Choose version 2.x (for example python 2.7) because textallion is not compatible with Python 3.

1.3.3. *BSD

Basically the same as Linux, except you have to type gmake instead of make, as the makefile is using GNU make.

Texlive is not officially supported by FreeBSD, please use teTeX instead.

1.3.4. Mac OS X

Mac compatibility is not yet tested ; feel free to try the BSD instructions and the macports system, and report the results back to us.

1.4. Files

The files textallion.t2t and textallion.sty are the source template and the LaTeX style files ; normally, you shouldn't have to modify thm. To get started with a new document, create a plain text file with the Text2tags file extension of .t2t, e.g. my_file.t2t, and copy the header from the sample_en.t2t into it up to the line:

Then copy sample.sty to a new file with the same name (my_file.sty) and modify it as you like. The sample.css file is for the html target output, and is also used in the creation of ePUB format e-books.

The next step is to write your content in the source text file, modifying its overall formatting (margins, header, etc.) by editing the style file. You can easily alter the size of paper, the size and name of the font, the size of the displayed text, thereby setting implicitly defined margins. The syntax, which is quite easy to use, is described below.

1.5. Document Processing

On Windows, have a look at textallion.bat in the contrib directory. You may need to modify the paths in this script, which starts out assuming textallion was installed in C:\temp\textallion\

Also update these paths to match your system's installation of the prerequisite packages:

On Linux, you can use the textallion.sh script to process your document ; modify the makefile, starting with the line DOCUMENT = sample_en to match your document name and target output format.

1.6. Markup Syntax

The general systax is the one of txt2tags, and we added our own.

1.6.1. Txt2tags Markup

A short reminder of the syntax:

1.6.2. Additions

Extra symbols

We added those symbols. They are made with 4 signs between braces (curly brackets):

Description symbol code
first quarter moon
{ )) }
full moon
{ () }
last quarter moon
{ (( }
sun
{(  )}

You may also enter these symbols directly into the source if you wish, but they might be too tiny to read in some plain text editors. You can't enter unicode symbols if you want to publish to pdf because this LaTeX version doesn't use unicode, unless you adjust the preprocessor in your document - remember almost anything is possible using txt2tags! Some ePUB readers also can't read those symbols, so they are replaced by stars * during the ePUB export. They do show up properly in html output.

For getting a m-dash (French conversation for examples), you can type three -, or just enter a real m-dash character —.

Footnotes

Footnotes are enabled by wrap the note text in °° - see the example below and the source code of this document for further examples. You can access this symbol on qwerty keyboards with alt gr + 0 on Linux and alt+248 on windows.

It's also possible to create footnotes with this symbol: { °° }.* (In keeping with the other standard markup in textallion.)

The LaTeX version will use numbered footnotes, while the html version will use a star (*) to indicate the footnote.

It's also possible to add a number between brackets for the html export with something like this:

  This is a text with an associated footnote°°This is the note.(1)°°.

which will convert into:

This is a text with an associated footnote1 (This is the note.).

Linebreaks and non-breaking space

Page Break

You can get a page break with {/…}.

Exponent

We use ^^ or { ^^ } to surround the part to be used as exponent. For example 2^^nd^^ or 24^^5^^.

Image size

You can specify the image size between brackets:

for example: [path_to/my_image.png][24]

(10)

(20)

(30)

The number represents millimeters for LaTeX output, and % of the page width in html - I couldn't do better at the moment.

1.6.3. Table of Contents and Index

A TOC is generated automatically by txt2tags. Use the %%toc command anywhere in your document to place it. Otherwise, by default, it will be at the beginning of your content area.

Use of an Index is optional. To activate it, uncomment the \usepackage{makeidx} and \makeindex into your .sty file. Use the command %%index where you want to place this index.

Index entries are made with {^} surrounding the word to be indexed. To use an alternative name for the indexed word, you can write for example {^}apple{^fruit}.

1.6.4. Links

If you prefer writing [description URL] for your links rather than the txt2tags syntax: [description URL], it will automatically be converted by textallion.

Homepage of txt2tags

1.6.5. Adding sounds and musics

Especially useful for the CYOA module (see below), it's possible to add music with this syntax: [musique.ogg], which will add a HTML5 player in the browser. Only the free and open format ogg/vorbis is supported, because contrary to mp3, it is directly compatible in most browsers: Firefox, Chrome, Opera.

Music example:

You can do the same for ogg/theora or webm videos, using the .ogv or .webm extension instead: [video.ogv]

Video example: (downloaded from an external website):

1.6.6. Text size

1.6.7. Italic or bold area

TODO Native txt2tags syntax cannot format a block of several paragraphs italic or bold. This will be implemented with { // } and {/// }.

Also with bolding blocks of text: { ** } and {/** }.

1.6.8. Epigraphs

Epigraphs (quotations beginning a chapter) are written using {  ~~} at the beginning of the sentence, and {/ ~~} at the end. You can add the author at the end.

This way:

{  ~~} The inner fire is the most important thing mankind possesses.
{/ ~~}Edith Södergran

deviendra :

The inner fire is the most important thing mankind possesses.
Edith Södergran

1.6.9. Colors

You can color text by using @@COLOR@@name of the color@@Text to colorize@@/COLOR@@.

The basic color names are :

black blue brown cyan darkgray gray green lightgray lime magenta olive orange pink purple red teal violet white yellow

You can also use those colors, which are compatible with LaTeX and HTML (svg colors) :

AliceBlue AntiqueWhite Aqua Aquamarine Azure Beige Bisque Black BlanchedAlmond Blue BlueViolet Brown BurlyWood CadetBlue Chartreuse Chocolate Coral CornflowerBlue Cornsilk Crimson Cyan DarkBlue DarkCyan DarkGoldenrod DarkGray DarkGreen DarkGrey DarkKhaki DarkMagenta DarkOliveGreen DarkOrange DarkOrchid DarkRed DarkSalmon DarkSeaGreen DarkSlateBlue DarkSlateGray DarkSlateGrey DarkTurquoise DarkViolet DeepPink DeepSkyBlue DimGray DimGrey DodgerBlue FireBrick FloralWhite ForestGreen Fuchsia Gainsboro GhostWhite Gold Goldenrod Gray Green GreenYellow Grey Honeydew HotPink IndianRed Indigo Ivory Khaki Lavender LavenderBlush LawnGreen LemonChiffon LightBlue LightCoral LightCyan LightGoldenrod LightGoldenrodYellow LightGray LightGreen LightGrey LightPink LightSalmon LightSeaGreen LightSkyBlue LightSlateBlue LightSlateGray LightSlateGrey LightSteelBlue LightYellow Lime LimeGreen Linen Magenta Maroon MediumAquamarine MediumBlue MediumOrchid MediumPurple MediumSeaGreen MediumSlateBlue MediumSpringGreen MediumTurquoise MediumVioletRed MidnightBlue MintCream MistyRose Moccasin NavajoWhite Navy NavyBlue OldLace Olive OliveDrab Orange OrangeRed Orchid PaleGoldenrod PaleGreen PaleTurquoise PaleVioletRed PapayaWhip PeachPuff Peru Pink Plum PowderBlue Purple Red RosyBrown RoyalBlue SaddleBrown Salmon SandyBrown SeaGreen Seashell Sienna Silver SkyBlue SlateBlue SlateGray SlateGrey Snow SpringGreen SteelBlue Tan Teal Thistle Tomato Turquoise Violet VioletRed Wheat White WhiteSmoke Yellow YellowGreen

You can also specify the color with html code instead of the name, such as #6D7D2E, which will display: Here is my nice text in green. LaTeX won't be able to display this color, it will be replaced by gray.

1.6.10. Centering text

You can center some text (LaTex only) with a leading |

centered text

or by surrounding a paragraph with {->--} and {-<--}:


A nice haiku
Well centered poetic text
It is what we're looking for

or with @@begin((center))** et @@end((center))**


A nice haiku
A complicated method
It's only for TeX lovers

1.6.11. Columns

You can use the {|n|} symbol for setting text in n columns, n being a value between 0 and 4. You can close the area with the same syntax but with n=0 or n=1.

1.6.12. Tables

Tables are supported by txt2tags. But because in the LaTeX (pdf) export, tables won't be displayed when they reach the end of a page, we use the longtable package instead of tabular. If you don't like this, add this in the header of your document:

  %!postproc(tex): 'longtable' 'tabular'``.

In the case your tables has so many columns that it will print outside the width of the page, use this trick to wrap long texts, for example if your table has 4 columns:

  %!postproc(tex): '\{\|l\|l\|l\|l\|\}' {|p{3cm}|p{3cm}|p{3cm}|p{3cm}|}

(we must escape the { and | symbols when using *proc in txt2tags)

If your document has only one table, it will be ok. You can also customise the width of each column. If it has more tables and you wish to use different widths, you can use a second trick:

add extra spaces at the beginning of one of the colum, like this:

  | left | left | left |   right |

so this table will be unique to the document and you can use this now:

  %!postproc(tex): '\{\|l\|l\|l\|r\|\}' {|p{2cm}|p{3cm}|p{5cm}|p{3cm}|}

Reminder: tables are aligned like this:

  | Lorem ipsum dolor | sit amet, consectetur | adipiscing elit. Donec a diam lectus. |
  | left align |    right align |  center align  |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.
left align right align center align
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus.
left align right align center align

1.6.13. LaTeX code

You can add any arbitrary LaTeX code by replacing the "\" with @@ and the "{" and "}" with (( and )). If you want to include your LaTeX codes in the html output, surround them with the txt2tags syntax for verbatim (three ```) or the new tagged format (three '''). If you prefer to exclude these codes from the html output, just indicate the end of the code with two stars **.

The source code of this document will gave you more examples on how to add more latex options in your text. For example this mathematic formula won't appear in the html version:

The verbatim version:

  \begin{displaymath}
  \frac{a}{b} + \sqrt[n]{abcd}
  \end{displaymath}

A simple box:

@@Ovalbox((Example of text in the box))

This last example will appear odd (on purpose) in the html version because there is no ** at the end of this special command.

Footnote examples:

We can include footnotes this way (version with replacing code)

Beware, these footnotes won't appear in the html version

It's better to use this simpler form for keeping notes in the html version* (This note will be kept in the html version of the document)

LaTeX equations

Use { $$ } on both sides ; works for PDF export only. For html, you can copy and paste the code via http://www.codecogs.com/latex/eqneditor.php

inline : \delta = 3 \times \sum X_i^2, ainsi que 4 - \sqrt X

block : \delta = 3 \times \sum X_i^2

1.6.14. Example unix code

If you need to include some letters already found in the txt2tags code (such as the pipe |), you can prevent their execution by surrounding them with double quote ("")

find . -print | cpio -o -H newc | gzip -9 > ../initrd.gz

1.7. XeTeX rendering

Use make xetex instead of make pdf. It allows to use unicode characters in the source, for example:

⚠ The xetex template doesn't have a cover.

1.8. Letters module

Not available yet for the English Language (but should be fairly easy to adapt to other languages)

1.9. Gamebooks module

See the documentation in the textallion_cyoa_en file

2. Sample texts

see examples.html for a few texts examples.

3. Useful resources

3.1. Similar products

4. License and credits


All textallion code and hacks are released under the BSD license

  Copyright (c) 2008-2012, Eric Forgeot. 
  All rights reserved.
  
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE, DATA, OR PROFITS ; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


All personal artwork and documentation, if applicable, are licensed under the CC-BY-SA license.


You can contact me about Textallion:


Textallion uses txt2tags as a backend. Txt2tags is covered by the GNU GPL.


Credit is due to:

5. Changelog

The release filenames are in the form: textallion_year-month-day_artistname.zip. If some additions are made during the same month, there won't be a full release with a new artist's name, but the update's filename will show a new date, for example: textallion_2010-08-13_chasseriau.zip and then textallion_2010-08-15_chasseriau.zip

6. Todo and known bugs

6.1. Syntax, backend and docs

6.2. HTML

6.3. PDF (LaTeX and XeTeX)

6.4. Windows

6.5. txt2cyoa