This file is indexed.

/usr/share/doc/tdiary/HOWTO-write-tDiary.en.html is in tdiary 3.2.2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ja-JP">
<head>
<title>HOWTO-write-tDiary.en</title>
<link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>tDiary -- How to write diary</h1>

<h2>Index</h2>

<ul>
<li>Format of the diary in tDiary</li>
<li>Tips</li>
</ul>

<h2>Format of the diary in tDiary</h2>

<p>Basically, you write your diary in HTML. But, the format of the diary has extra rules in order to write your diary without knowledge of HTML. In this format, a linefeed and a character at the beginning of the line have special meanings. These rules are for the purpose of setting sub-title and paragraph easily.</p>

<p>The rules are explained below. To distinguish a linefeed in appearance(HTML) from an actual linefeed(format), &quot;$&quot; stands for an actual linefeed in this manual.</p>

<pre><code>sub-title(1)$ Like the above, the first line becomes a sub-title. With the tDiary&#39;s standard style sheet, the sub-title is displayed in bold face. Lines from the sub-title to the next space line are called section, and a section anchor is added in front of the sub-title. $ Lines after the sub-title, like this line and the line just above, are recognized as normal lines. If a paragraph begins with a sub-title, a section anchor is not attached in front of normal lines.$ $ If a space line exists, the line means the separation of the sections. If space exists in front of the line like this line, the section doesn&#39;t have a sub-title. In addition, only the first paragraph has a section anchor. In this case, the line is not shown in bold face.$ If a section doesn&#39;t begin with a sub-title, the second and later paragraphs don&#39;t have an anchor.$ $
</code></pre>

<p>$ If the paragraph begins with a line whose first character is &quot;$ $ sub-title(2)$ As the result of it, you can&#39;t add a sub-title which begins with a HTML tag to a section. But if a line begins with &quot;<em>This example is formatted below.</em></p>

<h2><a href="./?date=20010803">2001-08-03</a>title</h2>

<h3><a href="./?date=20010803#p01">_</a>sub-title(1)</h3>

<p>Like the above, the first line becomes a sub-title. With the tDiary&#39;s standard style sheet, the sub-title is displayed in bold face. Lines from the sub-title to the next space line are called section, and a section anchor is added in front of the sub-title.</p>

<p>Lines after the sub-title, like this line and the line just above, are recognized as normal lines. If a paragraph begins with a sub-title, a section anchor is not attached in front of normal lines.</p>

<p><a href="./?date=20010803#p02">_</a> If a space line exists, the line means the separation of the sections. If space exists in front of the line like this line, the section doesn&#39;t have a sub-title. In addition, only the first paragraph has a section anchor. In this case, the line is not shown in bold face.</p>

<p>If a section doesn&#39;t begin with a sub-title, the second or later paragraphs don&#39;t have an anchor.</p>

<pre><code> If the paragraph begins with a line whose first character is &quot;
### [_](./?date=20010803#p04)[sub-title(2)](foobar)

As the result of it, you can&#39;t add a sub-title which begins with a HTML tag to a section. But if a line begins with &quot;

</code></pre>

<p>In tDiary, users can write their diary without HTML if they don&#39;t need to decorate their diary. At the same time, users who are familiar to HTML can write full functions of HTML in their diaries. But, If you use HTML tags in your diary, it is better to read the next section, Tips, to avoid pitfalls of tDiary.</p>

<h2>Tips</h2>

<h3>want a section to include a line which has a tag.</h3>

<p>For example, you want to use</p>

<p>tag in your diary in order to use a list and don&#39;t want to change a section. Like this case, if you want to decorate the whole paragraph with html tags, you need to use a trick in tDiary. For instance, you hope that your diary is formatted like the next example.</p>

<h2><a href="./?date=20010830">2001-08-29</a></h2>

<h3><a href="./?date=20010829#p01">_</a>sub title</h3>

<p>Like this, you write a list which has two items.
    - item1
    - item2
Here is in the same sectionOne way is to merge a paragraph with the previous paragraph. Ordinarily, a paragraph is enclosed by -tag(you can confirm it if you read the HTML source created by tDiary.). You take advantage of this.</p>

<pre><code>sub-title Like this, you write a list which has two items.
</code></pre>

<ul>
<li>item1</li>
<li><p>item2</p>

<p>Here is in the same section$</p></li>
</ul>

<p>It is the point not to put a linefeed. This way is usable if a paragraph enclosed by a tag is not composed of plural lines. But, this is a little difficult to read.</p>

<p>In the way above, you take advantage of the fact that a paragraph is enclosed by</p>

<p>in tDiary. On the contrary, another way is to take advantage of the fact that</p>

<p>tag is not inserted to a section if the section has a line which begin with a tag. In the next example, tDiary insert no tag into a section because the section has a line which begins with &quot;-</p>

<p>, except a list.
```
sub title$ Like this, you write a list which has two items.</p>

<p>$
```</p>

<p>$   - item1
$   - item2
$
$  Here is in the same section.</p>

<p>$This way is suitable if a paragraph enclosed by tags is plural. For example, you insert source code with</p>

<pre><code> tag.Of course, if you don&#39;t mind the fact that the sections are split, you are not bothered with formatting. In this case, it may be better to write like the next example.

</code></pre>

<p>sub title$ Like this, you write a list which has two items.$ $
```</p>

<pre><code>
$   - item1
$   - item2
$
$ $ Here is in the same section.$The last line, &quot;Here ...&quot;, has a section anchor, but this is not a big problem.

### You want to insert an anchor per paragraph, not section

tDiary is developed under the policy that it is not necessary to insert an anchor to a paragraph. So, basically, you can&#39;t insert an anchor to a paragraph. But, you can insert an anchor to a section in appearance if you utilize the fact that we can make a section without a sub-title. Please read the next example.

</code></pre>

<p>sub-title(2)$ $ Like this, you put a space line under the sub-title and make a section to begin with space. This makes two sections. The first section has only the sub-title. The second section has only the paragraph. $ $ If you insert a space line to every paragraph, every paragraph has an anchor.$ $ sub-title(2)$ $ Please be careful that a line which doesn&#39;t begin with space becomes a sub-title.$
```
This example is displayed like this. It is the point that a line begins with space.</p>

<h2><a href="./?date=20010830">2001-08-30</a></h2>

<h3><a href="./?date=20010830#p01">_</a>sub-title(1)</h3>

<p><a href="./?date=20010830#p02">_</a>Like this, you put a space line under the sub-title and make a section to begin with space. This makes two sections. The first section has only the sub-title. The second section has only the paragraph.</p>

<p><a href="./?date=20010830#p03">_</a>If you insert a space line to every paragraph, every paragraph has an anchor.</p>

<h3><a href="./?date=20010830#p04">_</a>sub-title(2)</h3>

<p><a href="./?date=20010830#p04">_</a>Please be careful that a line which doesn&#39;t begin with space becomes a sub-title.</p>

<pre><code>
</code></pre>
</body>
</html>