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:
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.
The latest version can be found there: https://textallion.sourceforge.io
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.
Textallion has been tested on these operating systems:
LaTeX and python 3 must be installed on your computer. Most distributions, if not all, have this by default.
For example Archlinux, Mandriva and Debian have TeXlive
(under Debian run: apt-get install python3 texlive-base texlive-latex-base texlive-extra-utils texlive-latex-recommended texlive-latex-extra texlive-fonts-extra texlive-lang-french latexml tipa texlive-fonts-recommended texlive-xetex tidy calibre wkhtmltopdf)
Running the textallion_install.sh
script from a root shell will copy everything needed into /usr/share/textallion/, or your folder of choice.
You can get the textallion_setup.exe
installer from: https://bitbucket.org/farvardin/textallion/downloads
Python must be installed on your computer. Choose either version 3.x or 2.x, textallion should be compatible with both, but python 3 is now the default.
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.
Mac compatibility is not yet tested ; feel free to try the BSD instructions and the macports system, and report the results back to us.
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.
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.
make html
to generate an html page.
make slidy
to generate an html presentation.
make pdf
to generate a LaTeX document and then a pdf file. If the compilation goes well, you won't see any errors, and the output will end with "entering extended mode".
make pdfsmall
for making a document with 2 pages in one using pdfjam - linking is disabled in the output, good for hard copy printing only.
make booklet
for making a recto-verso leaflet via psutils, links will also be disabled and the column alignment seems to need some adjustment.
make epub
to create an ePUB format e-book file from the html file, using the free program calibre. You can also use Sigil for reformatting your ePUB document.
make clean
to clean the folder of temporary files.
make cleanall
to clean the folder of temporary files, and erase all the generated .tex and .pdf files ; prompts for confirmation first.
make configuration-update
when updating your textallion package. This uses a diff tool such as meld, to compare the configuration files of your project (makefile, css & sty) with the updated source files and help you update them if necessary.
make website
to create a "master index" page for making your html, pdf and ePUB files output files available on line, including generating a qr-code for scanning the URL into a phone.
make all
for making html and pdf, and cleaning temporary files.
If you are working on multiple documents at the same time, you can also type export TEXTALLIONDOC=your_document_name && make pdf
(without the .t2t at the end of your_document_name) and the program will use this environment variable so you don't have to modify the makefile.
The general systax is the one of txt2tags, and we added our own.
A short reminder of the syntax:
[image.jpg]
[link to a website http://www.homepage.com]
: link to a website
We added those symbols. They are made with 4 signs between braces (curly brackets):
{*~~~}
before the first letter of the word.
*-*-
or {*-*-}
{-@- }
- this adds a little leaf {-/@-}
: {** *}
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 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.).
{//..}
, or the simplified version //..
.
If you want to copy and paste texts from the internet or another source, you may find it tedious to keep inserting the special line break marks (*-*-
). Just enable this command:
%!postproc: "$" '{//..}'
¯
symbol.
You can get a page break with {/…}
.
We use ^^
or { ^^ }
to surround the part to be used as exponent. For example 2^^nd^^ or 24^^5^^.
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.
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}
.
If you prefer writing [description URL] for your links rather than the txt2tags syntax: [description URL], it will automatically be converted by textallion.
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):
{ ++ }
and ending with {/++ }
.
{ -- }
and ending with {/-- }
.
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 {/** }
.
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:
deviendra :
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.
You can center some text (LaTex only) with a leading |
centered text |
or by surrounding a paragraph with {->--} and {-<--}:
or with @@begin((center))** et @@end((center))**
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.
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
and tabu
packages instead of tabular
. If you don't like this, add this in the header of your document:
%!postproc(tex): 'longtable' 'tabular'``
%!postproc(tex): 'longtabu' 'tabular'``
In the case your tables has so many columns that it might print outside the width of the page, tabu
should handle this correctly, but if you use only longtable
, you can 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:
| left align | left align | left align |
| left align | right align | left 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 |
| 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 |
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.
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)
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
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 |
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.
Not available yet for the English Language (but should be fairly easy to adapt to other languages)
See the documentation in the textallion_cyoa_en file
see examples.html for a few texts examples.
All textallion code and hacks are released under the BSD license
Copyright (c) 2008-2020, Éric 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:
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
- 18 mai 2020:
- updated installation script - adding more free audio/video formats - use .desktop with the installer - use tabu instead of longtable for the tables - CYOA: adding templates for inform7, twee - CYOA: new target: Inkle (Ink syntax) - CYOA: new target: Dialog (can render to zcode, html and C64) - now default txt2tags version is for python3 - change mercurial repository from Bitbucket to Sourceforge
- updated ms windows installer
make xetex
).