6. ERT (Evil Red Text)

lyx is very powerful and flexible in its use of environments. Unfortunately, lyx is rather more limited in the way it handles character styles. The emphasis style adds <emphasis></emphasis> tags to the emphasise text when you export it to DocBook. For other inline elements you must embed the tags directly into your document. Use the TEX button (with a red TEX icon).

6.1. Command

The SGML <command></command> tags can be used to surround typed commands or gui menu commands. For instance, you could type

<command>name-of-command</command>

then highlight the <command> tag and format it by clicking on the TEX button. Then format the </command> tag in the same way. Or you could click on the TEX button to insert an ERT frame and type <command> into that. You must look at the lyx source for this section to see what ERT looks like.

The SGML looks like this.

1 <command>name-of-command</command>
2    

6.2. Filename

The SGML <filename></filename> tags can be used to contain filenames or text you read from a terminal screen.

<filename>name-of-file</filename>

The SGML looks like this.

1 <filename>name-of-file</filename>
2    

6.3. Combined Command and Filename

DocBook only accepts this combination if command tags enclose the filename tags: <command><filename></filename></command>.

For instance, you could type: <command><filename>name-of-command</filename></command> <filename>argument</filename>.

name-of-command argument

The SGML looks like this.

1 <command><filename>name-of-command</filename></command> <filename>argument</filename>
2    

6.4. Application

The SGML <application></application> tags can be used with application name, program name or package name. (This can distinguish the application from the command or filename of the same text.)

For instance, you could type: <application>name-of-application-or-package</application>

name-of-application-or-package

The SGML looks like this.

1 <application>name-of-application-or-package</application>
2    

6.5. Other SGML styles

At the moment you must use Evil Red Text (ERT) for callouts, citations, graphics, etc. For example, here is the ERT to insert a graphic. (See NewbieDoc Docbook Guide).

<mediaobject>
  <imageobject>
    <imagedata fileref="images/newbieDocLogotype.ps" format="ps">
  </imageobject>
  <imageobject>
    <imagedata fileref="images/newbieDocLogotype.eps" format="eps">
  </imageobject>
  <imageobject>
    <imagedata fileref="../images/newbieDocLogotype.gif" format="gif">
  </imageobject>
  <textobject>
    <phrase>Newbiedoc: Docs for & by Debian newbies.</phrase>
  </textobject>
  <caption>
    <para>Newbiedoc: Docs for & by Debian newbies.</para>
  </caption>
</mediaobject>