<para>Principal maintainer of this file is<personname> Richard Heck</personname>. If you have comments or error corrections, please send them to the LyX Documentation mailing list, <code><lyx-docs@lists.lyx.org></code>.</para>
</footnote></personname>
</author>
</info>
<chapterxml:id="sec.Inserting-TeX-Code">
<title>Inserting TeX Code into LyX Documents</title>
<para>Anything you can do in LaTeX you can do in LyX, for a very simple reason: You can always insert TeX code into any LyX document. LyX cannot, and will never be able to, display every possible LaTeX construct. If ever you need to insert LaTeX commands into your LyX document, you can use the <code>TeX Code</code> box, which you can insert into your document with <personname>Insert⇒TeX Code</personname> or the keyboard shortcut <keycap>Ctrl+L</keycap>.</para>
<para>Here's an example of inserting LaTeX commands in a LyX document. The code looks like this:</para>
<programlistinglanguage='lyx'>\begin{tabular}{ll}
\begin{minipage}{5cm}
This is an example of a minipage environment. You
can put nearly everything in it, even (non-floating)
figures and tables.
\end{minipage}
&
\begin{minipage}{5cm}
\begin{verbatim}
\begin{minipage}{5cm}
This ...
\end{minipage}
\end{verbatim}
\end{minipage}
\end{tabular}</programlisting>
<section>
<title>Cross-References Between Files</title>
<sidebarrole='shadowbox'>
<para>This section is somewhat out of date. Need to describe default master documents and how children are opened when the master is. [[FIXME]]</para>
<para>These same environments are provided only in the starred versions by the <code>Theorems (Starred)</code> module:</para>
<pararole='theorem'>This is typically used for the statements of major results. </para>
<pararole='corollary'>This is used for statements which follow fairly directly from previous statements. Again, these can be major results. </para>
<pararole='lemma'>These are smaller results needed to prove other statements.</para>
<pararole='proposition'>These are less major results which (hopefully) add to the general theory being discussed.</para>
<pararole='conjecture'>These are statements provided without justification, which the author does not know how to prove, but which seem to be true (to the author, at least).</para>
<pararole='definition'>Guess what this is for. The font is different for this environment than for the previous ones. </para>
<informalexample>
<para>Used for examples illustrating proven results.</para>
</informalexample>
<pararole='problem'>It's not really known what this is for. You should figure it out.</para>
<pararole='exercise'>Write a description for this one.</para>
<noterole='theorem'>
<para>This environment is also a type of theorem, usually a lesser sort of observation.</para>
</note>
<pararole='claim'>Often used in the course of giving a proof of a larger result.</para>
<pararole='cases'>Generally, these are used to break up long arguments, using specific instances of some condition. The numbering scheme for cases is on its own, not together with other numbered statements. </para>
<pararole='proof'>At the end of this environment, a QED symbol (usually a square, but it can vary with different styles) is placed. If you want to have other environments within this one—for example, Case environments—and have the QED symbol appear only after them, then the other environments need to be nested within the proof environment. See the section <emphasis>Nesting Environments</emphasis> of the <emphasis>User's Guide</emphasis> for information on nesting.</para>
<para>And these environments are provided by <code>Theorems (AMS-Extended)</code>:</para>
<pararole='conclusion'>Sometimes used at the end of a long train of argument.</para>
<pararole='fact'>Used in a way similar to Proposition, though perhaps lower on the scale.</para>
<para>In addition, the AMS classes automatically provide the AMS LaTeX and AMS fonts packages. They need to be available on your system in order to use these environments.</para>