none
[openafs-wiki.git] / TWiki / TextFormattingFAQ.mdwn
1 <font>**Text Formatting FAQ**</font>
2
3 - The most frequently asked questions about text formatting are answered here.
4   - [[TextFormattingRules]] has the complete system in a handy quick reference format.
5
6 <div>
7   <ul>
8     <li><a href="#How do I make a separator?"> How do I make a separator?</a></li>
9     <li><a href="#How do I create a heading?"> How do I create a heading?</a></li>
10     <li><a href="#Text enclosed in angle brackets"> Text enclosed in angle brackets like &lt;filename&gt; is not displayed. How can I show it as it is?</a></li>
11     <li><a href="#Some words (like _WinAPI) have a"> Some words (like WinAPI) have an unwanted question mark at the end. How can I prevent that?</a></li>
12     <li><a href="#How can I write fixed font text?"> How can I write fixed font text?</a></li>
13     <li><a href="#Text I enter gets wrapped around"> Text I enter gets wrapped around. How can I keep the formatting as it is?</a></li>
14     <li><a href="#How do I create tables?"> How do I create tables?</a></li>
15     <li><a href="#Can I include images and picture"> Can I include images and pictures?</a></li>
16     <li><a href="#Can I write colored text?"> Can I write colored text?</a></li>
17   </ul>
18 </div>
19
20 > ----
21 >
22 > ### <a name="How do I make a separator?"></a> How do I make a separator?
23 >
24 > You can make a horizontal separator by writing three or more dashes at the beginning of a line.
25 >
26 > ----
27 >
28 > ### <a name="How do I create a heading?"></a> How do I create a heading?
29 >
30 > You can create six sizes of headings - &lt;H1&gt;...&lt;H6&gt; in HTML - by typing, from the beginning of a line, three dashes (-), from one to six plus signs (+), a space, and your heading text. The FAQ questions on this page are created with: `---+++ Have a question?`.
31 >
32 > - You can insert a nested table of contents, generated from headings, by placing `%TOC%` wherever you like on a page (see [[TWikiVariables]] for more `%TOC%` options).
33 >
34 > ----
35 >
36 > <a name="TextEnclosed"></a>
37 >
38 > ### <a name="Text enclosed in angle brackets"></a><a name="Text enclosed in angle brackets "></a> Text enclosed in angle brackets like &lt;filename&gt; is not displayed. How can I show it as it is?
39 >
40 > TWiki interprets text as HTML. The '&lt;' and '&gt;' characters are used to define HTML commands. Text contained in angle brackets is interpreted by the browser if it's a valid HTML instruction, or ignored if it isn't - either way, the brackets and its contents are not displayed.
41 >
42 > If you want to display angle brackets, enter them as HTML codes instead of typing them in directly:
43 >
44 > - - `&lt;` = `<`
45 >   - `&gt;` = `>`
46 >   - Enter: `(a &gt; 0)` to get `(a > 0)`
47 >
48 > ----
49 >
50 > ### <a name="Some words (like _WinAPI) have a"></a> Some words (like [[WinAPI]]) have an unwanted question mark at the end. How can I prevent that?
51 >
52 > A question mark after a word is a link to a topic that doesn't yet exist - click it to create the new page. This is a TWiki feature - typing a [[MeaningfulTitle]] in a comment is an invitation for someone else to add to the topic.
53 >
54 > To prevent auto-linking - you may simply want to enter a word like JavaScript (the proper spelling!) - prefix it with the special TWiki HTML tag `<nop>`:
55 >
56 > - `<nop>WikiWord` displays as WikiWord
57 >
58 > ----
59 >
60 > ### <a name="How can I write fixed font text?"></a> How can I write fixed font text?
61 >
62 > Enclose text in "=" equal signs:
63 >
64 > - `Proportional text, =fixed font text=, proportional again.` appears as... <br /> Proportional text, `fixed font text` , proportional again.
65 >
66 > Alternatively you could also use preformatted text, see next question for details.
67 >
68 > ----
69 >
70 > ### <a name="Text I enter gets wrapped around"></a> Text I enter gets wrapped around. How can I keep the formatting as it is?
71 >
72 > TWiki interprets text as HTML. It is possible to use preformatted text to workaround this. Use the preformatted HTML tags to keep the new line of text as it is. Do so by enclosing text in either &lt;pre&gt; &lt;/pre&gt; or &lt;verbatim&gt; &lt;verbatim&gt; tags:
73 >
74 >     This text will keep its format as it is:
75 >     <pre>
76 >       Unit      Price Qty  Cost
77 >       -------  ------  ---  ------
78 >       aaa              12.00   3      36.00
79 >     </pre>
80 >
81 > The `pre` tag is standard HTML; `verbatim` is a special TWiki tag that also forces text to fixed font mode, and also prevents other tags and TWiki shortcuts from being expanded.
82 >
83 > ----
84 >
85 > ### <a name="How do I create tables?"></a> How do I create tables?
86 >
87 > There are three possibilities:
88 >
89 > 1. Use Wiki rule with "|" vertical bars.
90 > 2. Use HTML tables with &lt;table&gt;, &lt;tr&gt;, &lt;td&gt; tags.
91 > 3. Use preformatted text with &lt;PRE&gt; tags.
92 >
93 > **\_1. Use Wiki rule with "|" vertical bars\_**
94 >
95 > - Example text: <br />`| cell A1 | cell B1 | cell C1 |`<br />`| cell A2 | cell B2 | cell C2 |`
96 > - Example output: <table border="1" cellpadding="0" cellspacing="0">
97 >   <tr>
98 >     <td> cell A1 </td>
99 >     <td> cell B1 </td>
100 >     <td> cell C1 </td>
101 >   </tr>
102 >   <tr>
103 >     <td> cell A2 </td>
104 >     <td> cell B2 </td>
105 >     <td> cell C2 </td>
106 >   </tr>
107 > </table>
108 >
109 > **\_2. Use HTML tables with &lt;TABLE&gt;, &lt;TR&gt;, &lt;TD&gt; tags\_**
110 >
111 > This is a manual process using HTML commands. Here is an example. If you enter this:
112 >
113 >     <TABLE BORDER=1>
114 >       <TR>
115 >        <TH> Head A  </TH> <TH> Head B  </TH>
116 >       </TR><TR>
117 >        <TD> Cell A2 </TD> <TD> Cell B2 </TD>
118 >       </TR><TR>
119 >        <TD> Cell A3 </TD> <TD> Cell B3 </TD>
120 >       </TR>
121 >     </TABLE>
122 >
123 > It is displayed as a table like this:
124 >
125 > <table border="1">
126 >   <tr>
127 >     <th> Head A </th>
128 >     <th> Head B </th>
129 >   </tr>
130 >   <tr>
131 >     <td> Cell A2 </td>
132 >     <td> Cell B2 </td>
133 >   </tr>
134 >   <tr>
135 >     <td> Cell A3 </td>
136 >     <td> Cell B3 </td>
137 >   </tr>
138 > </table>
139 >
140 > **\_3. Use preformatted text with &lt;PRE&gt; tags\_**
141 >
142 > Text I enter gets wrapped around. How can I keep the formatting as it is? See [["Text enclosed..."|Main/WebHome#TextEnclosed]]
143 >
144 > ----
145 >
146 > ### <a name="Can I include images and picture"></a> Can I include images and pictures?
147 >
148 > Yes, this is possible. The easiest way of including images is to attach a GIF or JPG file to a topic and then to include it with text `%ATTACHURL%/myImage.gif` . [[FileAttachment]] has more.
149 >
150 > There are actually two ways of including inline images.
151 >
152 > **\_1. Using URL ending in .gif, .jpg, .jpeg\_**
153 >
154 > This is a simple and automatic way of including inline images. Simply write the URL of the image file, this will create the inline image for you. **Note:** The images must be accessible as a URL.
155 >
156 > - Example text: <br />` TWiki http://www.dementia.org/twiki//view/wikiHome.gif logo.`
157 > - Example output: <br /> TWiki ![wikiHome.gif](http://www.dementia.org/twiki//view/wikiHome.gif) logo.
158 >
159 > **\_2. Using &lt;IMG&gt; tag\_**
160 >
161 > This is a manual process where you have more control over the rendering of the image. Use the &lt;IMG&gt; tag of HTML to include JPEG and GIF files. **Note:** The display of the topic is faster if you include the WIDTH and HEIGHT parameters that have the actual image size. <http://www.htmlhelp.com/reference/wilbur/special/img.html> has more on inline images.
162 >
163 > - Example text: <br />`TWiki <IMG SRC="http://www.dementia.org/twiki//view/wikiHome.gif" WIDTH=46 HEIGHT=50> logo.`
164 > - Example output: <br /> TWiki <img src="http://www.dementia.org/twiki//view/wikiHome.gif" width="46" height="50" /> logo.
165 >
166 > ----
167 >
168 > ### <a name="Can I write colored text?"></a> Can I write colored text?
169 >
170 > Place text you would like to specify a color inside &lt;FONT COLOR="colorCode"&gt; and &lt;/FONT&gt; tags.
171 >
172 > "colorCode" is the hexadecimal RGB color code. The color is composed by specifying the red, green and blue components of the color in hexadecimal notation. For example, to specify white, the red, green and blue components are 255, 255, 255, so you would use "#FFFFFF". You can use [[StandardColors]] or common color codes:
173 >
174 > <table>
175 >   <tr bgcolor="#E0E0E0">
176 >     <td><font color="#000000"> <strong>Black:</strong> </font></td>
177 >     <td>"#000000" </td>
178 >     <td><font color="#008000"> <strong>Green:</strong> </font></td>
179 >     <td>"#008000" </td>
180 >     <td><font color="#C0C0C0"> <strong>Silver:</strong> </font></td>
181 >     <td>"#C0C0C0" </td>
182 >     <td><font color="#00FF00"> <strong>Lime:</strong> </font></td>
183 >     <td>"#00FF00" </td>
184 >   </tr>
185 >   <tr bgcolor="#C0C0C0">
186 >     <td><font color="#808080"> <strong>Gray:</strong> </font></td>
187 >     <td>"#808080" </td>
188 >     <td><font color="#808000"> <strong>Olive:</strong> </font></td>
189 >     <td>"#808000" </td>
190 >     <td><font color="#FFFFFF"> <strong>White:</strong> </font></td>
191 >     <td>"#FFFFFF" </td>
192 >     <td><font color="#FFFF00"> <strong>Yellow:</strong> </font></td>
193 >     <td>"#FFFF00" </td>
194 >   </tr>
195 >   <tr bgcolor="#E0E0E0">
196 >     <td><font color="#800000"> <strong>Maroon:</strong> </font></td>
197 >     <td>"#800000" </td>
198 >     <td><font color="#000080"> <strong>Navy:</strong> </font></td>
199 >     <td>"#000080" </td>
200 >     <td><font color="#FF0000"> <strong>Red:</strong> </font></td>
201 >     <td>"#FF0000" </td>
202 >     <td><font color="#0000FF"> <strong>Blue:</strong> </font></td>
203 >     <td>"#0000FF" </td>
204 >   </tr>
205 >   <tr bgcolor="#C0C0C0">
206 >     <td><font color="#800080"> <strong>Purple:</strong> </font></td>
207 >     <td>"#800080" </td>
208 >     <td><font color="#008080"> <strong>Teal:</strong> </font></td>
209 >     <td>"#008080" </td>
210 >     <td><font color="#FF00FF"> <strong>Fuchsia:</strong> </font></td>
211 >     <td>"#FF00FF"</td>
212 >     <td><font color="#00FFFF"> <strong>Aqua:</strong> </font></td>
213 >     <td>"#00FFFF" </td>
214 >   </tr>
215 > </table>
216 >
217 > - Example text: <br />` <FONT COLOR="#FF0000"> Red color </FONT> draws attention. `
218 > - Example output: <br /><font> Red color </font> draws attention.
219 >
220 > ----
221
222 -- [[MikeMannix]] - 10 Sep 2001 <br />