Reference.te 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. #Introduction
  2. <+Tristes armas
  3. <+ si no son las palabras
  4. <+Miguel Hernández
  5. Tedi was created from the need of a faster development of my own website (more than five ago).
  6. I know that there were plenty of CMS that just work. Some years later I divided files into two parts (content and layout). First came Maquetador, as a first try to update faster the website. This made me realize that I could create a new markup language that compresses content files in a cleaner way.
  7. With this idea the language started as a lightweight and easier HTML. As it got new tags and programs, I started using it also as an alternative to Latex. (I don't like Latex).
  8. This generated the last idea for the language, a language meant to be converted to others called Tedi.
  9. Tedi has been in use more than five years, and it seems that won't be stopped that easily. There were some changes really interesting that I'll detail when they get available.
  10. First change was erasing !head and !end tags. This allowed detect Tedi files. Also image tag was
  11. "modified from (image.png) to ([Alternative text] image.png)."
  12. Next changes were create new tag called metatag with line break. This allowed user to add line breaks or not to lines with metatags.
  13. #Tedi
  14. Tedi is a markup language that can be used for note taking and create a scientific paper with the smallest set of tags possible.
  15. Tags
  16. Tags are a group of elements that allows an algorithm use an specific rule inside a region.
  17. ##Basic tags
  18. These tags were the first subgroup that were implemented. They are the smallest subset of functionality of a markup language without losing readability.
  19. ###Titles
  20. Titles help the writer to organize better the information in file.
  21. Syntax:
  22. <+#First
  23. <+##Subtitle
  24. <+###Subsubtitle
  25. It will be converted only if it's the first tag of the line. Next line won't be converted as a title.
  26. <+[(https://example.org/) ##Example)
  27. Next line will be converted as a title.
  28. <+##[(https://example.org) text)
  29. ###Links
  30. Links were meant for connect one part of the document with other part or a website.
  31. Tag is used like this:
  32. <+[(Link) Text]
  33. By default all links are document internal.
  34. As an example:
  35. <+[(https://example.org) Example] is very useful.
  36. Previous line is converted like this
  37. [(https://example.org) Example] is very useful.
  38. ###Images
  39. Tag is
  40. <+([Text describing image] image.png)
  41. Preferred formats are PNG, JPG and SVG.
  42. ###Containers
  43. Containers are tags that divide file into pieces that can be used for new user specific rules. Similar to divs in HTML.
  44. It's written like this
  45. <+{(class) text}
  46. Class is an identifier for that specific part of the document.
  47. ###Lists
  48. Lists are represented with three tags.
  49. __
  50. -- The first tag for a list is
  51. < __
  52. . Without it lists aren't going to start properly.
  53. -- Every item must be preceded with
  54. < --
  55. .
  56. -- The last tag is
  57. < ,,
  58. . Used it when want to end the list.
  59. ,,
  60. All lists by default are unordered and if prefer using an ordered list you must use a other language specific tag.
  61. <+__
  62. <+-- First item
  63. <+-- Second item
  64. <+,,
  65. Results are:
  66. __
  67. -- First item
  68. -- Second item
  69. ,,
  70. ##Control tags
  71. Control tags are useful to control the conversion process of the text. This is the most difficult part of the language but for every user luck, they aren't that necessary except quotes and metatags.
  72. These tags should be used with care because some could trigger some incompatibilities with some conversions. Every tag in this type are only valid if are written at the start of the line.
  73. ###Embed tag
  74. This tag allows embed code from other languages. It avoids conversions and leave it unchanged.
  75. As an example
  76. <+<> \LaTeX
  77. This will get to
  78. <> \LaTeX
  79. This tag makes special limitations to conversions. It was designed to take advantage of Latex math formula.
  80. ###Comments
  81. Comments were added because copyright, add some specific details and to point out other languages tags used in embed tags.
  82. Example:
  83. <+<! Comments are social networking of programmers.
  84. <! Comments are social networking of programmers.
  85. Missing because it's a comment read source code at [(https://notabug.org/alkeon/tedi) git page].
  86. ###Quotes
  87. Quotes are partial control tags. Valid use is when line start with a quotation mark and ends with other quotation mark.
  88. Between this characters, containers, links and images tags aren't converted and are leave like they were written.
  89. <+"4 + [(3 + 6) * 2]"
  90. It will show like this:
  91. "4 + [(3 + 6) * 2] "
  92. If wanna add a line break to a quoted line just append a white space before last quotation mark.
  93. ###Metatag
  94. Metatag is a tag created at first public version of this document. This tag define a piece of text that tags won't be checked.
  95. Syntax is
  96. <+<Metatag is written with < and allows you to
  97. <+write |, # and a group of tags without converting them
  98. Conversion is like this:
  99. <+Metatag is written with < and allows you to
  100. <+write |, # and a group of tags without converting them
  101. Metatag with line break is:
  102. <+<+ This is a metatag '<+' with line break
  103. As a result it shows this:
  104. <+ This is a metatag '<+' with line break
  105. ##Special tags
  106. Special tags were the last tags added to Tedi. In spite of being the last one, some of them are really necessary to modern languages like tables and dividing parts of document into some pieces.
  107. ####Tables
  108. Simple and easy to use tables:
  109. <+Tables are text enclosed between | characters.
  110. They can be used like this:
  111. <+| 1 | 2 |
  112. <+| 3 | 4 |
  113. That will be converted to:
  114. | 1 | 2 |
  115. | 3 | 4 |
  116. ####Line break
  117. Writer can force a line break leaving a white space as last character.
  118. Example:
  119. <+One line
  120. <+Other
  121. Result:
  122. One line
  123. Other
  124. ####Insert
  125. This tag is a way to combine multiples files into a single file. Only Tedi files are allowed.
  126. Syntax:
  127. < +document.te
  128. Before filename must have a '+' symbol without white spaces and user must ensure file exist.
  129. Inserted file is preprocessed to avoid possible fails.
  130. ##Recommended style
  131. When writing a Tedi document, it's recommended follow a coding style for a better performance.
  132. All users should use Tedi as they want to but it's easy to work with some rules.
  133. __
  134. --Do not use other specific language line breaks, user Tedi line breaks every time you can.
  135. --Limit titles sublevels to 4, it isn't recommended more sublevels.
  136. --Prefer quotes over metatags.
  137. --Limit your metatags line to 80 characters.
  138. --Use .te extension to Tedi files.
  139. --Use comments to point out which language is use in embedded tags.
  140. --Never insert a Tedi file into a Tedi file.
  141. ,,