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.sf.net/site.css). % % Saw that first lines on 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.sf.net/config.t2t) and the "includeconf" % command reads it. % %!includeconf: 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 spash image %!postproc: '(download-v25.png")' '\1 class="splashimg"' % Fills the "PHP" tooltip on "About this site". See config.t2t for details. %!postproc: {tooltip1} Two exceptions: Txt2tags Online and User Comments are PHP files because they need 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: menu.t2t % And here's our first heading, level 2 (see the two equal signs) %%% Section disabled for some time %== Latest news == % The recent news are on a separated file also (handy huh?) %%!include: headlines.t2t % DOWNLOAD banner [[img/download-v25.png] download.html] | [img/cake.png] | [7 years of txt2tags! http://txt2tags.wordpress.com/2008/07/26/7-years-of-txt2tags/] == About txt2tags == Txt2tags is a document generator. It reads a text file with minimal markup as ``**bold**`` and ``//italic//`` and converts it to the following formats: - HTML - XHTML - SGML - LaTeX - Lout - Man page - Wikipedia (**NEW**) - Google Code Wiki (**NEW**) - DokuWiki (**NEW**) - MoinMoin - MagicPoint - PageMaker - Plain text - [Read more... features.html] - Try it now! [Txt2tags Online online.php] % Saw how lists are simple? The "Read more" is a link. % % Now follows a definition list. The leading spaces are optional. : Author: [Aurelio Jargas http://aurelio.net/soft/]