txt2tags ONE source, MULTI targets %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Welcome to the sources of the txt2tags site % % This is a live example of a marked up file in the txt2tags format. % There are some special tricks you can learn by reading. % As you may be wondering, lines starting with % are ignored. % % Txt2tags generates the HTML code for this text, and all the page % formatting (colors, sizes, fonts, blocks, position) is made on an % external CSS file (http://txt2tags.org/inc/site.css). % % See those first lines at the top? They are the page heading. % % Now comes some special configuration directives, starting with %! % % The config used by all pages are centralized on this file % (http://txt2tags.org/inc/config.t2t) and the "includeconf" % command reads it. % %!includeconf: inc/config.t2t %%% Some post processing filter magic (search & replace) % Adds an ID to the tag % Note: the (?i) makes the pattern case insensitive (avoids headaches) %!postproc: '(?i)( tag %!postproc: '(?i)()' \1\n % Adds class name to the splash image %!postproc: '(download-v\d+.png")' '\1 class="splashimg"' % Fills the "PHP" tooltip on "About this site". See config.t2t for details. %!postproc: {tooltip1} One exception: Txt2tags Online is a PHP file, because it needs to be interactive. % meta: keywords %!postproc: () \n\1 % meta: description %!postproc: () \n\1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% All the config is made, so the real contents begins now % The sidebar with the menu links are on a separated file, included now %!include: inc/menu.t2t % DOWNLOAD banner and (deactivated) birthday cake [[img/download-v26.png] download.html] % | [img/cake.png] | [7 years of txt2tags! http://txt2tags.wordpress.com/2008/07/26/7-years-of-txt2tags/] % And here's our first heading, level 2 (see the two equal signs) == About txt2tags == Txt2tags is a document generator. It reads a text file with minimal markup such as ``**bold**`` and ``//italic//`` and converts it to the following formats: - HTML - XHTML - SGML - DocBook (**NEW**) - LaTeX - Lout - Man page - Creole (**NEW**) - Wikipedia / MediaWiki - Google Code Wiki - PmWiki (**NEW**) - DokuWiki - MoinMoin - MagicPoint - PageMaker - AsciiDoc (**NEW**) - ASCII Art (**NEW**) - Plain text - [Add your favorite! new-target.html] - Read more: [txt2tags features features.html] - Try it now: [txt2tags online online.php] - Get it: [download download.html] - Contribute: [txt2tags SVN http://svn.txt2tags.org] % See how lists are simple? % % Now follows a definition list. The leading spaces are optional. : Author: [Aurelio Jargas http://aurelio.net/soft/] [@aureliojargas http://twitter.com/aureliojargas] : Keywords: free, tool, convert, text, [markup markup.html], simple, [Linux download.html], [Mac download.html], [Windows download.html], [GUI img/gui.png], [CLI img/help.png], [Web {URLONLINE}], [Python http://python.org], [GPL http://directory.fsf.org/txt2tags.html] % Write the way you want. It will get right on the screen. % You got it, right? The markup is damn simple. == About this site == This site is 100% powered by txt2tags and [CSS inc/site.css]. No Javascript, CGI or [PHP #tooltip1], just plain static [valid {URLHTMLVALIDATOR}] HTML pages. You can read the text sources for each page, just click the "See sources" link on the footer. Reading them you will learn the markup instantly. % Tip for the source readers: % Change the .html by .t2t on the page address to read the sources % The footer is an external file %!include: inc/footer.t2t