Eugeny N Dzhurinsky writes:

> 
> Hello
> 
> I would love to have an ability to insert (and let it be rendered) tabulation
symbol into TeX commands
> like
> 
> \lstset{language=XML}
> \begin{lstlisting}
> <element>
> [tab here]<nested/>
> </element>
> \end{lstlisting}
> 
> it would be great if I could set number of spaces for tabluation in the
> document preamble.
> 
> Is it possible at all?

LaTeX has a tabbing environment but it is not directly supported by LyX,
so you will have to use some ERT. Have a look at the .lyx file appended
at the end (you will have to copy and paste it as I cannot attach files).

The first line after \begin{tabbing} sets the tab stops.
Each line is ended by \\ and you go to the next tab stop by \>.
I used hard spaces (control+space) for visual alignment in LyX but they
are simply ignored in the output (one space is the same as one thousand).
Have a look at a LaTeX book for other commands other than \>.

HTH

-- 
Enrico


#LyX 1.4.4 created this file. For more info see http://www.lyx.org/
\lyxformat 245
\begin_document
\begin_header
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\papersize default
\use_geometry false
\use_amsmath 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\end_header

\begin_body

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
begin{tabbing}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace*{3cm}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
=
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace*{3cm}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
=
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace*{3cm}
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
=
\end_layout

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
kill
\end_layout

\end_inset


\end_layout

\begin_layout Standard
This is the first
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

and this is the fourth column
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash

\backslash

\end_layout

\end_inset


\end_layout

\begin_layout Standard
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

Second column
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash

\backslash

\end_layout

\end_inset


\end_layout

\begin_layout Standard
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

Second,\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

third,\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

and fourth column
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash

\backslash

\end_layout

\end_inset


\end_layout

\begin_layout Standard
First\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~
\InsetSpace ~

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
>
\end_layout

\end_inset

and third column
\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
end{tabbing}
\end_layout

\end_inset


\end_layout

\end_body
\end_document




Reply via email to