diff options
author | Tammy Fox <tfox@redhat.com> | 2004-09-13 02:02:12 +0000 |
---|---|---|
committer | Tammy Fox <tfox@redhat.com> | 2004-09-13 02:02:12 +0000 |
commit | 8ae111640b7d92dac707b223aa55bb142721af15 (patch) | |
tree | f0c3c3f6cf8404ec828c896bdaee4c1cd3f079a2 | |
parent | 141064456da7e78c2c4afe1897d5f56ed65f7635 (diff) | |
download | documentation-guide-8ae111640b7d92dac707b223aa55bb142721af15.tar.gz documentation-guide-8ae111640b7d92dac707b223aa55bb142721af15.tar.xz documentation-guide-8ae111640b7d92dac707b223aa55bb142721af15.zip |
more explanation of screen tag per bug #131647, tweak replaceable entry
-rw-r--r-- | docs-xml-tags-en.xml | 198 |
1 files changed, 145 insertions, 53 deletions
diff --git a/docs-xml-tags-en.xml b/docs-xml-tags-en.xml index c4259e3..87b77d4 100644 --- a/docs-xml-tags-en.xml +++ b/docs-xml-tags-en.xml @@ -1,4 +1,4 @@ -<!-- $Id: docs-xml-tags-en.xml,v 1.10 2004/08/31 15:46:17 tfox Exp $ --> +<!-- $Id: docs-xml-tags-en.xml,v 1.11 2004/09/13 02:02:12 tfox Exp $ --> <chapter id="ch-xml-tags"> <title>DocBook XML Tags</title> @@ -191,7 +191,7 @@ browser. <screen> <computeroutput> -<!--$Id: docs-xml-tags-en.xml,v 1.10 2004/08/31 15:46:17 tfox Exp $ --> +<!--$Id: docs-xml-tags-en.xml,v 1.11 2004/09/13 02:02:12 tfox Exp $ --> <chapter id="ch-sample"> <title>Sample Chapter</title> @@ -1747,7 +1747,7 @@ At the <prompt>C:\></prompt> prompt, type .... <title>Note</title> <para> When showing example computer output (usually in - <command>screen</command> tags), do you include the prompt or command + <command>screen</command> tags), do not include the prompt or command (unless the command or prompt is the actually computer output you want to show).</para> </note> @@ -1762,27 +1762,26 @@ At the <prompt>C:\></prompt> prompt, type .... </indexterm> <para> - To create replaceable text, you use the tags + To create replaceable text, use the tags <command><replaceable></command> and <command></replaceable></command> around the text you want to use as a variable. </para> <para> - This example shows the ISBN of our boxed sets with variables: + This example demonstrates how to use the <command>replaceable</command> + tags when referencing the name of an RPM file: </para> <screen> -<computeroutput> -1-58569-<replaceable>xx</replaceable>-<replaceable>y</replaceable> -</computeroutput> +foo-<replaceable>version-number</replaceable>.<replaceable>arch</replaceable>.rpm </screen> <para> The output: </para> - <para> - 1-58569-<replaceable>xx</replaceable>-<replaceable>y</replaceable> - </para> +<screen> +foo-<replaceable>version-number</replaceable>.<replaceable>arch</replaceable>.rpm +</screen> </sect1> <sect1 id="s1-xml-tags-screen"> @@ -1792,73 +1791,166 @@ At the <prompt>C:\></prompt> prompt, type .... <secondary>screen</secondary> </indexterm> + <para> + The <command><screen></command> command is used to format text + within a document and is great for adding emphasis to show examples of + code, computer output, and more. In HTML with the Fedora CSS file, this + appears in box with a grey background. To use this command you only need + the opening <command><screen></command> and closing + <command></screen></command> tags around the text you are + emphasizing. + </para> + + <important> + <title>Important</title> <para> - The <command><screen></command> command is used to format text - within a document and is great for adding emphasis to show examples of - code, computer output, and more. In HTML, this appears in a grey - background. To use this command you only need the opening - <command><screen></command> and closing - <command></screen></command> tags around the text you are - emphasizing. + When using the <command><screen></command> tag, you must set + everything within that screen, including the + <command><screen></command> tags themselves, to flush left. This + must be done so that when it is converted to HTML, it will not have + extra blank space in front of it inside the gray background. </para> + </important> - <important> - <title>Important</title> <para>When using the - <command><screen></command> tag, you must set everything within - that screen, including the <command><screen></command> tags - themselves, to flush left. This must be done so that when it is - converted to HTML, it will not have extra blank space in front of it - inside the gray background.</para> - </important> + <para> + The <command><screen></command> tag set may contain other inline + tags, such as <command><computeroutput></command>, + <command><userinput></command>, or + <command><replaceable></command>. Additional inline tags are not + required by definition. The <command><screen></command> tags by + themselves may provide sufficient context, especially for simple examples + or file listings. Consider the context of the example, and use inline tags + if they are helpful to the reader. + </para> + <para> + If you use inline tags, remember that line breaks inside + <command><screen></command> tags create line breaks in any rendered + output. Place any inline tags <emphasis>on the same line</emphasis> as + their content. Do not overuse tagging within a + <command><screen></command> tag set. + </para> + + <para> + An example of <command><screen></command> is the following: + </para> - <para> - An example of <command><screen></command> is the following: - </para> <screen> -<computeroutput> -<screen> -<computeroutput> -This is an example of a screen. You do not need <para> tags +<computeroutput><screen> +This is an example of a screen. You do not need &lt;para&gt; tags within this command. -</computeroutput> -</screen> -</computeroutput> +</screen></computeroutput> </screen> + <para> + The output: + </para> + +<screen> +This is an example of a screen. You do not need <para> tags +within this command. +</screen> + + <sect2 id="s2-xml-tags-screen-inline-tags"> + <title>Using Inline Tags with <command>screen</command></title> <para> - The output: + If you choose to use inline tags inside a + <command><screen></command> section, follow these guidelines for + consistency. If the content in the screen is a listing of a + configuration file or the output of a program, use the + <command><computeroutput></command> tag set around the entire + output. If the user should type the example on the command line or in + a configuration file, use the <command><userinput></command> tag + set. Separate input and output with a short sentence of narrative, as + below: </para> <screen> -<computeroutput> -This is an example of a screen. You do not need <command><para></command> -tags within this command. -</computeroutput> + <command><para></command> + Type the following command: + <command></para></command> + +<command><screen></command> +<command><userinput></command>command -sw file1<command></userinput></command> +<command></screen></command> + + <command><para></command> + You should see the following output: + <command></para></command> + +<command><screen></command> +<command><computeroutput></command>Completed, time = 0.12 sec<command></computeroutput></command> +<command></screen></command> </screen> - <note> - <title>Note</title> <para>To properly use the - <command><screen></command> tag set, you also need to properly - tag the content within the screen. If the content in the screen is a - configuration file or the output of a program, it needs the - <command><computeroutput></command> tag set. If it is a command, - it needs the <command><command></command> tag set. If it is a - command with user input, it may require a construction like the one - below:</para> + <para> + The output looks like: + </para> + + <para> + Type the following command: + </para> + <screen> -<command><command></command>command <command><userinput></command>input<command></userinput></command><command></command></command> +<userinput>command -sw file1</userinput> </screen> <para> - The output looks like: + You should see the following output: </para> <screen> -<command>command <userinput>input</userinput></command> +<computeroutput>Completed, time = 0.12 sec</computeroutput> </screen> + + <note> + <title>Note</title> + <para> + When showing a command or series of commands inside + <command>screen</command> tags, do not show the prompt. + </para> </note> + <para> + If the <command><screen></command> shows the reader how to + change only <emphasis>part</emphasis> of a line, mark the change with + an inline <command><userinput></command> tag set. You may use + the <command><userinput></command> tag set inside a larger area + that is already marked inline with + <command><computeroutput></command>. Do not include any extra + lines of context in this case, unless excluding them would confuse the + reader. The following example illustrates these guidelines: + </para> + +<screen> + <command><para></command> + Edit the <command><filename></command>/etc/sysconfig/init<command></filename></command> file as follows: + <command></para></command> + +<command><screen></command> +GRAPHICAL=<command><userinput></command>yes<command></userinput></command> +<command></screen></command> +</screen> + + <para> + The output looks like: + </para> + + <para> + Edit the <filename>/etc/sysconfig/init</filename> file as follows: + </para> + +<screen> +GRAPHICAL=<userinput>yes</userinput> +</screen> + + <para> + For an explanation of how to use the <command>replaceable</command> + tags within a set of <command>screen</command> tags, refer to <xref + linkend="s1-xml-tags-replaceable"></xref>. + </para> + + </sect2> </sect1> <sect1 id="s1-xml-tags-sections"> |