Todd O'Bryan schrieb:
I actually didn't get a file. I got a bunch of text with backslashes and such. I thought you meant to send it that way.

Here's the problem. If I put that in Typewriter font, but not LyX Code, I can't type spaces to indent correctly. If I put it in LyX Code, then the (a) and (b) disappear.

you should use the package listings for that. See attached example which defines a new command \ls{...}, which you can use in pure ERT or before and after your text.


Herbert
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\begin_preamble
\usepackage{listings}
\def\ls#1{\lstinline[basicstyle=\small\ttfamily]{#1}}
\end_preamble
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single 
\papersize Default
\paperpackage a4
\use_geometry 0
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default

\layout Enumerate

Which of the following does foo?
\begin_deeper 
\layout Enumerate


\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
ls{This is code}
\end_inset 


\newline 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
ls{this is more code and should be lined up with the code}
\end_inset 


\newline 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
ls{above}
\end_inset 


\layout Enumerate


\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
ls{
\end_inset 

more code
\begin_inset ERT
status Collapsed

\layout Standard
}
\end_inset 


\newline 

\begin_inset ERT
status Collapsed

\layout Standard

\backslash 
ls{
\end_inset 

code with b
\begin_inset ERT
status Collapsed

\layout Standard
}
\end_inset 


\end_deeper 
\layout Enumerate

Next question
\the_end

Reply via email to