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