/doc/English/writing-book.html

http://txt2tags.googlecode.com/ · HTML · 455 lines · 439 code · 13 blank · 3 comment · 0 complexity · 1644b2a4b219e0da2d5d9dfc40c1ef21 MD5 · raw file

  1. <?xml version="1.0"
  2. ?>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <title>Writing Books with Txt2tags</title>
  7. <meta name="generator" content="http://txt2tags.org" />
  8. <!-- Included writing-book.css -->
  9. <style type="text/css">
  10. body
  11. {
  12. font: normal 14pt sans-serif;
  13. text-align:justify;
  14. margin: 3em;
  15. padding: 3em 4em 2em 4em;
  16. border: 1px solid black;
  17. }
  18. #toc ol
  19. {
  20. padding: 2em;
  21. }
  22. #body h1
  23. {
  24. border-width: 0px 0px 1px 0px;
  25. border-style: solid;
  26. margin-top: 3em;
  27. }
  28. #body p, #body ul, #body ol
  29. {
  30. margin-left: 3em;
  31. }
  32. #body li
  33. {
  34. /* to make IE happy */
  35. margin-top: 1em;
  36. }
  37. a
  38. {
  39. text-decoration: none;
  40. }
  41. blockquote
  42. {
  43. margin-left: 5em;
  44. margin-top:2em;
  45. font-style:italic;
  46. }
  47. code
  48. {
  49. font-style:italic;
  50. }
  51. hr
  52. {
  53. margin-top:3em;
  54. }
  55. </style>
  56. </head>
  57. <body>
  58. <div class="header" id="header">
  59. <h1>Writing Books with Txt2tags</h1>
  60. <h3>by Aurelio Jargas</h3>
  61. </div>
  62. <div class="toc" id="toc">
  63. <ol>
  64. <li><a href="#toc1">Preface</a>
  65. </li>
  66. <li><a href="#toc2">Visual Editors VS Markup</a>
  67. </li>
  68. <li><a href="#toc3">The Txt2tags Approach</a>
  69. </li>
  70. <li><a href="#toc4">Fast and Furious</a>
  71. </li>
  72. <li><a href="#toc5">Organize the Sources in Folders</a>
  73. </li>
  74. <li><a href="#toc6">Version Control Made Easy</a>
  75. </li>
  76. <li><a href="#toc7">Quality Matters</a>
  77. </li>
  78. <li><a href="#toc8">Other Advantages</a>
  79. </li>
  80. <li><a href="#toc9">No Tool Fits All Needs</a>
  81. </li>
  82. </ol>
  83. </div>
  84. <div class="body" id="body">
  85. <blockquote>
  86. This document is a quick guide showing the benefits of using
  87. the txt2tags tool on the book writing process. Also applicable
  88. for other large documents as Guides and Thesis.
  89. </blockquote>
  90. <p></p>
  91. <a id="toc1" name="toc1"></a>
  92. <h1>1. Preface</h1>
  93. <p>
  94. I'm the txt2tags<code>[1]</code> author and I wrote two published papers using
  95. it: a <a href="http://guia-er.sourceforge.net/">Regular Expressions book</a> (96 pages) and a Shell
  96. Programming Course (108 pages). The writing process was smooth and
  97. painless, so I want to share this experience.
  98. </p>
  99. <p>
  100. A book is a real big work to get done, but it doesn't have to be a
  101. complicated process. To write is to organize ideas into text
  102. structures like sections, paragraphs and lists. Txt2tags is a tool
  103. that makes this task simple and easy.
  104. </p>
  105. <p>
  106. Writing alone or in a team, with or without version control, technical
  107. contents or not, text-only or graphics-enabled. In any case txt2tags
  108. can be used as the main tool for the book creation.
  109. </p>
  110. <p>
  111. There is <a href="http://www.picocontainer.org/Contructor+Dependency+Injection+...+Book+Announcement">a book</a> being written right now, using txt2tags.
  112. </p>
  113. <blockquote>
  114. <code>[1]</code> Txt2tags reads a text file with minimal markup as
  115. **bold** and //italic// and converts it to documents
  116. like HTML, LaTeX and Adobe PageMaker. More info:
  117. <a href="http://txt2tags.org">http://txt2tags.org</a>.
  118. </blockquote>
  119. <p></p>
  120. <a id="toc2" name="toc2"></a>
  121. <h1>2. Visual Editors VS Markup</h1>
  122. <p>
  123. The two common ways of writing a book are to use a Visual Editor
  124. (<i>Microsoft Word</i>, <i>Adobe Pagemaker</i>) or a Markup Language
  125. (<i>LaTeX</i>, <i>docbook</i>).
  126. </p>
  127. <p>
  128. In Visual Editors you write and format the contents at the same time.
  129. This approach is nice for small texts, but for a 300 pages book, the
  130. formatting consume time and distract the writer.
  131. </p>
  132. <p>
  133. In Markup Languages you write contents and mark it up, so an external
  134. program will convert it to the final form. The writer don't mind about
  135. formatting, but the process of including <code>&lt;tags&gt;&lt;/tags&gt;</code> and
  136. <code>\more{tags}</code> is error prone and very intrusive, making the contents
  137. hard to read on the sources.
  138. </p>
  139. <p>
  140. Txt2tags also uses the markup schema, but the big difference is that
  141. its marks are very minimal, some indeed are almost natural, as using
  142. the hyphen for list items. So the writer can focus on contents only
  143. and the source remains readable.
  144. </p>
  145. <a id="toc3" name="toc3"></a>
  146. <h1>3. The Txt2tags Approach</h1>
  147. <p>
  148. Using txt2tags, the book writing process follow these steps:
  149. </p>
  150. <ol>
  151. <li>The author(s) learn the very simple txt2tags markup rules.
  152. <p></p>
  153. </li>
  154. <li>The author writes the book contents, forgetting about noises
  155. like page margin, font face, colors and sizes.
  156. <p></p>
  157. </li>
  158. <li>The author (or the publisher) open the contents on a graphical text
  159. processor that reads HTML (or LaTeX or ...) and conclude the book
  160. formatting.
  161. </li>
  162. </ol>
  163. <p>
  164. Step 1 is fast, just a few minutes. Step 2 will take months, and step
  165. 3 can take days or weeks.
  166. </p>
  167. <p>
  168. Writing contents is when you will spend more time on the book, so it
  169. is really important to make this process a simple, productive and
  170. pleasant task.
  171. </p>
  172. <p>
  173. The following are arguments showing that txt2tags can be used to
  174. achieve that.
  175. </p>
  176. <a id="toc4" name="toc4"></a>
  177. <h1>4. Fast and Furious</h1>
  178. <p>
  179. Time is the key. Using txt2tags you will experience a very high
  180. productivity period because you write contents, not formatting.
  181. </p>
  182. <ul>
  183. <li><b>Initial Release Fast</b>
  184. <p></p>
  185. It is very difficult to start something, but txt2tags has a nice
  186. approach to this problem. Just sit and write plain text. When you're
  187. done, in a few minutes you can add all the txt2tags marks on the
  188. text and the document is ready to be converted and published.
  189. <p></p>
  190. </li>
  191. <li><b>Fast Snapshot Preview</b>
  192. <p></p>
  193. No matter which will be the final book format, HTML is the preferred
  194. format to use on the writing time. A snapshot of the current book
  195. state can be done at any time, converting the sources to an HTML
  196. page, so any system with a browser can read it. If you need a
  197. printable version, convert the HTML to PDF with the excellent
  198. <a href="http://www.easysw.com/htmldoc/">htmldoc</a> tool.
  199. <p></p>
  200. </li>
  201. <li><b>Book Contents Overview</b>
  202. <p></p>
  203. To quickly have a global overview of the book contents at any time,
  204. just use the txt2tags <i>TOC Only</i> feature. The program shows the
  205. current Table of Contents for the book, with the listing of chapters
  206. and sections, numbered or not, at any depth.
  207. <p></p>
  208. </li>
  209. <li><b>Fast Writing</b>
  210. <p></p>
  211. Txt2tags marks are simple and minimalist, very easy to learn. No
  212. names, no options, no parameters. You don't have to stop writing
  213. contents to insert marks, they flow together with the text. If you
  214. don't remember a specific mark at the moment, forget about it and
  215. keep writing. At the end you do a global review on the text and
  216. quickly insert the missing marks.
  217. <p></p>
  218. </li>
  219. <li><b>Fast Conversion</b>
  220. <p></p>
  221. Even if you have a 500 pages book, the conversion process will take
  222. just a moment. It is because txt2tags acts as a filter, converting
  223. from one format to another. It does not index, compile, calculate,
  224. compress, draw or do any strong processing on the sources. No more
  225. library, catalog, schema and DTD nightmares.
  226. </li>
  227. </ul>
  228. <a id="toc5" name="toc5"></a>
  229. <h1>5. Organize the Sources in Folders</h1>
  230. <p>
  231. Txt2tags has a built in command to include external files in any part
  232. of a document, at conversion time. It makes possible to split the
  233. sources into several files.
  234. </p>
  235. <ul>
  236. <li><b>Each chapter in a folder</b>
  237. <p></p>
  238. You can make a folder for each chapter, storing the sources in a
  239. structured tree. Inside the chapter folder, you can even create
  240. subfolders to store images, configuration and included files.
  241. <p></p>
  242. </li>
  243. <li><b>No file conflicts</b>
  244. <p></p>
  245. Separating chapters, different teams can work in different chapters
  246. with no interaction between them. Each team work on its own folder,
  247. avoiding file conflicts due concurrent changes.
  248. <p></p>
  249. </li>
  250. <li><b>Flexible access control</b>
  251. <p></p>
  252. Files and folders organized, you can implement access control rules,
  253. setting up properties and permissions for any file or chapter. Do
  254. use the standard system tools to configure the read/write
  255. permissions, like the "users and groups" schema.
  256. <p></p>
  257. </li>
  258. <li><b>Global view of sources</b>
  259. <p></p>
  260. Structuring the sources also helps to have a global view of the
  261. book, using any file browser to quickly know the amount of text and
  262. images of any chapter. (Hint: on UNIX, <code>find</code> and <code>du</code> commands)
  263. <p></p>
  264. </li>
  265. <li><b>Work your chapter, forget the others</b>
  266. <p></p>
  267. Separating sources into files, you can convert your chapter alone,
  268. not needing to wait for the full book processing. Besides faster
  269. to convert, the chapter alone can be sent to reviewers or be
  270. published alone, as a sample of the full book.
  271. <p></p>
  272. </li>
  273. <li><b>You separate, txt2tags joins</b>
  274. <p></p>
  275. When converting, txt2tags will automatically join all the chapters
  276. into the final book, no matter how deep or large is the folder
  277. tree.
  278. </li>
  279. </ul>
  280. <a id="toc6" name="toc6"></a>
  281. <h1>6. Version Control Made Easy</h1>
  282. <p>
  283. Txt2tags helps the book version control with line based tools (as
  284. <i>CVS</i> and <i>Subversion</i>). The sources are plain text, not compiled
  285. data.
  286. </p>
  287. <ul>
  288. <li><b>Work with short lines</b>
  289. <p></p>
  290. You can make short lines, breaking them at 72 columns. It will help
  291. on the revision control, because it is line based. If the final
  292. format needs that a paragraph is composed by a single long line (as
  293. PageMaker), txt2tags will join them to you automatically.
  294. <p></p>
  295. </li>
  296. <li><b>Readable sources</b>
  297. <p></p>
  298. With very minimal markup, the sources are readable. One can easily
  299. see what has changed from one version to another, the marks don't
  300. hide or pollute the text.
  301. <p></p>
  302. </li>
  303. <li><b>Large contents, small sources</b>
  304. <p></p>
  305. As plain text, you can have a huge amount of contents, with a low
  306. disk usage. People can do full checkouts and commits even in slow
  307. connections.
  308. <p></p>
  309. </li>
  310. <li><b>Chapter versioning</b>
  311. <p></p>
  312. As seen before, the sources can be organized into folders. This
  313. makes version control separated by chapter, or even sections of
  314. chapters, depending on how granulated you need the versioning.
  315. </li>
  316. </ul>
  317. <a id="toc7" name="toc7"></a>
  318. <h1>7. Quality Matters</h1>
  319. <p>
  320. You can write a book. Or you can write THE book. Txt2tags has nice
  321. built in features to increase your work quality.
  322. </p>
  323. <ul>
  324. <li><b>Spell Check</b>
  325. <p></p>
  326. As all txt2tags marks are symbols and not words, you can use any
  327. spell checker on the sources. It will take care of the text only,
  328. not trying to correct tags.
  329. <p></p>
  330. </li>
  331. <li><b>Alias Database</b>
  332. <p></p>
  333. Txt2tags has <i>Pre Processing Filters</i>, where you can define
  334. keyword/value pairs. Wherever the keyword is found on the sources, it
  335. is expanded to the given value at conversion time. For example, you
  336. do use the string <code>URL_GOOGLE</code> on your text and it will appear as
  337. <code>http://www.google.com</code> on the book. If the Google URL changes,
  338. you just change the filter definition and all occurrences of it will
  339. be updated. You can define as many keywords as needed, with no
  340. maximum limit.
  341. <p></p>
  342. </li>
  343. <li><b>Dynamic Content</b>
  344. <p></p>
  345. Txt2tags also has a command to include pre-formatted text into the
  346. document when converting it, for example, a software source code
  347. sample. This way you can keep this code sample separated from the
  348. book text and update it by hand or even automatically. A nice idea
  349. is to mark the software source code with special comments, and a
  350. little program extract these marked parts into separate files.
  351. <p></p>
  352. </li>
  353. <li><b>Control Over the Result</b>
  354. <p></p>
  355. Txt2tags has <i>Post Processing Filters</i>, where you can define rules
  356. that makes adjustments on the resulting document. So if the standard
  357. txt2tags conversion does not fully satisfy your needs, you can
  358. improve it with your own filters. You can use the power of the
  359. Regular Expressions to match patterns.
  360. </li>
  361. </ul>
  362. <a id="toc8" name="toc8"></a>
  363. <h1>8. Other Advantages</h1>
  364. <p>
  365. And there is more!
  366. </p>
  367. <ul>
  368. <li><b>Separate Formatting from Contents</b>
  369. <p></p>
  370. Using HTML as the development target format, you can also use CSS
  371. files to experiment different book looks. CSS defines formating for
  372. HTML pages, and there is graphical editors to create CSS files.
  373. A team of designers can work on doing CSS files for the book, while
  374. the writers keep writing.
  375. <p></p>
  376. </li>
  377. <li><b>Include Complicated Structures</b>
  378. <p></p>
  379. Txt2tags does have support for all the common structures used in
  380. texts: lists, definitions, quotation, verbatim area and tables. But
  381. if some parts of your book requires a more complicated structure,
  382. you can use the <i>Tagged Include</i> feature, where you insert text
  383. that is already tagged, like a real fancy HTML table. With txt2tags,
  384. exceptions are not a problem!
  385. <p></p>
  386. </li>
  387. <li><b>Do Use Any Editor</b>
  388. <p></p>
  389. As plain text source files, even the most modest text editor in the
  390. world can be used to write the book. It doesn't have to have any
  391. feature besides write and save text. If you use the editors with
  392. txt2tags support, you will have <i>Syntax Highlight</i>, which helps to
  393. identify the txt2tags marks. They are: Vim, Emacs, Kate, Nano, gedit
  394. and TextMate.
  395. <p></p>
  396. </li>
  397. <li><b>Technical Support</b>
  398. <p></p>
  399. Txt2tags has various channels to get technical support: two mailing
  400. lists (english and portuguese), an IRC channel and even an Orkut
  401. community. And for book projects, your can send direct e-mails to
  402. the program author, who will give priority on the answer.
  403. </li>
  404. </ul>
  405. <a id="toc9" name="toc9"></a>
  406. <h1>9. No Tool Fits All Needs</h1>
  407. <p>
  408. There are some special cases where txt2tags is not a good tool for
  409. writing books.
  410. </p>
  411. <ul>
  412. <li><b>Very Complex Books</b>
  413. <p></p>
  414. Books that uses lots of complicated tables, formulas or specific
  415. structures, needs a graphical editor or a more complex markup
  416. language, as LaTeX. If your book matches this description, txt2tags cannot help you.
  417. <p></p>
  418. </li>
  419. <li><b>Footnotes</b>
  420. <p></p>
  421. Txt2tags does not have footnotes support. If you will use just a
  422. few, you can add them later. But if you plan to make an intense
  423. footnotes use, txt2tags cannot help you.
  424. <p></p>
  425. </li>
  426. <li><b>References for Pages, Tables and Images</b>
  427. <p></p>
  428. One can use a graphical editor at the publishing time to include
  429. indexes for pages, tables and images, no problem at all. But if you
  430. plan to refer to them inside the text like
  431. "<i>See table 4.11 on page 35</i>", txt2tags cannot help you.
  432. </li>
  433. </ul>
  434. <hr class="light" />
  435. <p>
  436. <i>Writing Books with Txt2tags - Oct/2004</i>
  437. (<a href="writing-book.t2t">see source</a>)
  438. </p>
  439. </div>
  440. <!-- xhtml code generated by txt2tags 2.6b (http://txt2tags.org) -->
  441. <!-- cmdline: txt2tags writing-book.t2t -->
  442. </body></html>