1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
|
<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.t2t</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (txt2tags) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#ca60ca">header-line1:</span><span style="color:#898887"> document title</span>
<span style="color:#ca60ca">header-line2:</span><span style="color:#898887"> author name, email</span>
<span style="color:#ca60ca">header-line3:</span><span style="color:#898887"> date, version</span>
txt2tags sample
<span style="color:#898887">% Comment Line </span><span style="color:#e85848;background-color:#451e1a;font-weight:bold">ALERT</span><span style="color:#898887"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">TODO</span><span style="color:#898887"> </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold">FIXME</span>
<span style="color:#898887">%%%</span>
<span style="color:#898887">Comment Block</span>
<span style="color:#898887">%%%</span>
<span style="color:#898887">%!--includeconf: config.t2t</span>
<span style="color:#898887">% disabled here because there is no external file</span>
<span style="color:#006e28">%!preproc:</span><span style="color:#898887"> 'JUST A TEST' ' '</span>
<span style="color:#006e28">%!postproc:</span><span style="color:#898887"> '(?i)(<body)' '\1 id="shots"'</span>
<span style="color:#006e28">%!postproc:</span><span style="color:#898887"> '(?i)(</title>)' ' shots\1'</span>
<span style="color:#898887">%!--include: menu.t2t</span>
<span style="color:#644a9b;font-weight:bold">= Title 1 =</span>
<span style="color:#644a9b;font-weight:bold">== My Subtitle 1 ==[some definition]</span>
Some examples:
<span style="color:#ff5500;font-weight:bold">- </span>A paragraph with <span style="font-weight:bold">**bold**</span>, <span style="font-style:italic">//italic//</span> and <span style="text-decoration:line-through">--strike--</span>.
<span style="color:#ff5500;font-weight:bold">- </span>You can even <span style="text-decoration:underline">__underline your docs__</span>!
<span style="color:#ff5500;font-weight:bold">- </span>And use <span style="font-weight:bold;font-style:italic">**//bold and italic//**</span>
<span style="color:#ff5500;font-weight:bold">- </span>or <span style="font-weight:bold;font-style:italic">//**italic and bold**//</span>
Here is a nice pic: <span style="color:#006e28">[img/t2tpowered.png]</span>.
<span style="color:#ff5500;font-weight:bold">- </span>And a <span style="color:#006e28">[link to a cool website </span><span style="color:#006e28;text-decoration:underline">http://txt2tags.sf.net</span><span style="color:#006e28">]</span>!
<span style="color:#ff5500;font-weight:bold">- </span>A table :
<span style="color:#bf0303"> || Name | Age | Gender |</span>
<span style="color:#bf0303"> | John | 33 | Male |</span>
<span style="color:#bf0303"> | Mary | 19 | Female |</span>
<span style="color:#b08000">``` A verbatim line</span>
And it's working for <span style="color:#b08000">``special code``</span> like this.
<span style="color:#b08000">```</span>
<span style="color:#b08000">A verbatim block</span>
<span style="color:#b08000">```</span>
Raw strings:
<span style="color:#e31616">""" A raw line</span>
<span style="color:#e31616">"""</span>
<span style="color:#e31616">A raw block</span>
<span style="color:#e31616">"""</span>
Tagged strings:
<span style="color:#e31616">''' A tagged line</span>
<span style="color:#e31616">'''</span>
<span style="color:#e31616">A tagged block</span>
<span style="color:#e31616">'''</span>
And remember,
<span style="color:#0057ae"> A TAB in front of the line does a quotation.</span>
<span style="color:#0057ae"> More TABs, more depth (if allowed).</span>
Horizontal lines:
<span style="font-weight:bold">--------------------------------------------------------</span>
^ thin or large v
<span style="font-weight:bold">========================================================</span>
<span style="color:#644a9b;font-weight:bold">== My Subtitle 2 ==</span>
Lorem ipsum etc
Lorem ipsum etc Lorem ipsum etc
<span style="color:#ff5500;font-weight:bold">- </span>Test d'écriture avec des accents à la française. Ça marche ou pas ?
<span style="color:#644a9b;font-weight:bold">== My Subtitle 3 ==</span>
Lorem ipsum etc
Lorem ipsum etc
Here is a direct link: <span style="text-decoration:underline">http://kde.org</span>
<span style="color:#ff5500;font-weight:bold">- </span>Another boring part...
<span style="color:#644a9b;font-weight:bold">=== My Subsubtitle 1 ===</span>
<span style="font-style:italic">//It's a level 3 header//</span>
<span style="color:#ff5500;font-weight:bold">- </span>list 1
<span style="color:#ff5500;font-weight:bold">- </span>list 2
<span style="color:#ff5500;font-weight:bold"> - </span>list 2b
<span style="color:#ff5500;font-weight:bold">- </span>list 3
<span style="color:#644a9b;font-weight:bold">=== My Subsubtitle 2 ===</span>
<span style="font-style:italic">//It's another level 3 header//</span>
<span style="color:#ff5500;font-weight:bold">+ </span>ordered list 1
<span style="color:#ff5500;font-weight:bold">+ </span>list 2
<span style="color:#ff5500;font-weight:bold"> + </span>list 2B
<span style="color:#ff5500;font-weight:bold"> + </span>list 2C
<span style="color:#ff5500;font-weight:bold">+ </span>list 3
<span style="color:#644a9b;font-weight:bold">== My Subtitle 4 ==</span>
The handy <span style="color:#b08000">``%%date``</span> macro expands to the current date.
So today is <span style="color:#0057ae">%%date</span> on the ISO <span style="color:#b08000">``YYYYMMDD``</span> format.
You can also specify the date format with the %? flags,
as <span style="color:#b08000">``%%date(%m-%d-%Y)``</span> which gives: <span style="color:#0057ae">%%date(%m-%d-%Y)</span>.
<span style="color:#644a9b;font-weight:bold">= Images =</span>
The image mark is as simple as it can be: <span style="color:#b08000">``[filename]``</span>.
<span style="color:#006e28">[img/photo.jpg]</span>
And with some targets the image is linkable :
<span style="color:#006e28">[[img/photo.jpg] </span><span style="color:#006e28;text-decoration:underline">http://www.txt2tags.org</span><span style="color:#006e28">]</span>
<span style="color:#644a9b;font-weight:bold">= Tables =</span>
Use pipes to compose table rows and cells.
Double pipe at the line beginning starts a heading row.
Natural spaces specify each cell alignment.
<span style="color:#bf0303"> | cell 1.1 | cell 1.2 | cell 1.3 |</span>
<span style="color:#bf0303"> | cell 2.1 | cell 2.2 | cell 2.3 |</span>
<span style="color:#bf0303"> | cell 3.1 | cell 3.2 | cell 3.3 |</span>
<span style="color:#bf0303">|| heading 1 | heading 2 | heading 3 |</span>
<span style="color:#bf0303"> | cell 1.1 | cell 1.2 | cell 1.3 |</span>
<span style="color:#bf0303"> | cell 2.1 | cell 2.2 | cell 2.3 |</span>
<span style="color:#bf0303"> |_ heading 1 | cell 1.1 | cell 1.2 |</span>
<span style="color:#bf0303"> | heading 2 | cell 2.1 | cell 2.2 |</span>
<span style="color:#bf0303"> | heading 3 | cell 3.1 | cell 3.2 |</span>
<span style="color:#bf0303">|/ heading | heading 1 | heading 2 |</span>
<span style="color:#bf0303"> | heading 1 | cell 1.1 | cell 1.2 |</span>
<span style="color:#bf0303"> | heading 2 | cell 2.1 | cell 2.2 |</span>
Without the last pipe, no border:
<span style="color:#bf0303"> | cell 1.1 | cell 1.2 | cell 1.3</span>
<span style="color:#bf0303"> | cell 2.1 | cell 2.2 | cell 2.3</span>
<span style="color:#bf0303"> | cell 3.1 | cell 3.2 | cell 3.3</span>
<span style="color:#bf0303">|| heading 1 | heading 2 | heading 3</span>
<span style="color:#bf0303"> | cell 1.1 | cell 1.2 | cell 1.3</span>
<span style="color:#bf0303"> | cell 2.1 | cell 2.2 | cell 2.3</span>
<span style="color:#bf0303"> |_ heading 1 | cell 1.1 | cell 1.2</span>
<span style="color:#bf0303"> | heading 2 | cell 2.1 | cell 2.2</span>
<span style="color:#bf0303"> | heading 3 | cell 3.1 | cell 3.2</span>
<span style="color:#bf0303">|/ heading | heading 1 | heading 2</span>
<span style="color:#bf0303"> | heading 1 | cell 1.1 | cell 1.2</span>
<span style="color:#bf0303"> | heading 2 | cell 2.1 | cell 2.2</span>
<span style="color:#644a9b;font-weight:bold">= Other Title =</span>
nothing to say here...
</pre></body></html>
|