![]() | Note: check for validity. |
---|---|
The <sect1></sect1> tags must also contain at least one another container. You must add this manually using a LyX command (eg 'Subsection') or a Lyx environment/paragraph (eg 'Standard'). |
1 <sect1> 2 <title> First level section </title> 3 <para> 4 Text added using LyX's 'Standard' 5 paragraph. 6 </para> 7 </sect1> 8 |
The subsection is the next level down.
1 <sect2> 2 <title>Subsection</title> 3 </sect2> 4 |
![]() | Paragraphs |
---|---|
Do not confuse this “Paragraph” (which is a heading) with “Standard” (which is a paragraph of text). |
These lyx commands illustrate the hierarchy of article sections.
This is 'Standard' text within the fifth level section.
1 <sect3> 2 <title>Subsubsection</title> 3 <sect4> 4 <title>Paragraph</title> 5 <sect5> 6 <title>Subparagraph.</title> 7 <para> 8 This is 'Standard' text within the fifth level heading. 9 </para> 10 </sect5> 11 </sect4> 12 </sect3> 13 </sect2> 14 |
It is best to avoid using the 'Paragraph' and 'Subparagraph' commands.
'Standard' follows on by default after certain lyx commands.
Here is the SGML code generated from the two paragraphs above:
1 <para> 2 Paragraphs are simple. You use LyX's 'Standard' 3 paragraph. Pressing the <ENTER> key starts another 4 one. 5 </para> 6 7 <para> 8 'Standard' follows on by default after certain LyX commands. 9 </para> 10 |
The 'Itemize' style produces a bulletted list.
1 <itemizedlist> 2 3 <listitem> 4 <para>first list item</para> 5 </listitem> 6 7 <listitem> 8 <para>second list item</para> 9 </listitem> 10 11 <listitem> 12 <para>third list item</para> 13 </listitem> 14 15 </itemizedlist> 16 |
Do not type the numbers - they are added automatically.
1 <orderedlist> 2 3 <listitem> 4 <para>first list item</para> 5 </listitem> 6 7 <listitem> 8 <para>second list item</para> 9 </listitem> 10 11 <listitem> 12 <para>third list item</para> 13 </listitem> 14 15 </orderedlist> 16 |
Does not render very well with the current CSS style sheet.
![]() | Note: Item names with more the one word. |
---|---|
You can protect spaces within an item's name. Use Insert->Special Character->Protected Blank or hold down the CTRL and SHIFT keys while pressing the SPACE BAR. |
1 <variablelist> 2 3 <varlistentry> 4 <term>first</term> 5 <listitem> 6 <para>list item</para> 7 </listitem> 8 </varlistentry> 9 10 <varlistentry> 11 <term>second</term> 12 <listitem> 13 <para>list item</para> 14 </listitem> 15 </varlistentry> 16 17 <varlistentry> 18 <term>third with protected spaces</term> 19 <listitem> 20 <para>list item</para> 21 </listitem> 22 </varlistentry> 23 24 </variablelist> 25 |
Here is an example using the 'Code' style:
1 if (x=y){ 2 $variable=1 3 } else { 4 $variable=0 5 } 6 |
<programlisting> <![CDATA[if (x=y){ ]]><![CDATA[ $variable=1 ]]><![CDATA[} else { ]]><![CDATA[ $variable=0 ]]><![CDATA[} ]]> </programlisting> |
if (x=y){ $variable=1 } else { $variable=0 } |
Here is the generated SGML code:
<screen> <![CDATA[if (x=y){ ]]><![CDATA[ $variable=1 ]]><![CDATA[} else { ]]><![CDATA[ $variable=0 ]]><![CDATA[} ]]> </screen> |
If you want to show menu commands on a single line, you can use a hyphen and an angle bracket
Edit -> Paste External Selection -> as Paragraphs |
<synopsis> <![CDATA[Edit -> Paste External Selection -> as Paragraphs ]]> </synopsis> |
Edit Paste External Selection as Paragraphs |
See 'Codes and Screens' in this document and the NewbieDoc DocBook guide.
This comment appears in both the lyx document and the SGML document.
Drop-down styles list: SGML LyX main window: <!-- Text must be contained by "<", "!", "-", "-" and "-", "-", ">". The whole thing must be in the SGML paragraph style. --> |
These comments only appear in the lyx document.
Drop-down styles list: Comment LyX main window: Comment: Your meaningful comment |
![]() | Note: Note style and lyx Note |
---|---|
These are not the same thing! This paragraph uses the 'Note' style from the Drop-down styles list. The Lyx Note is one of lyx's features. It is like a post-it note. |
These comments only appear in the lyx document.
Menu bar: Insert -> Note LyX main window: Your comment is in a bright yellow box. It can be revealed or hidden by a grey tab labelled “note”. |
Drop-down styles list: Keyword LyX main window: Keyword: keyword-1 |
You must add a KeywordSet wrapper immediately above the first Keyword.
Drop-down styles list: KeywordSet LyX main window: Keyword set Keyword: keyword-1 |
You can add more keywords to your keyword set:
Drop-down styles list: KeywordSet LyX main window: Keyword set Keyword: keyword-1 Keyword: keyword-2 |
The SGML code looks like this.
1 <keywordset> 2 <keyword> 3 keyword-1 4 </keyword> 5 <keyword> 6 keyword-2 7 </keyword> 8 </keywordset> 9 |