txt2tags h · hotspot 1: txt2tags3)⁄˙.mgp'⁄¥ƒ^xfree86 type1inœˇ d\˙”˛¡¨i...
TRANSCRIPT
txt2tags^r�H
�͵AurWlio Marinho Jargas <verde (at) aurelio.net>�ȵChris Leng <rookie999.ly (at) gmail.com>
8¹
'u�© 4
1�٠Уtxt2tags 5
1.1 1���U�¯K . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.1 txt2tags´�oº . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1.2 ��o¦^txt2tagsº . . . . . . . . . . . . . . . . . . . . . 6
1.1.3 ��uÙ¦óä§txt2tagsk=`:º . . . . . . . . . . . 6
1.1.4 ·I��dG¤íº . . . . . . . . . . . . . . . . . . . . . . 7
1.2 |±�©�(� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 |±�8I©��ª . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.4 8I©�(�|±�A . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.5 n«^r��µGUI!��Ú·-1 . . . . . . . . . . . . . . . . . 11
1.5.1 ÄuTk�ã/^r�� . . . . . . . . . . . . . . . . . . . . 12
1.5.2 3��ª . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.5.3 ·-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1�Ù XÛm©º 16
2.1 e1!SCPython . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 e1txt2tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3 SCtxt2tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.3.1 �Windows^r;����SC§S . . . . . . . . . . . . . 17
2.4 SC?6ì��{p�©� . . . . . . . . . . . . . . . . . . . . . . 17
1nÙ 1��©� 19
3.1 k|Ùì . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1
8¹ 2
3.2 ?�©�ÞÜ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.3 1�g=�))ã/.¡ö� . . . . . . . . . . . . . . . . . . . . . 20
3.4 1�g=�))·-1�ª . . . . . . . . . . . . . . . . . . . . . . 21
3.5 �w(J . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.6 ?�©�N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1o٠ݺtxt2tags�(� 24
4.1 ©����Ü© . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.1.1 ���«~ . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 ÞÜ� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 ��� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4 ÌN� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5 �½ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.6 ·-1À� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.7 ^r��©�£RC©�¤ . . . . . . . . . . . . . . . . . . . . . . . 28
4.8 ���`k?Ú\1^S . . . . . . . . . . . . . . . . . . . . . . . 29
4.9 %!include �- . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.10 %!includeconf �- . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
1Ê٠ݺIP 32
5.1 ÞÜ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.2 IK�?Ò�IK . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.3 ãá . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
5.4 5º . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5.5 oN§�N§ey�ÚíØ� . . . . . . . . . . . . . . . . . . . . . 35
5.6 �°iN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.7 ��Ú^1Ú��Ú^� . . . . . . . . . . . . . . . . . . . . . . . 36
5.8 �l1Úo�l1 . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.9 ó�Ú·¶ó� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.10 Ú^ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.11 �L§?Ò�LÚ½Â�L . . . . . . . . . . . . . . . . . . . . . . 39
5.12 ã¡ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8¹ 3
5.13 L� . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
5.14 �©©§�©1Ú�©� . . . . . . . . . . . . . . . . . . . . . . . 41
18Ù ÷ 43
6.1 %%date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
6.2 %%mtime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.3 %%infile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.4 %%outfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
6.5 %%toc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
1ÔÙ �½ 48
7.1 %!Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.2 %!Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3 %!Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.4 %!PreProc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
7.5 %!PostProc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.6 %!Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.7 �éA½�8I�ª?1�½ . . . . . . . . . . . . . . . . . . . . . 52
7.8 'uPreProcÚPostProcLÈì��[! . . . . . . . . . . . . . . 52
1lÙ ç { 54
8.1 ¦^%!PostProc�\õ1©�£'XCSS5K¤ . . . . . . . . . . . 54
8.2 ¦^%!PreProcMï/A½8Ia.0�SN . . . . . . . . . . . . 55
8.3 ¦^%!PreProcUCtxt2tagsIP . . . . . . . . . . . . . . . . . . . 55
1ÊÙ ^�{¤ 57
9.1 1999c1�µ¤c{¤ . . . . . . . . . . . . . . . . . . . . . . . . . 57
9.2 1999c6�µ�,´¤c{¤ . . . . . . . . . . . . . . . . . . . . . . 57
9.3 2000cl�µØ2´¤c{¤ . . . . . . . . . . . . . . . . . . . . 58
9.4 2001c5�µPythonzÚõ8I�ª��{ . . . . . . . . . . . . . . 59
9.5 2001c7�µ0.xX�µtxt2tags�?åD£úmuÙ¤ . . . . . . . . 59
9.6 2002c9�µ1.xX�µ¤� . . . . . . . . . . . . . . . . . . . . . . 60
9.7 2004�7�µ2.xX�µ¤Ù . . . . . . . . . . . . . . . . . . . . . . 60
'u�©
�©�âtxt2tags£�c���2.5¤�^r�H=©��È 5§Öö�Ï
L±e廼�^r�H�=©��µ
• ^r�H(���µhttp://txt2tags.sf.net/userguide
• ^r�H�PDF��µhttp://txt2tags.sf.net/userguide/userguide.pdf
�È©�ìM��^�½£Ý¶-�û�5¦^-�Ó�ª��¤3.0uÙ"
4
1�٠Уtxt2tags
�Ù�Vã§0�txt2tags§S�^åÚAÚ"
1.1 1���U�¯K
1.1.1 txt2tags´�oº
txt2tags´��©��ªzÚ=�óä§Uò�kA½IP�X©�©�
=��|±�?¿�«8I�ª§�)µ
• HTML©�
• XHTML©�
• SGML©�
• LaTeX ©�
• UnixÃþ�£man page¤
• MagicPointü«©v
• Wikipedia�Äz��¡
• Google Wiki �¡
• DokuWiki�¡
• MoinMoin�¡
• PageMaker 6.0 ©�
• X©�©�
5
1�٠УTXT2TAGS 6
1.1.2 ��o¦^txt2tagsº
\¬uytxt2tags�©k^§XJ\µ
• I�ò©�±ØÓ�ªuÙ
• I�±ØÓ�ª�o©���#
• >�Eâ©�½öÃþ
• I�^\ØÙG�,«�ª>�©�
• éu,«©��ª"���;��?6ì
• �^��{ü�©�?6ì�oÚ�#\�©�
���p<�?3uµ
• !��m§;5uSN§�m�ª
1.1.3 ��uÙ¦óä§txt2tagsk=`:º
©��Ö5Ð txt2tags�IP�~{ü§¦� ©�A�´g,�ó"
8I©��Ö5Ð � ©���§)¤�8I©��k ?Ú�á�1�
ݧ�Ö5Ð"
���IP txt2tags�IP´ÕA�§v±·A�«©� Ø�u�
©�SN�)· "
���5K z«IP�ÙéA�5K´��éA�§Ø�3/~
0½/AÏ�/0
(�{ü ¤k|±��ªÑ´{ü�§Ø�kN\À�½öE,
�?»"IP�´IP ®§vk?ÛÀ�"
´uÆS du{ü�IPÚ�Ö� ©�§txt2tags�ÆS��
~�/^rlÐ0"
¤��«~ ÃØ^txt2tags?�{ü�´E,�©�§�¹3^��
¥�«~©�Ñ�Ñ)Ä¢^�~f"
k^�óä �¹u^��¥��{5K©��Ï\�Ñvk�{�
Ø�©�£·^uvim, emacs, nanoÚkate¤"
n«^r�� ^Tk?��ã/��§�ø�§ÚSÜ�¦^����
�§±9�p?^rÚ��¦^�·-1��"
�e�. . .
1�٠УTXT2TAGS 7
�� k²��^rUÏL���·-1�ª?1gÄ?Ö§
±9é=���©�?1�?6"
e1!$1Úª²� txt2tags�´��{ü�Python ��§ÈI?È
½ e 1 � � � ¬§Ï d 3 � «*NIX! Linux!
WindowsÚMacintoshÌÅþþU�{$1"
�~�# ¹��e��Lk^rJø?�ÚU?"�ö�<3ó
�Ú�{�3¦^txt2tags§ÏdmuجÃ�ª�"
1.1.4 ·I��dG¤íº
�,ØI��
txt2tags3GPLN�yeuÙ§¿����¤"
1.2 |±�©�(�
±e�Ñtxt2tags|±�©�(�"
• ÞÜ£©�IK!�ö!FϤ
• Ù!IK£�k/Ø�?Ò¤
• ãá
• iN{z
– oN
– �N
– ey�
– íØ�
• �°iN£��Ú^¤
– ãáS��°iN
– �°�1
1�٠УTXT2TAGS 8
– �°�«�£õ1¤
• Ú^
• ó�
– URL/Internetó�
– e-mailó�
– �/ó�
– ·¶�ó�
• �L
– ±ÎÒÚ���L
– ?Ò��L
– ½Â�L
• Y²©��
• ã¡£�Uéà¤
• L�£�/Ø�>µ§�Uéà§�0B¤
• �é�©��AÏIP£Ø)Û¤
• é�cFÏ�AÏ÷½Â£U(¹�UC�ª¤
• 5º£�ö�5¶TODO¶FIXME¤
1.3 |±�8I©��ª
HTML HTML´¯¤±���ª£J«µInternet¤"
Txt2tagsU)¤ZÀ¤�§ ©��Ö�HTML©�§Ø¦^JavaScript!
µe½´Ù¦Ã��!{'�Eâ©�¤ØI���ªzEâ§�´�±
¦^Õá�CSS©�"txt2tags)¤��èÎÜ/HTML 4.0 Transitional0
IO"
g2.0�å§txt2tags)¤�HTML�è100%ÏLw3c validator���"
1�٠УTXT2TAGS 9
XHTML #���HTML§äk�î���{))¤k�IPÑ7L4ܧù
¦��è�´n)Ú)Û"�Nþ5`§�±òÙw�HTML"Txt2tags)
¤��èÎÜ/XHTML 1.0 Transitional0IO"
g2.0�å§txt2tags)¤�XHTML�è100%ÏLw3c validator���"
SGML �ª=�^�SGMLóä�Ï^�ª"ü��SGML©�U=��HTML!
PDF!PS!info!LaTeX!Lyx!rtf±9XML�ª�©�"SGML2* óä
�UgÄ)¤8¹L§±9UìÙ!ò©�©��f�£sgml2html¤"
Txt2tags)¤�SGML©��LinuxXÚ©��ª§ÏLSGML2*óäU
��=�§ ÈI?Û��8¹©�½´SGML@N<��¦"
LATEX �Ñ\���r��ª§ÆâØ©�Ï^�ª"^§U)¤���Ö!
E,�úª±9?ÛE,�©i�ª§, §XJ\��Ã�@IP§
ÒO�KÞuj,,
Txt2tagsò�\?n¤k�[!Ú~�/§�¤U��¦^�LaTeX©
�§\�I�Ä©iSN"
LOUT �LaTeX�~�q§�´±/@0�O/\0��·-Ú�ΧÓ�¦þ;�¦^)Ò"§/���é�0�?n�ª¦�IP�\èF"
Txt2tagsU)¤�±��¦^�©�§ÏL/lout0·-=�=��PDF½PS©
�"
MAN UNIXÃþ�"
©��ª�)��§55��§UNIXÃþ�%�¹õc§©ªjÍ"
k�«óä�±)¤Ãþ�©�§�´txt2tagsgkÙ`³µ�� ©�§
õ«�ÑÔ"Ïd§Ãþ��SN�U=��HTML!MagicPointü«©
v§��"
MGP MagicPoint´���~�B���¡óä£ÒXÓMicrosoft Power-
Point¤"§¦^IP�ó5½Âz�¶w«§Ïd\�±¦^vi/emacs/P
¯�ù��©�?6ì5�¤E,���¡"
Txt2tags�\�¤¤k�ISO-8859IO¤|±�iNÚ*�½Â§)¤
�.mgp©�U��¦^"
HOTSPOT 1: txt2tags3)¤�.mgp©�¥¦^XFree86 Type1iN�Ï
d\���¡ÈI��ÜTrueTypeiN"
1�٠УTXT2TAGS 10
HOTSPOT 2: iNôÚ�½Â{'§=¦3�k{§NÚ��XÚ¥
£'Xstartx -- -bpp 8¤§��¡�,{*"
\I����´µ=�§,�¦^"ÈI?Û?E½´Ù¦��ó�"
WIKI �7\�½f`L�Äz�(Wikipedia)jºy3\Ø7,ÆS�«#
�IP�{§txt2tagsò�\rIP©�=���Äz���ª"
GWIKI ¦\U�t�ò�8©�Êb�Google Code Wiki"
DOKU DokuWiki´�«�lIO¿�´u¦^�Wiki§��O5Mï�«a
.�©�§Ù8I+N�)muìè!ó�|±9�.úi"Ù�{{'
r�§(�êâ©�ølWikiE,�k�Ö5§Ó�{z(�z©��
M理k�êâѱX©�©��ª�;))ÈIêâ¥"
MOIN MoinMoin´�oº§´�«WikiWiki�
Moin��{´ky���§\7LØä�{{{’’’’’adding braces and
quotes’’’’’}}}"Txt2tags�\�5{ü�IPÚÚ��)û�Yµ��
©�§õ«�ÑÔ"
PM6 ·�ß\ج��ù´Adobe PageMaker 6.0 Õk�IP�ó�§�¹
�ª!ôÚL!{z!±9ý�Ü©PageMaker¥�àI:ÂA5"\�
±ÏL/Import Tagged text0èü�5¦^§"lP¹þ5w§§äk
/aHTML0�IP�ª"
Txt2tagsU)¤¤k�IP§¿�½ÂдL k���ó±��ãá�
ªÚ�ª))ù�Ü©Ï~´4<ÞD�"AOJ2µØUkä1�z�
ãá7L´üÕ�1"
£�öUµ)ö�5regular expression’s book6ù�Ö�Ä:ß��Ò´
^VI?6§2^txt2tags=��PageMaker�ª,�G<�"¤
TXT X©�§���ý¢�ª"
¦+txt2tags�IP�~�* �Øwú§\E,�±ÀJ£Ø§�))�
Iò©�=��X©�=�"
3 ©�¥§IKV\ey�§ ©�K´�éà�"
1�٠УTXT2TAGS 11
1.4 8I©�(�|±�A
(� html xhtml sgml tex lout man mgp wiki gwiki doku moin pm6 txt
ÞÜ Y Y Y Y Y Y Y - - - - N Y
Ù!IK Y Y Y Y Y Y Y Y Y Y Y Y Y
ãá Y Y Y Y Y Y Y Y Y Y Y Y Y
oNi Y Y Y Y Y Y Y Y Y Y Y Y -
�Ni Y Y Y Y Y Y Y Y Y Y Y Y -
ey�iN Y Y - Y Y - Y Y - Y Y Y -
íØ�iN Y Y N Y - - - Y Y Y Y N -
�°iN Y Y Y Y Y - Y Y Y Y Y Y -
��ªz1 Y Y Y Y Y Y Y Y Y Y Y Y -
��ªz«� Y Y Y Y Y Y Y Y Y Y Y Y -
Ú^«� Y Y Y Y Y Y Y Y Y Y Y Y Y
�ó� Y Y Y - - - - Y Y Y Y - -
e-mailó� Y Y Y - - - - Y Y Y Y - -
�Åó� Y Y Y N N - - N N Y Y - -
·¶ó� Y Y Y - - - - Y Y Y Y - -
�L Y Y Y Y Y Y Y Y Y Y Y Y Y
Oê�L Y Y Y Y Y Y Y Y Y Y Y Y Y
½Â�L Y Y Y Y Y Y N Y - - Y N Y
Y²� Y Y - Y Y - Y Y - Y Y N Y
ã¡ Y Y Y Y Y - Y Y Y Y Y N -
L� Y Y Y Y N Y N Y Y Y Y N N
N\(� html xhtml sgml tex lout man mgp wiki gwiki doku moin pm6 txt
ã¡éà Y Y N N Y - Y Y - Y N N -
ü��éà Y Y Y Y N Y N N - - Y N N
ª�ü�� Y Y N N N N N N - - N N N
ã~
Y |±
N Ø|±£�Y���U¬|±¤
- Ø|±£3T8I�ª¥Ø�3¤
1.5 n«^r��µGUI!��Ú·-1
ØÓ^r�I¦Ú¦^�¸ØÓ§txt2tags�A��äk(¹��1�ª"
§Skn«^r��§z�«�kÙ8IÚA5µ
• ã/^r��£GUI¤µ¦^Tk�¤§|±I��¸ÚàI:Â"
• ��µ¦^PHPmu§|±ÏLèAì$1txt2tags§ ÈISC?Û�
rà§S"
1�٠УTXT2TAGS 12
• ·-1µ§S�Ø%§¦^Pythonmu§¤k�A5Ñ�¹u·-1À�
�¥"
1.5.1 ÄuTk�ã/^r��
g1.0��m©§txt2tagsÒk��Uó�uLinux!Windows!Mac±9Ù¦
ö�XÚ�þ�ã/^r��"
§SUgÄuÿ\�XÚUÄw«ã/§XJ�±§KØ�?Ûëê�·
-N^�$1ã/��"\��±ÏL·-1ëê--gui r�$1ã/��"�
,] "��§§S�Ñ�Ø&E"
J«µTkinter´7L�"Ï�Python�IOuÙo´�¹§§¢
Sþ\�XÚ¥AT®²k"
ã/.¡�¦^���{'Ú�*µ
1. \1�Å�.t2t©�§ÙSܽÂ�À�ògÄ£O"
2. XJ8I�ª��§7L3d?�½"
3. d�k�À��±N\ÀJ§�¿�7L"
4. ��§:Â/Convert!0UÜ"
1�٠УTXT2TAGS 13
��k^�À�´/Dump to screen0§ÑÑ(Jج��©�§ ´w«
u¶4þ§±Bu�§(@ÃØ��2ÑÑ�©��;"
.¡�%@ôÚ�±ÏL?U~/.txt2tagsrc ©��%!guicolors �½5
�U"'Xµ
% set my own colors for the graphical interface (bg1, fg1, bg2, fg2)
%!guicolors: blue white brown yellow
1.5.2 3��ª
ÄuWeb�.¡�±ÏLpé�/�http://txt2tags.sf.net/online.php5�
¯§\�±3e1�ckÁ^txt2tags"
Web����±ÜÝu�/Û��£intranet¤S§��3z�ÅìþS
Ctxt2tags�æ�"
1.5.3 ·-1
éuk²��·-1^r5`§--help À�Jø��Ï&EATvµ
1�٠УTXT2TAGS 14
Usage: txt2tags [OPTIONS] [infile.t2t ...]
-t, --target=TYPE set target document type. currently supported:
html, xhtml, sgml, tex, lout, man, mgp, wiki,
gwiki, doku, moin, pm6, txt
-i, --infile=FILE set FILE as the input file name (’-’ for STDIN)
-o, --outfile=FILE set FILE as the output file name (’-’ for STDOUT)
-n, --enum-title enumerate all title lines as 1, 1.1, 1.1.1, etc
-H, --no-headers suppress header, title and footer contents
--headers show header, title and footer contents (default ON)
--encoding set target file encoding (utf-8, iso-8859-1, etc)
--style=FILE use FILE as the document style (like HTML CSS)
--css-sugar insert CSS-friendly tags for HTML and XHTML targets
--css-inside insert CSS file contents inside HTML/XHTML headers
--mask-email hide email from spam robots. [email protected] turns <x (a) y z>
--toc add TOC (Table of Contents) to target document
--toc-only print document TOC and exit
--toc-level=N set maximum TOC level (depth) to N
--rc read user config file ~/.txt2tagsrc (default ON)
--gui invoke Graphical Tk Interface
-q, --quiet quiet mode, suppress all output (except errors)
-v, --verbose print informative messages during conversion
-h, --help print this help information and exit
-V, --version print program version and exit
--dump-config print all the config found and exit
Turn OFF options:
--no-outfile, --no-infile, --no-style, --no-encoding, --no-headers
--no-toc, --no-toc-only, --no-mask-email, --no-enum-title, --no-rc
--no-css-sugar, --no-css-inside, --no-quiet
Example:
txt2tags -t html --toc myfile.t2t
By default, converted output is saved to ’infile.<target>’.
Use --outfile to force an output file name.
1�٠УTXT2TAGS 15
If input file is ’-’, reads from STDIN.
If output file is ’-’, dumps output to STDOUT.
«~ b�\®²?�Ð���(IP�©�file.t2t§y3·�5}Á�
=�"
=��HTML $ txt2tags -t html file.t2t
=��HTML§¦^Ñѽ� $ txt2tags -t html -o - file.t2t
> file.html
.
�¹8¹L $ txt2tags -t html --toc file.t2t
�êi?Ò�8¹L $ txt2tags -t html --toc
--enum-title file.t2t
.
SNVA $ txt2tags --toc-only file.t2t
?Ò�VA $ txt2tags --toc-only --enum-title
file.t2t
.
lIOÑ\Ö��1 $ echo -e "\n**bold**" | txt2tags-t html --no-headers -
Email/�£OÿÁ $ echo -e "\[email protected]"| txt2tags -t txt --mask-email
--no-headers -
=��?6 $ txt2tags -t html -o- file.t2t
| sed "s/<BODY .*/<BODY
BGCOLOR=green>/" > file.html
J«µl1.6��å§c?nÚ�?n�±ÏL%!preprocÚ%!postproc
÷5�¤"
1�Ù XÛm©º
e1,�$1))��Ò´ùo{ü"
2.1 e1!SCPython
Äk\7Le1SCPython)ºì§XJ\�XÚ®²SCLPython§�
aL�!"
Python´�«4Ð�?§�ó§Uª²��3Windows!Linux!UNIX!
Macintosh±9Ù¦�ö�XÚþ$1"\�±lPythonÌ�é�SC©�±9
SC�H"Txt2tags$1�¦Python 2.0±����"
XJ\Ø(½´Ä®²SCLPython§��m�����£tty!xterm!
MSDOS¤§Ñ\·-python§XJPython¿�SC§XÚ¬�Ñ�Ø&E"
2.2 e1txt2tags
Txt2tags��8Ì�´http://txt2tags.sf.net"�ܧS©���¤��tarballØ
©�£.tgz ©�¤§\�±¦^�õê�Ø óä5J�£�)WinZip¤"�
e1�#���§@Ï��==��{¤���^"
2.3 SCtxt2tags
¯¢þ§txt2tags�´��ü©��Python��§ÈISC"
$1§SI������©�´��txt2tags§Ø �S�Ù¦©�´^
��©�!«~±9�óä"
�$?�¦^txt2tags��{´��ÏLPython5N^µ
prompt$ python txt2tags
16
1�Ù XÛm©º 17
XJ�òtxt2tags ����U��$1�§S/SC0�XÚ§�
òtxt2tags ��E�£½öMï��ó�¤�XÚPATH Cþ½Â�8¹§
¿�(@XÚU$1§"
UNIX/Linux/Mac ò��©�D��1��£chmod +x txt2tags¤§,�E
��$PATH Cþ½Â�8¹e£'Xµcp txt2tags /usr/local/bin¤"
Windows ·¶��©�§V\.py��*ж£·-1e�1µren txt2tags
txt2tags.py¤§,�E��XÚPATH �¸Cþ½Â�´»e£'Xµ
copy txt2tags.py C:\WINNT¤
XJ��¦^ã/^r��§\�±Mï��S¡éÄ죯$�ª¤"
2.3.1 �Windows^r;����SC§S
éuWindows^r§txt2tags�kü���Ð�SC§S§\�I:ÂàI
=��¤SCµ
• üÕ�txt2tags��§�鮲SCLPython)ºì�XÚ"
• Õá$1���§ÈI,SCPython)ºì£�¹��i\���¤"
\�±�¯Txt2tags-Win Ì�e1SC�µhttp://txt2tags-win.sf.net/
2.4 SC?6ì��{p�©�
Txt2tagsJø·Ü±e?6ì¦^��{p�©�µ
• Vim (www.vim.org)
• Emacs (www.emacs.org)
• Nano (www.nano-editor.org)
• Kate (http://kate.kde.org)
• gedit ( http://www.gnome.org/projects/gedit/)
• TextMate (http://macromates.com/ )
1�Ù XÛm©º 18
�{p�©��¹�Ütxt2tagsIPÚ5K§±�Ï^r?�ÑÃØ�©�
))�(Ö��IPò±çÚw«"
^Vim�m«~©�
�{©�éuØÓ�?6ìkØÓ�SCL§§�ë��{©��ÞÜ`
²Ú?6ì�©�"
1nÙ 1��©�
3.1 k|Ùì
\I�n�óä5�¤\�1�g=�}Áµtxt2tags§��©�?6ìÚ
���äèAì"
1. (@�etxt2tags´Ä®²SC¿�U�($1"
• ·-1�ªµ�1/txt2tags0·-§§S¬�£��/"�Ñ\
©�£Missing input file¤0�&E"XJØU�($1§}Á¦^
/python /path/to/txt2tags0§$�//path/to/python /path/to
/txt2tags0±�� PythonØ3�¸Cþ½Â�´»¥"
• ã/zö�µ:§SãIéÄã/.¡"
2. mé\U��©�?6ì))?Û��Ñ1§ÃØ´�P�VI§�´M$
Word§D�OpenOffice.org"^?6ìMï���©���\�1�
�txt2tags ©�"
3. éÄ\ O�èAì§^5�w=����HTML��"
3.2 ?�©�ÞÜ
1. 3?6쥧31�1�þ©��ÌIKµ·�1��©�
2. 31�1�þfIKµtxt2tagsÿÁ
3. ,�31n1�þ�m§'Xµ(ÏF§2009
XJ���~§y3\�±w����¹n1SN�©�µ
19
1nÙ 1��©� 20
·�1��©�
txt2tagsÿÁ
(ÏF§2009
ù�´��©���Ü©§�´·�®²�±^§5}Á�e=�ó�
"
ò©�±©�¶test.txt ��§P��P4���´»§Ï��¬�\�
^�§"
3.3 1�g=�))ã/.¡ö�
XJ\¦^·-1§�aL�!§���Öe�!"
XJ\¦^ã/.¡§��X·�µ
1. :Â/Browse0UܧÀJ\fâ���test.txt ©�"
2. £�1��I�§3/Target document type0e.èü¥ÀJ/HTML
page0"
3. :Â/Convert!0UÜ"
1nÙ 1��©� 21
ù�¬�Ñ��é{µ§w�\©�®²¤õ�=�")¤�HTML©
�� ©�3Ó��©�Ye§±/html0�*ж"
3.4 1�g=�))·-1�ª
XJ\¦^ã/.¡§�aL�!���Öe�!"
XJ\¦^·-1�ª§���� ©�¤3�8¹§�1µ
txt2tags --target html test.txt
�5¿µ3·-��Ü©¥m±��©�§�´3À�iÎG/--target0
SÜØUk��§ù�À��¡;�XiÎG/html0§w�§S\���8I
©��ª"���Ü©´ ©��©�¶"
XJ=��~�¤§(J¬�;�©�test.html ¥§Ó��Ñ/txt2tags
wrote test.html0�&E"XJØ´ù�§§S¬��§J«\�UÑ�§�
c[u��e"
��«~µ
prompt$ txt2tags --target html test.txt
txt2tags wrote test.html
prompt$
3.5 �w(J
^èAì�m©�test.html ±u�´Ä�~"
1nÙ 1��©� 22
w�(Jí�\�´{ü�Ñ\n1©i§txt2tagsK�\�¤¤k
��HTML©�ÞÜ&E�ó�µéà�ª!��!m�±9*"©��ÌI
KÓ��Ñy3èAì�IK9¥"
\�IÑ\©�§txt2tags�\t½��;)
J«µtxt2tags)¤�HTML��U¦^ÜCSS§±¢yé�¡*100%�
½�"
3.6 ?�©�N
y3�£©�?6ì?1e�Úµ>�©��SN"\�±�²Fp>�
>fe����Ñ\©i§ÈIAO�/IP0§txt2tags¬gÄ£OÑãáÚ
�L"
,�§2�gµ��!=�2�w(J"ùÒ´txt2tags©��?�6§"
\�±r°å�3SNþ§�¯��¤©��?�))ÈI:àI§ÈIèü§
vkI�§vk�o5©Ñ\�5¿å"
b�©�test.txt ¥�þXe�SN§���X©�§ò§��)¤
�HTML©����é'µ
·�1��©�
txt2tagsÿÁ
(ÏF§2009
y3·�5Á�Átxt2tagsÐ"·�Ø¡�T�:å,,
1nÙ 1��©� 23
p,,Ðj§��e·êþT���¯�µ
- W�A
- ¯¬2i
- �Zú
\ÈI?ÛHTML�ó�O��£ÒU?�Ñ���Ì�§Ø7�\?
ÛIP"?�Ú§Ó�� ©���±=��Ù¦?Ûtxt2tags¤|±��ª"
ØX©��§txt2tagsk��~{ü�IP5¢yÙ¦��ªÚ©�
(�§'XoN!�N!IK!ã¡!L�§��"Þ�{ü�~f§**�)o
N**§== ��IK=="���ë�IP«~£Txt2tags Markup Demo¤"
1o٠ݺtxt2tags�(�
4.1 ©����Ü©
Txt2tags�IP©��±©�n�Ü©§z�Ü©�g�5K§¢yØÓ�
õU§�)µ
ÞÞÞÜÜÜ���£££Header Area¤¤¤ ��©�IK!�ö!��Ò±9FÏ&E"�À
«�"
���������£££Config Area¤¤¤ ½Â�Û�½§?U)Û�1�£Place for general
Document Settings and Parser behavior modifiers.¤"�À«�"
ÌÌÌNNN���£££Body Area¤¤¤ ©�SN"7L�«�"
cü�«�´�À�§�kÌN� ´7L�"
��«��m�©��ª'�AO§e�Ù¬�[£ã§y3·��Ñ�
��*�ã/z�£ãµ
____________
| |
| HEADERS | 1. First, the Headers
| |
| CONFIG | 2. Then the Settings
| |
| BODY | 3. And finally the Document Body,
| |
| ... | which goes until the end
| ... |
|____________|
24
1o٠ݺTXT2TAGS�(� 25
{ü�`§��Ü©´ù�½Â�µ
ÞÜ� ©�SN�cn1¶½ö1�1´�x1§L«/vkÞÜ0"
��� ;�XÞÜ£1o1½ö1�1¤m©§(åuÌN��m©"
ÌN� lÞÜ«����1��k��1£�5º½��¤m©"
4.1.1 ���«~
My nice doc Title
Mr. John Doe
Last Updated: %%mtime(%c)
%! Target : html
%! Style : fancy.css
%! Encoding: iso-8859-1
%! Options : --toc --enum-title
Hi! This is my test document.
Its content will end here.
4.2 ÞÜ�
�µ
• �½ �µ©��Þn1"
• �½ �µ©��1�1§¿���x1"ù¿�X/vkÞÜ0"
ÞÜ´���½ �Ú1ê�«�§o´Ñy3 ©��Þn1"�1�
SN�±�¿§¿vkAO��¦"ØL§éu�õê�©�§í�±e�S
N��Þܵ
• 1�1µ©�IK
• 1�1µ�ö6¶Ú£½¤e�/�
• 1n1µ©��?�FÏÚ£½¤��Ò£í�¦^÷%%date¤
�P4µ ©��Þn1ò¬´8I©��Þn1§38I©�¥¬±p
�é'�©�SN�«©£'Xµ�ÒiN§oN¤"XJ#N©�§ÞÜò¬
üÕ�31��Ø¥w«"
1o٠ݺTXT2TAGS�(� 26
��£½Ã¤ÞÜ
k�ÿ�ö¬F"�un1�Þܧ==�Ñ©�IKÚ£½¤FÏ&
E§ù��Iò1�1Ú£½¤1n13��1§ùÜ°Òج38I©�¥
w«"�´§��Pµ=¦´3��x§ù1E,´ÞÜ��Ü©§ÌN�o
´3ùn1��m©"
�kIK£1�1¤´7L�§�´\��±r§3x§ù¿�X©�v
kÞܧ ÌN�Ò;�Xl1�1m©"XJ\��3�¤=���25½
�ÞÜ&E§@ovkÞÜ�ÀJ´ék^�"·-1À�--no-headers Ï~
^5�¤ù�ö�"
o(
{ ó�µ/ÞÜ�´ �§ �SN0
©��1�1¬Ñy38I©��1�1§�n1Ó�"
4.3 ���
�µ
• ;�XÞÜ«���m©
– XJ½ÂÞÜKl1o1m©
– XJÃÞܧKl1�1m©
• (åuÌN�m©
– (åu���á5�½§�x½ö5º1
���´�À�"ÊÏ^r$��±?�ÑNõtxt2tags©�§%Ø��ù
�«���3§�´k²��^r ÉÃu§Jø�k����õU"��
�^5P¹äN©����§ù�Ò�Ñ=���,�·-1À�"'X`§
\�±�½Ð"��8I©�a.ÚiÎ?è"3/�½0�!¥édk�[
�Qã"
1o٠ݺTXT2TAGS�(� 27
4.4 ÌN�
�µ
• m©u1��k�1
– ÞÜ!���±95ºÑØ´k��1"
• (åu©��"�£EOF¤
ØÞÜÚ���±�¤kSNÑ´ÌN�"ÌN��¹5©��S
N±9txt2tags|±�¤k�ªÚ©�(��&E"3ÌN�S\��±��5
º§��TODOs ÚgJ«"
·-1À�--no-headers ¬�ÑÞܧ�=�ÌN��SN"ù´ék^
�µ\�±^üÕ�©�5½ÂÞܧ,��=���ÌN�ë�å5"
4.5 �½
�½£Settings¤´AÏ���À�§ u©�����S§^±��=�
�L§"�½��{Xµ
$! '�c : �½�
±e´k��'�c�Lµ
'�c £ã
target �½"��8I©��ª"
options �½"��=�À�§�ª�·-1À��Ó"
style �½©��ª"Ì�^��HTML/XHTML©�½Âé�CSS�ªL§
±9�LaTeX©�\1÷�"
encoding �½iÎ?è"�©��¹ISziÎÚ�ASCIIiÎ�I��½?è"
preproc Ñ\©�?n"�½A^u ©��ÌN�¥�/�é/O�05K"
postproc ÑÑ©�?n"�½A^�ÑÑ©�¥�/�é/O�05K"
«~µ
1o٠ݺTXT2TAGS�(� 28
%! Target : html
%! Options : --toc --toc-level 3
%! Style : fancy.css
%! Encoding: iso-8859-1
%! PreProc : "AMJ" "Aurelio Marinho Jargas"
%! PostProc: ’<BODY.*?>’ ’<BODY bgcolor="yellow">’
4.6 ·-1À�
UCtxt2tags%@1��¯$��ª´¦^·-1À�"�¶g§ùÀ
��UA^u·-1�ª§Ø·^uGUIÚWeb.¡"
�Ù¦óä��§§S�É�Gý½Â�À�§z�À�Ñ´d��ü
ëiÎÚ��i1§½öü�ëY�ëiÎÚ����½õ�üc§'X-t
Ú--target"/target0À�´�����7L�À�§Ù¦�Ñ´��Ñ�À
�"
~^�À��)µ--outfile§�½ÑÑ©�¶¶--toc§gÄ)¤8¹L¶
--encoding§�½©��iÎ?è"�õê�À��±ÏLcM��/no-05
'4§'Xµ--no-encoding Ú--no-toc"
¦^%!options ��ª§\�±3 ©������½I��À�§
ù�3·-1¥Ò�±�ÑKùÀ�"'Xµ%!options: --toc -o
mydoc.html"8I©��ª��½´�~§§kgC��ªµ%!target:
html"
¦^--help À�U¼����À��L"
4.7 ^r��©�£RC©�¤
Ï^��½�;u^r��©�£q¡�RC©�¤¥"éu3z�� ©
�¥�E¦^��½§\�±r§���RC©�¥§±Bu¤k� ©�¦^"
ù�©��"� ��ûu\¦^�ö�XÚ§\��±ÏL½Â�¸Cþ5
�½Ù �"
RC ©�� �
Windows %HOMEPATH%\ t2trcLinux and other $HOME/.txt2tagsrc
User defined T2TCONFIG �¸Cþ
1o٠ݺTXT2TAGS�(� 29
�½��ª� ©����¥¦^�À��ª���Ó"±e´�¹3§
S��doc/txt2tagsrc �«~©�µ
% my configs
%%% Always use CSS-friendly tags in HTML
%!options(html): --css-sugar
%%% Change the default TOC depth for all targets
%!options: --toc-level 4
%%% Set the default encoding for all documents
%!options: --encoding iso-8859-1
Ø��x1!5º1Úk���1��?Û��õ{�1§Ñ¬¦
�txt2tags3$1��)�اÏd?6ù�©���¦þ�%"
3�1=��§§SgÄòRC©��SNA^u ©�§XJ\��'4
ù�1�§K�¦^·-1À�--no-rc"
4.8 ���`k?Ú\1^S
kn«�ªw�txt2tagsI�¦^�À�Ú�½§ÙÖ�ÚA^�^S´µ
1. ^r��©���½
2. ©������½
3. ·-1À�
§SÄkÖ�RC©��SN£XJ�3�{¤§¿ò�A���A^u�
c ©�",�§u� ©�������½§XJé�§A^�¿�CX
KRC©���½±9¡Àâ"��´·-1À�§§��å'cüöÑp"
ù=´`§XJ©��iÎ?èÓ�^n«�ª5�½§�ª�A^�´
·-1À���½"
1o٠ݺTXT2TAGS�(� 30
4.9 %!include �-
include ·-^uòÜ©��SN�¹? ©�¥"§Ø´����À
� ´��·-§éuÌN�«�5`§K´��k��1"
include ·-�^5ò�.�©�©�����¡ã£'X��Ö¥�Ù
!¤§½ö´òÜ©���ÜSN�¹? ©�¥"'Xµ
My first book
Dr. John Doe
1st Edition
%!include: intro.t2t
%!include: chapter1.t2t
%!include: chapter2.t2t
...
%!include: chapter9.t2t
%!include: ending.t2t
©�¶�3iÎG%!include �¡"|±�À�/target0À�§Ïde¡
��ª�´Ü{�µ
%!include(html): file.t2t
5¿µinclude ·-ò��¹©��ÌN�«�Ö\ ©�¥§ ÞÜÚ�
��K��Ñ"¤±§\�±üÕ=�ù�©�§½öò§�¹?Ì©�¥�
Ó=�"
d§�k,n«/ª��¹µ
• ��Ú^£Verbatim¤�¹
• �©£Raw¤�¹
• �IP£Tagged¤�¹
��Ú^£Verbatim¤�¹¬�3Ö\©��©���Ú�ª§Ò�
´txt2tags©����Ú^£VERB¤���"�¢yù«a.��¹§�ò©
�¶�u�ÚÒ¥µ
%!include: ‘‘/etc/fstab‘‘
1o٠ݺTXT2TAGS�(� 31
�©£Raw¤�¹¬ì���¹Ö\©�§Ø¬ÏéÚ)ÛÙ¥�?ÛI
P§Ò��{�©£RAW¤�¥��"�¢yù«a.��¹§�ò©�¶�
uVÚÒ¥µ
%!include: ""nice_text.txt""
�IP£Tagged¤�¹¬òÖ\©�SN��D4�8I©�§txt2tagsØ
¬?1?Û)ÛÚ��"ù«�ª·^u3©�¥�¹���IP�SN§
éu"��Þܽ�5&E±9txt2tagsØ|±�E,IP�©k^µ
%!include: ’’footer.html’’
5¿µ�ò©�¶�uü�üÚÒ¥m"du�\�SN´®²�ªz�§
\7L(@8I©��ª±��Ñ�"
4.10 %!includeconf �-
includeconf ·-^uòÜ��©�Ö\�c©�¥"ù�·-=3
©�����SÑyâ´Ü{ k��"
�õ�©���Ó�����§\�±òù��8¥��§,�^ù�
�-5Ö\"�3z�I�Ö\Ü8¥���©�¥¦^includeconf ·-"
'Xµ
My First Document
John Doe
July, 2004
%!includeconf: config.t2t
Hi, this is my first document.
Ü��©�¦^��ª�RC©��Ó"
1Ê٠ݺIP
txt2tags��ÜIPVAµ
� {z
ÞÜ First 3 lines oN **words**
IK = words = �N //words//
�?Ò�IK + words + ey� words
ãá words íØ� –words–
ó� [label url] �° “words“
ã¡ [filename.jpg] �©©i ””words””
Ù¦
Ú^ <TAB>words ©�� ——–...
�L - words o©�� ============...
?Ò�L + words L� | cell1 | cell2 | cell3...
½Â�L : words e:£I\¤ = title =[anchor]
5º1 % comments 5º� %%%\n comments \n%%%
��Ú^1 “‘ word ��Ú^� “‘\n lines \n“‘
�©1 ””” words �©� ”””\n lines \n”””
Ï^5Kµ
• ÞÜ´©��Þn1§Ù¥�IPج)Û"
• IK´��IK©i�é¡�/=0½/+0iÎ"iÎ�õ§IK?ê�
�"
• {zά�ÑIP�Ù¥�SN�m���"
• 5ºÎÒ/%07L uz�1�mÞ£1��¤"
• ã¡©�¶7L±GIF!JPG!PNG½öaq�*ж(å"
32
1Ê٠ݺIP 33
• ��Ú^£Verbatim¤Ú�©£Raw¤¥�IPج�)Û"
• ©��/o©��7L´ëY20�iαþ"
• Ú^Ú�L�i@/)i@ÏL ?5½Â"
• L�IK1ÏL u1Ä�V+�Î/||05½Â"
5.1 ÞÜ
• £ãµ(½©�ÞÜ
• á5µõ1§��gd£�gd�¹��§eÓ"�©µFreeSpace¤§Ã
éà§Ãi@
• ��¹µ÷
• �{µ
– ©��Þn1
– 1�13�KL«ÃÞÜ"·Üu^r½��ÞÜ£�©µNice for
command line oneliners or customized headers¤"
– 1�1Ú/½1n13�§ò�ÑÞÜ�Ü©SN"
• [!µ
– ÞÜ��IPج�)Û
– ©��Þn1�´8I©��Þn1§38I©�¥�ÌN�±p
é'5w«§½ö�uüÕ�1��þ£XJ#N©��{¤"
– ÞÜ�SN�±�¿§vkM55½�&E§, í�¦^e¡��
{µ
∗ 1�1µ©�IK
∗ 1�1µ�ö6¶Ú/½>fe�
∗ 1n1µ©�FÏÚ/½��Ò£ïƦ^%%mtime ÷¤
1Ê٠ݺIP 34
5.2 IK�?Ò�IK
• £ãµ(½��?Ò½öØ?Ò�Ù!IK
• á5µ�õ1§��gd§Ãéà§Ãi@
• ��¹µ�©©�£Raw¤
• �{µ
– éu¤k�5K§^/+0O�/=0���?Ò�IK
– ��©i�ÎÒê8�±é¡§=�ù�=
– ÎÒê8O\§Ù!�Ý��O\µ=title=, ==subtitle==,
===subsubtitle===, ...
– ���Ý�5?IK§=====�ù�=====
– ê8Øé¡�IPØ�¤IK§=�ù�===
– IP���SÜ�±gdV\��§= �ù�=
– IK�±ke:£anchor¤§=�ù�=[anchor]"�±Mï���d
e:�ó�§/X[�/ó�#anchor]
– e:¶¡�Udi1!êi!ey�ÚëiÎ�¤£A-Za-z0-9 -¤
• [!µ
– IK¥�Ù¦IPج)Û
– IK¥�÷ج)Û
5.3 ãá
• £ãµ(½��g,ã
• á5µõ1§��gd§Ãéà§Ãi@
• ��¹µ÷§{zΧ�©©£Raw¤§ó�§ã¡§5º
• �{µ
– d�1©��õ1©��¤ãá
– Ù¦�¬§X�L!Ú^�!L�½��Ú^��§����ãá�
(å
1Ê٠ݺIP 35
5.4 5º
• £ãµ^u�\ج�\8I©��©�
• á5µ�õ1§���gd§Ãéà§Ãi@
• ��¹µÃ
• �{µ
– ±��z©Ò% å©�1£% u1��¤�¤��5º1§%�ù
�
– ØUkc���£UµùÒ´¤¢/���gd0¤
• [!µ
– 5º©�ج�\=���©�
– 5º´�¬G�§Ïdz��5º1Ñ7L±% ��c�
– �^uTODO ÚFIXME J«§±9�ögJ«
5.5 oN§�N§ey�ÚíØ�
• £ãµ^u3ãá!L�!�LÚÚ^�S�\oN/�N/ey�/íØ�
iN
• á5µ�õ1§���gd§Ãéà§�i@
• ��¹µ÷§{zΧ�©©£Raw¤§ó�§ã¡
• �{µ
– V(Ò���©i�)oN§**�ù�**
– V�m���©i�)�N§//�ù�//
– Vey����©i�)ey�iN§ �ù�
– VëiÎ���©i�)íØ�iN§--�ù�--
– IP7L�SÜ�©i;�bÜ£ØUk��¤µ** �ù�** ´�
{�
• [!µµ
1Ê٠ݺIP 36
– ©�¥z�é{zÎÑ7L uÓ�1§¥mØUk�1Î
– {zÎS�±�¹÷§'Xµ**%%date**
– {zÎ�±·Ü¦^§Xµ** like //this//**
5.6 �°iN
• £ãµ^u3ãá!L�!�LÚÚ^�S�\�°iN�©�
• á5µ�õ1§���gd§Ãéà§Ãi@
• ��¹µÃ
• �{µ
– ^V�ÚÒ��©i§‘‘�ù�‘‘
– IP7L�SÜ©i;�bÜ£ØUk��¤µ‘‘ �ù�‘‘ ´�{
�
• [!µ
– SÜ�IPج)Û
– SÜ�÷ج)Û
– ¤k��°©i7L uü�1S§ØUk�1Î
– 3Ü©8I©�¥§SÜ���¬��3e5¶3Ù¦�8I�ª
¥§ëY���K�Ø ���"
– ��±��oN��°iN§�I��uoNIPSܵ“**monobold**“"
ù�5KéÙ¦�{zÎÓ�·^§'Xµ“//italic//“§“ underline “"
5.7 ��Ú^1Ú��Ú^�
• £ãµ^u�\§S �è½öÙ¦ý�ªz�©�§�3��Ú�1Χ¿±�°iNw«
• á5µõ1§���gd§Ãéà§Ãi@
• ��¹µÃ
1Ê٠ݺIP 37
• �{- ��Ú^1µ
– ±n��U��ÚÒ\����Ú�§��©i§“‘ �ù�
– �ÚÒ7L uz1�1��§ØUkc���
• �{- ��Ú^�µ
– 1�1�n��U��ÚÒ“‘§le�1m©�ü1½õ1©�§�
��1�n��U��ÚÒ“‘
– IPØUkc���§�ØUk�����
• [!µ
– SÜ�IPج)Û
– SÜ�÷ج)Û
– XJ�� ©�"�£EOF¤§ÿ�4Ü���Ú^�ògÄ'4
5.8 �l1Úo�l1
• £ãµ)¤Y²��l1½öo�l1
• á5µ�õ1§��gd§Ãéà§Ãi@
• ��¹µÃ
• �{µ
– �l1dõ�J�/-0½öey�/ 0�¤
– o�l1dõ��Ò/=0|¤
– ���)20��A�iÎ
– ��±kc�Ú�����
– 3Ó�1�?ÛÙ¦iÎò»�IP
• [!µ
– XJ8I�ªØ|±Y²�§gÄ=z���5º1
– o�l13,8I�ª¥�UkØÓ��^µ
∗ �o��l1∗ �N6ʧ'X3MagicPoint ¥
∗ ©�§'X3LaTeX ¥
1Ê٠ݺIP 38
5.9 ó�Ú·¶ó�
• £ãµ(½����pé�½�/�ó�
• á5µ�õ1§���gd§Ãéà§Ãi@
• ��¹µ÷§�©©£Raw¤§ã¡
• �{µ
– Ü{�URL!ftp!#ª|½>fe�/�U�§SgÄ£O¿=��
�ó�
– �Æ£http§https§ftp�¤��ѧXµwww.likethis.com
– �±�ó�·¶§Xµ[click here www.url.com]
– �±Mïã¡ó�µ[[image.jpg] www.url.com]
– ó�/�#N÷O�µ[see source %%infile]
– ó�¶i#N÷O�µ[mirror of %%outfile www.url.com]
– �Üó�I£Î7L u ©��Ó�1S§ØUk�1Î
• [!µ
– XJ8I�ªØ|±ó�§Kó�©i==\þey�
5.10 Ú^
• £ãµ(½��Ú^£ ?¤1
• á5µõ1§���gd§Ãéà§�i@
• ��¹µ÷§{zΧÚ^§�©©§Bars§ó�§ã¡§5º
• �{µ
– ±���LΣTAB¤m©��1
– �õ��LÎKO\Ú^ ?��Ý
– Ú^1UØ#N�LÚL�
• [!µ
1Ê٠ݺIP 39
– XJ��©�"�£EOF¤§ÿ�4Ü�Ú^gÄ'4
– ,8I�ªØ|±Ú^i@§Kfi@gÄ£���i@Ó?
– Ú^�Ý�Kþvk��§�,8I�ª�U¬k��§K�L�
���fi@gģ"
5.11 �L§?Ò�LÚ½Â�L
• £ãµ(½�L�m©
• á5µõ1§���gd§Ãéà§�i@
• ��¹µ÷§{zΧ�L§L�§��Ú^§�©©§Bars§ó�§ã
¡§5º
• �{µ
– ±ü�J�/-0/\Ò/+0/kÒ/:0;�ü���m©�1
– �L��1��iÎØU´��£½Â�Lؤ
– �À�c���£ÊÏ��§��LΤòm©��f�L£�Li
@¤
– f�L±���Ý�L�½ö�L�(å
– ¤km���L±ü��U��1(å
• [!µ
– XJ��©�"�£EOF¤§¤kÿ�4Ü��LgÄ'4
– �L�±·Ü¦^§'X?Ò�LSÜ�±i@½Â�L
– ,8I�ª�UØ|±�Li@§Kf�LgÄ£����L
Ó?
– i@�Ý�Kþvk��§�´,8I�ª�U¬k��§K�L
����f�Lgģ
5.12 ã¡
• £ãµ�\�Bã¡
1Ê٠ݺIP 40
• á5µ�õ1§���gd§�éà§Ãi@
• ��¹µ÷
• �{µ
– òã¡�©�¶�3�é�)Ò¥§Xµ[likethis.jpg]
– ©�¶7L±PNG§JPG§GIF �ã/�ª*ж(å§Ø«©��
�
– ©�¶�±¹kÎÒ£�©µSymbols are allowed on the filename¤§
Xµ[likethis!~1.jpg]
– ©�¶#N÷O�§'Xµ[report-%%date(%Y-%m-%d).png]
– ©�¶ØU�¹��§Xµ[like this.jpg]
– ©�¶��)Ò�mØUk��§Xµ[ likethis.jpg ]
• [!µ
– XJ8I�ªØ|±�\㡧㡶¡ò�u�é�)Ò¥w«
– �\ã¡IP3�1¥� �½Âã/�éà�ªµ
∗ [LEFT.jpg] �éà�éà�éà
∗ إإإ[CENTER.jpg] إإإ
∗ méàméàméà[RIGHT.jpg]
5.13 L�
• £ãµ�½k?¿��L�1
• á5µõ1§��gd§�éà§Ãi@
• ��¹µ÷§{zΧ�©©§ó�§ã¡§5º
• �{µ
– ��c��+�Î/|0(½��L�1
– �éc��+�Î/||0(½��L��IK1
– Ä�+�Îc�c���(½L�Ø¥
– ü��±+�Îm�£/Xµ��|��¤
1Ê٠ݺIP 41
– L�1�1±��+�Î(å§L«>µ��
– Ù{1(��+�Î�±�Ñ£=�C»^¤
– ü��±õ{��+�Î(å¼�/ª�0�Jµ/||0ªü�§/|||0ªn�§±daí
– ü��S���û½SÜ�éà�ª
– «~µ| �¹| 5�| �| L�| 1|
• [!µ
– z��L�1�SN7L3 ©�S�Ó�1S§ØUk�1Î
– ��éà�8I�ª£'XSGMLÚLaTeX¤±1�1�éà�ª�
�¤k1�"�éà�ª
– ?¿��L�1ò(å��L�§5º1Ø
– ü��ê8vk�½§ØÓ�1�±�¹ØÓê8�ü��
– 8cÿÃ{¢y/1ª�0
– XJ8I�ªØ|±L�§KL��À���Ú^�
5.14 �©©§�©1Ú�©�
• £ãµ^±/�o0,©iØ�)Û§ÙSÜ�IPÚ÷þج?n
• á5µ�õ1§���gd§Ãéà§Ãi@
• ��¹µÃ
• �{- �©©µ
– ëY�ü�VÚÒ��©i§Xµ""like this""
– IP7L�SN;��)£ØUk��¤
• �{- �©1µ
– ±3��U�VÚÒm©�1§""" like this
– VÚÒ7L u1�1��§ØUkc���
– VÚÒ������§±©�mIP�©�
• �{- �©�µ
1Ê٠ݺIP 42
– 1�1�3��U�VÚÒ§e�1m©�ü1½õ1©�§���
1�3��U�VÚÒ��(å
– IPØUkc�Ú�U��
• [!µ
– SÜ�IPج)Û
– SÜ�÷ج)Û
– XJ�� ©�"�£EOF¤§ÿ�4Ü��©�gÄ'4
18Ù ÷
÷´�AÏ�'�c§3=���ÿ?1ÐmÚO�"÷�±^5�\
Ä��&E§'X ©��?6FϽ٦&E"
÷��ª�µVz©Ò%%Ú�§�¡;�X÷¶§Xµ%%date",÷�
±���é�)Ò§p¡´�À��ªÀ�iÎG§ÃXµ%%date(%Y-%m-%d)§
�ªÀ�iÎGdz©Ò%����iÎ�¤§XJ��Ñ�ªÀ�§K¦^"
���ª"
÷¶ Ðm� %@�ª
%%date �cFÏ %Y%m%d
%%mtime ©�?U�m %Y%m%d
%%infile ©�´» %f
%%outfile ÑÑ©�´» %f
%%toc Ðm�8¹L -
��5Kµ
• ÷¶Ø«©���§¤±%%date!%%DaTe Ú%%DATE ����
• ÷��u©��ÞÜÚN«�Ñ´k��§�k%%toc ~§§�U�3
ÌN�«�"
• 3���S�÷§¿�X���(å§N«�m©
• ÷�± u�1�?Û �§Ó�1�±�¹�«ØÓ�÷£%%toc ا
§7LÕÓ�1¤
• ó�Ú�ãIP��±¦^÷£%%toc ؤ
• IK!��Ú^Ú�©�S�÷ج)Û
43
18Ù ÷ 44
�����~f£oNÜ©d÷Ðm��¤µ
�©´5Txt2tags^r�H6§d ©�txt2tags-userguide-zh.t2tÏLTxt2tags=
���§ÑÑ©�¶tex"=��¤u2009-03-23 15:07:29§ ���g?U
K´32009-03-23 15:07:25" ©�Ú8I©�þ u8¹t2t-userguide-cn
e"
£ÈöUµ÷%%infileÚ%%outfile2WindowseÃ{�~Ðm"¤
6.1 %%date
÷%%date ò�O���c�FÏÚ�m§�±^u3©��Þܽ�Ü
5²)¤��m"XJ��� ©��C�g?6��m§�ë�%mtime ÷�
!"
÷Ðm��±keZØÓ�w«�ª§����L�ëwPythonÌ�§±
e´Ù¥�~^�A«µ
�ª £ã
%a (϶� �
%A (϶��¡
%b �°¶� �
%B �°¶��§
%c FÏÚ�m
%d ���¥�1AU£01-31��?�ê¤
%H 24������ê£00-23��?�ê¤
%I 12������ê£01-12��?�ê¤
%m �c¥�1A��£01-12��?�ê¤
%M ©¨ê£01-59��?�ê¤
%p �/�ª�þ̽öeÌ
%S ¦ê£01-59��?�ê¤
%x �/�FÏ�¡£�©µLocale’s appropriate date representation¤
%X �/��m�¡
%y ü ê�c°L«£00-99��?�ê¤
%Y ���c°L«
%% z©Ò/%0
«~µ
18Ù ÷ 45
÷ –> é2009, Mar 23 at 15:07 �Ðm�J
%%date(Converted on: %c) –> Converted on: Mon Mar 23 15:07:29 2009
%%date(%Y-%m-%d) –> 2009-03-23
%%date(%I:%M %p) –> 03:07 PM
%%date(Today is %A, on %B.) –> Today is Monday, on March.
6.2 %%mtime
÷%%mtimeò�Ðm� ©��C�g?U��m"§���´÷%%date�
/W~�0§Ù�ª�-�����Ó"
Þ��~f§�©� ©��C�g?U´3Mon Mar 23 15:07:25 2009 §
ù�FÏd%%mtime(%c)Ðm 5"
6.3 %%infile
÷%%infileÐm� ©�3XÚ¥�´»&E§�^u)¤html¥/�w
��¡ ©�0�ó�"
T÷|±��ª�-Xeµ
�- £ã �© ©��÷ÐmÑÑ
%f ©�¶ txt2tags-userguide-zh.t2t
%F ©�¶£Ø¹*ж¤ txt2tags-userguide-zh
%e ©�*ж t2t
%p ©�ýé´» /home/rookie/tmp/editing/t2t-
userguide-cn/txt2tags-userguide-
zh.t2t
%d ©�¤38¹ /home/rookie/tmp/editing/t2t-
userguide-cn
%D ©�I8¹ t2t-userguide-cn
%% z©Ò %
«~µ
18Ù ÷ 46
�è –> Ðm(J
This Guide parent dir is %%infile(%D). –> This Guide parent dir
is t2t-userguide-cn.
I do use the %%infile(%e) file extension. –> I do use the t2t file ex-
tension.
[See the source %%infile] –> See the source
Converted to XHTML, I’ll be %%infile(%F).xhtml –> Converted to XHTML,
I’ll be txt2tags-
userguide-zh.xhtml
5µe ©��IOÑ\STDIN§K÷Ðm�/-0"
6.4 %%outfile
÷%%outfileòÐm�8I©��´»§�^uò©�¶�¹u©��ÞÜ
ÚÌNS"§���´÷%%infile�/W~�0§�ª�-����Ó"
«~µ
�è –> Ðm(J
You are reading the %%outfile file. –> You are reading the
txt2tags-userguide-
zh.tex file.
txt2tags -t %%outfile(%e) -i %%infile -o %%outfile –> txt2tags -t tex -i
txt2tags-userguide-
zh.t2t -o txt2tags-
userguide-zh.tex
5µeÑÑ�IOÑÑSTDOUT§K÷Ðm�/-0"
6.5 %%toc
÷%%tocòÐm�8¹L"\�±r§�3©�ÌN�S�?Û/�§$�
Ø�¦^�g§'X\�±r§�3©��"�"��HÒ´¦^ù�÷5�
�8¹L"
�Ù¦�÷ØÓ§%%tocvk�ªiG§ ¦^5K�kØÓµ
18Ù ÷ 47
• �3©�ÌN�¥�^
• 7LÕÓ�1£c��±k��¤
• 7L�·-1À�--toc�ܦ^§ÄKò��Ñ
• XJ¦^%%toc§"��8¹L �Ú�ªò�CX
1ÔÙ �½
�½� u©�����S§3=��1�)�"�½�þ��À�§Ê
Ï^r���±Ø¦^§� �¤¤kó�¶, §��\Ƭ¦^�½�§
·�Ù\�½¬þ�§Ï�§�¢3�Ð^�
�½1´AÏ�5º1))d��/!0Ú�§±d«OuÊÏ�5º1"�
½���{é{ü§d'�cÚ��¤§�öd��kÒ£/:0¤©�"
%! '�c: �
�{[!µ
• /%!0��3�姥mØUk��§��u1Ä
• '�cÚ©�Î�m�±k��
• '�cÚ�þØ«©���
5Kµ
• �k u���S��½�â)�§ uÌN�S��½�ò�À�ÊÏ�5º©�"
• e�Ó'�c��½�3���SÑyõg§K¦^���g��½"~µoptions, preprocÚpostproc§ùn��½´\È�"
• '�c����½�À�ÊÏ5º©�"
• �½��`k?puRC©�§�$u·-1À�"
48
1ÔÙ �½ 49
7.1 %!Target
^5½Â"��8I©��ª§Xµ
%!target: html
d�^r�IN^·-µ
$ txt2tags file.t2t
=�ò©�=��ý��8I�ª"
��½Ø|±�½�À�A½8I�ª£�©µoptional target specifica-
tion¤§'Xµ%!target(tex): html ´Ã��"
7.2 %!Options
zgÑÑ\P��·-1À�Q\<qN´Ñ�§¦^Options�½�§^
r�ò=�À�� ©��3�å§ùÓ��|u(�©�oU±�Ó�À�
Ú�Ó��ª=�"
Ö�ùÀ���(�Ø�k�{�اÒ�¦^·-1�ª��"�,§
é§S/txt2tags0�N^!8I�ª��½Ú ©�¶ÒØ7�?5"
'X§b�\3·-1?1Xe�=�µ
$ txt2tags -t html --toc --toc-level 2 --enum-title file.t2t
rùÀ��\ ©�µ
%!target: html
%!options(html): --toc --toc-level 2 --enum-title
y3\�I{ü�¦^·-/“txt2tags file.t2t0=���Ó��8�§ù��
Bu\3?6ì¥�1=�"'X§3Vip¡�±ù�N^µ
:!txt2tags %
1ÔÙ �½ 50
7.3 %!Encoding
EncodingÀ���=�^r¤I§Ï�¦�I�¦^�/�ó�,AÏ
iα9[!§Ïd8I©��iÎ8I�g1�½£XJ#N�{¤"
k��Encoding��HTML¤¦^�iÎ8¶¡�Ó§'Xµiso-8859-1!
koi8-r�"XJ\édØ(½§�±ë����iÎ8�L"
LaTeX¦^�´iÎ8�O¶§ùéu^r5`¿Ø´¯K§Ï�txt2tags¬
O\�¤¶¡�=�§'Xµ
txt2tags/HTML > LaTeX
windows-1250 >>> cp1250
windows-1252 >>> cp1252
ibm850 >>> cp850
ibm852 >>> cp852
iso-8859-1 >>> latin1
iso-8859-2 >>> latin2
koi8-r >>> koi8-r
Ò��½��txt2tagsÃ{£O��±ÏL§��d^rg1½�"
7.4 %!PreProc
PreProcÀ�3 ©�Ö\��v)Ûc§?1/�éÚO�0�ó�"
�±^5½Â�~^c� �§Xµ
%!preproc JJS "John J. Smith"
%!preproc RELEASE_DATE "2003-05-01"
%!preproc BULLET "[images/tiny/bullet_blue.png]"
©�¥��1µ
Hi, I’m JJS. Today is RELEASE_DATE.
txt2tags3?1=��¬òÙÀ�µ
Hi, I’m John J. Smith. Today is 2003-05-01.
1ÔÙ �½ 51
ù��ué ©�N^ÜSed/Perl?1Lȧ,�D�txt2tagsµ
$ cat file.t2t | preproc-script.sh | txt2tags -
txt2tags3PreProc?n(å�m©é ©�?1)Û"
5µý?n==éÌN�?1§Ø¬�¹ÞÜ�Ú���"
7.5 %!PostProc
PostProcÀ�3txt2tags?1)ÛÚ?n(å�§éu=���SN?1
/�éÚO�0�ó�"
�±^5é)¤�©�?1?�Ú\óÚ�N§'X?UIP!V\�
�©�ÚIP§��"'Xµ
%!postproc(html): ’<BODY.*?>’ ’<BODY BGCOLOR="green">’
%!postproc(tex) : "\\newpage" ""
�^´ùHTML©���µôÚU�ÉÚ§±9£ØLaTeX©�p�©�Î"
ù��ué=���SNN^ÜSed/Perl?1Lȧ2)¤8I©�µ
$ txt2tags -t html -o- file.t2t | postproc-script.sh > file.html
3Ú\ù�A5c§·� �¦^����5/N�0txt2tags?n�
(J§ù��¢Sþõ´�þ�sed£½aqóä¤O�·-"y3§ù�
¡�O�iÎG�±�3©�¥§¿¦^Pythonr���KL�ªÅ�5?1
��Ú?n"
7.6 %!Style
• ^u3HTMLÚXHTML8I©�¥�½�ªL©�"
• ^u3LaTeX8I©�¥¦^\usepackage\1÷�"
• �J�Óu·-1À�--style"
• ·-1À�--style `k?pu�½�%!style"
1ÔÙ �½ 52
7.7 �éA½�8I�ª?1�½
Ø%!target��¤k�½�þ��^u,�A½�8I�ª§�{Xµ
%!key(target): value"ù¦�^r�±�éØÓ�8I�ª?1ØÓ��
�"
ù�A5é¤k|±§��½�Ñk�§�ØL3Pre/PostProcLÈì¥w
�cÙk^"Þ�~f§\�±éHTMLÚLaTeX©��½ØÓ��ªµ
%!style(html): fancy.css
%!style(tex) : amssymb
ù�A5¦�^rBué=���©�?1�Nµ
%!target: sgml
%!options(sgml): --toc
%!options(html): --style foo.css
%!options(txt ): --toc-only --toc-level 2
3ù�~f¥§"��8I�ª�SGML§¿�)¤8¹L"XJ^rN^·-
/“txt2tags -t html file.t2t0§K==¦^�éHTML½Â�À�§)¤�©�¬
¦^é��ªL/foo.css0§¿�Ø)¤8¹L"
7.8 'uPreProcÚPostProcLÈì��[!
• U1?1/�éÚO�0£aq�Sed¤"
• �½Â�LÈìجCXk½Â�LÈì§ ´\\�"Ïd\�±½ÂNõLÈ짧�¬Uì½Â�^S�g�1"
• �Ù¦��½�ØÓ§���Ú�éA½8I�ª�LÈìþ¬��1"3e¡ù�~f¥§ü�LÈìþ¬�^uHTML8I©�þµ
%!postproc : this that
%!postproc(html): that other
• LÈì7L�½ü�ëê"
• A½�=ÂiΧX�1Î\nÚ�LÎ\t§þò�)º"
1ÔÙ �½ 53
• |^�iÎ?1O�§¢yíØ©��õUµ
%!postproc: "undesired string" ""
• ¦^PostProcO�I\��Ðo´�²éA�8I�ª§±;�Ñy¯Kµ
“%!PostProc(target): <thsi> <that>
• PreProc31Ö\�á=å�^§ PostProcK´3¤k�)ÛÚ?nL§
(å�å�^§¦�å�^� ���uµ
$ cat file.t2t | preproc.sh | txt2tags | postproc.sh
• LÈì�/�é0L§¦^�KL�ª§ Ø´~5iÎG"Øn)�o´�KL�ª�v'X§\�IP�,AÏiÎ�¦^���/\05?1/=Â0Ò§ùAÏiÎ�)µ
\* \+ \. \^ \$ \? \( \) \{ \[ \| \\
• |±Python��KL�ª£�Perl��KL�ª�q¤"'Xµ3HTML¥
rI\/B0ÑO��I\/STRONG0µ
%!postproc(html): ’(</?)B>’ ’\1STRONG>’
• LÈìëêk3«�ª?1D4µ
1. ü��\ÚÒ�üc§ÃXµFOO£Ø¹��¤
2. �3VÚÒ¥�iÎG§ÃXµ”FOO”
3. �3üÚÒ¥�iÎG§ÃXµ’FOO’
• XJ�ªL�ª�¹VÚÒ§ò§�3�éüÚÒ¥�oå5§��½,"�Ü{��ªL�ª«~µ
%!postproc: PATT REPLACEMENT
%!postproc: "PATT" "REPLACEMENT"
%!postproc: ’PATT’ ’REPLACEMENT’
%!postproc: PATT "REPLACEMENT"
%!postproc: "PATT" ’REPLACEMENT’
1lÙ ç {
�ÙØí�Ð?^r�Ö"·�ò3txt2tags�LÈ쥦^�E,��
ªÚ�KL�ª§±d5¢y�/Û%0�õU"
�5¿µ�1±eL§cïÆ>&§§��U�¯§$�u ©
�¥�,©�3=�¥¬¿�§ جÑy38I©�¥"�3=
�\(¢I�¿�²xgC3Z�o��¹eâ¦^ùE|"
5µLÈì´r�%��x�A5��Ø�LÈì¬�)¿�Ø
��(J"
��P�
8.1 ¦^%!PostProc�\õ1©�£'XCSS5K¤
LÈ쥧^uO���ªL�ª�±�¹õ1£±\n ���1Τ"ùBu3HTML8I©�¥�\�þA1CSS5K§ ÈIMï��Õá�é�ª
Lµ
%!postproc: <HEAD> ’<HEAD>\n<STYLE TYPE="text/css">\n</STYLE>’
%!postproc: (</STYLE>) ’body { margin:3em ;} \n\1’
%!postproc: (</STYLE>) ’a { text-decoration:none ;} \n\1’
%!postproc: (</STYLE>) ’pre,code { background-color:#ffffcc ;} \n\1’
%!postproc: (</STYLE>) ’th { background-color:yellow ;} \n\1’
Xd§Ù{�LÈìÏLO����\�iÎG �1��LÈìéXå5"
y3§�5{ü���/<HEAD>0C¤µ
54
1lÙ ç { 55
<HEAD>
<STYLE TYPE="text/css">
body { margin:3em ;}
a { text-decoration:none ;}
pre,code { background-color:#ffffcc ;}
th { background-color:yellow ;}
</STYLE>
8.2 ¦^%!PreProcMï/A½8Ia.0�SN
k�ÿ\��3,�A½�ª�8I©�¥�\�©�§ Ù¦��ª
KØ�UC§ù�8I�±ÏLPreProc���E|5¢y"
�{´µòù©���5º�\ ©�¥§�þ�IP§ ¦^�é
A½8I�ª�LÈìò§�/�5º0K"
Þ�~f5`§·���3HTMLÑÑ¥\\����ãá§u´rù
©��¤AÏ�5º1§'Xµ
%html% This HTML page is Powered by [txt2tags http://txt2tags.sf.net].
%html% See the source TXT file [here source.t2t].
ù1±%mÞ§áuÊÏ�5º1§3=����ÑK"�´�\V\�
�LÈì��µ
%!preproc(html): ’^%html% ’ ’’
ÏLw«�(²§ù�LÈì==3HTML��8I�ª��A^"u´
mÞ�z©Ò�£Ø§ù1�/-¹0§Ø2´5º"
8.3 ¦^%!PreProcUCtxt2tagsIP
éu,�KL�ª�5`§¦�±g1½� ©���{§òtxt2tags�
%@IP?U�gCU��IP"
Þ�~f§ u1Ä��Lδ%@�Ú^IP§XJ^rØU�§½ö
Ù?6ì'u�LÎkÛ%��½§¦�±½Â��#�IP5IPÚ^�"
'X¦ÀJ^^ u1Ä�/>>>05��Ú^IP§@o¦�I½Â��{
ü�LÈìµ
1lÙ ç { 56
%!PreProc: ’>>> ’ ’\t’
©�p¡�Ú^©�/Xµ
>>> This is a quoted text.
>>> The user defined this strange mark.
>>> But they will be converted to TABs by PreProc.
3)Û�c§ù=É�/>>>0ÎÒ¬�gÄ�O���LΧtxt2tagsK
£OÑÚ^IP"
�5¿µ4à�PreProc5K¬UC��IP�{§$�¬3IP
�c�)Àâ§Ïd3¦^cÖ7�%>&"
1ÊÙ ^�{¤
Txt2tags�1��úmuÙ���version 0.1 ´32001c7�§, Ù�.
K'ù��m@þ���c,,
�Ùò�+\pA^�l�Ð��.��c���uÐL§"
9.1 1999c1�µ¤c{¤
�ö�µ /·�Ð'u?���©�=�óä�}Á©u1999c§åÐ�
´��{ü�!õUk��Bourne Shell��§^5òIP©�=�
�HTML�"í´�§ØL´q��txt2html�ó䧮²kÃê<ZLù
�¯�,,{ü�`§§�U£O{ü�IP'X*bold*!/italic/!
under §±9=Â;.�HTMLAÏiÎX< & >"ØN�éj§�´�
·�c�Q§;)0
9.2 1999c6�µ�,´¤c{¤
�ö��`µ /A��L�§'uSGML�\DÁUX/�ìv·¤?�
�Conectiva úi§u´�5�txt2htmlC¤txt2sgml��"@�·�3
ÆSSED§Ïdtxt2sgmlÒ¤��1101�Bourne Shell��§Ù¥�¹
NõSED·-"0
5µSED´UNIXe�6?6ì§^5?1©��gÄz?6"
ù�U?��SGML��|±�õ�©�(�§'X�L!��Ú^��"
3e¡ù�«~¥§®²�±w�txt2tagsIP�Ö/µ
* This was a bold line (BOLD line oriented? Well...)
57
1ÊÙ ^�{¤ 58
--
- bullet list was very similar to txt2tags list
- but with these -- to begin and close a list
--
=----------------------
Verbatim text was delimited by the =-- pattern.
The other ------- were just cosmetic.
=----------------------
�,ØN�éj"�´��e5Ò´y����Ú,,
9.3 2000cl�µØ2´¤c{¤
�öq`µ /�c±�§@�·��OþSED§u´·òtxt2sgml.sh ��
�§C¤���¹3501�X{�SED��"�-Ä<%�A5�\\
?5§'Xµsubsection!URL£OÚf�L£�Li@¤"·^òC�
�c��m5¦^ÚU?ù���"0
��txt2sgml.sed�«~©�µ
* Hey, here are the first 3 magic lines
* The document title / author / date
* But they required those asterisks at the beginning
MAIN TITLE
Titles were made by uppercase-only lines. Subtitles were identified by
leading spaces. Each space denoted a new sublevel. The beautifiers:
*bold*, **strong**, "italic" and ‘typewriter‘.
- lists
+ sublists
= and subsublists (by identifier, not indentation)
1ÊÙ ^�{¤ 59
Two blank lines to close lists. Links as www.example.com and e-mails
were recognized automagically by regular expressions. And there was a
strange image mark:
%%image: path/to/image.jpg
9.4 2001c5�µPythonzÚõ8I�ª��{
y3´X3`{Qº /@�·m©Ä)�5Regular Expression book6ù�
Ö"·E,¦^txt2sgml.sed�IP©��ª§ò©�=��SGML�
ª§,�^sgml2htmlóä=��HTML§23èAì¥/¯��0u
�(J"Ï�/¯�0�/sgml2html0¿Ø�Χ·ògC�SED��
?U�txt2html.sedóä§^5���)HTML©�,,�´Ñ�û¦
^Adobe PageMaker5ü�Ö7§ù�£·ù��Linux^r"3Ч·
uyPageMaker¦^�´�«aquHTML�IP�ó§u´��·�
n��q�SED��§^5ò©�=��SGML!HTMLÚPageMaker§d
�^�Shell��5)¤8¹L§±9?1��?n"Ö�����
�ÿ§·�)òùü��óäÜ¿å5��{§¿�ÀJ^Python5
�¤ù�ó�"u´§TXT2TAGS�)"0
9.5 2001c7�µ0.xX�µtxt2tags�?åD£úm
uÙ¤
´�§Ò´¦3`µ /·�@�Ö�u1�m£7�31F¤§�txt2tags�1��
��0.1��uÙ�m£7�26F¤���AU))Ù¥���6u,��§
%´�å¤��"ØSGML!HTMLÚPageMaker�§Ù¦�8I�ª
��¿¢yµMoinMoin!MagicPoint±9X©�"�e���cõ�m
p§0.xX���õ��uÙ§§S�Åì��µ#�8I�ªUNIXÃ
þ�§÷%%date§L�|±§Äu���¦^��§ã¡�UéàÚ)¤
8¹L§ùõU��¢y"30.2��¥§��Shell���V\?5�
��§?1©�ö�Ú·-1À��?n))ù����ÏÃ�´Ï�
·´�ShellPç%´��Pythonèj"���0.9��§txt2tagsâq£
�100%�Python�è"0
1ÊÙ ^�{¤ 60
9.6 2002c9�µ1.xX�µ¤�
\´Ä®²vF%fe�º /txt2tags����y²´Ð�§·û½@ý�
5é��"I�?1�e�Ú´Ñu§S§ò§w��.µ·I�©��
u´§§S��Õþ�§e��L£=�ÚÄ:ß�¤ïáå5§^r
�H��)"^r+¤�å5§¿���8�ÑNõ�z"´�§·
�§ùy²ù ¿�´k^�"1.x��V\�#A5�)µã/^r��
£GUI¤§WindowsÚMacXÚ�£�§LaTeX8I�ª§%!style�½�§
include·-Úr��Pre/PostLÈì"0
9.7 2004�7�µ2.xX�µ¤Ù
Ðj§·�`��Z�Hµ /¤�´ÛA qqJ�"·`L·´�Pythonè
jéjºy3·Cr§, L ��Ø\Èå5§u´Ã�;��§
�è7LÄ�g�Ãâ"ù�g�¦��IP�oN5C�§u´
·�Mï��,?��"ù�gѤé���m§�´2.0��ªu�
´uÙ§§�5êØ��#A5§ÃXµXHTML8I�ª§W3C�
yè§i18n§±9RC©�"�Èìèò§S��±9©��Ȥõ«�
ó"LOUT8I�ª�V\?5§d�k#�÷µ%%mtime!%%infile!
%%outfile§±9%%toc"���Y,,0
The End (�w ©�)
È©���g?¾uµ2009-03-23 15:07:25