the following command
\begin{center}
\begin{lstlisting}
....
code
....
\end{lstlisting}
\end{center}
rests aligned to the left of the page.
I also tried with the \centered command, but without success.
The only thing that "worked" was to encapsulate the lstlisting
environment inside a table as follows:
\begin{table}[!ht]
\centering
\begin{tabular}{c}
\begin{lstlisting}
....
code
....
\end{lstlisting}
\end{tabular}
\end{table}
even if in this i can't correctly display the captions and labels.
Do you know a way to get a "native" centered listing, without losing
other caption and style features of that package?
Thank you for your attention.
Alessandro
Try with
{\par\centering
\begin{lstlisting}
...
\end{lstlisting}
\par}
Ignasi
Thank you very much for having replied.
Your proposal still not works.
I looked around for examples, and noone seems interested to centered
listings.
Do you have some other proposals?
Thank you for your attention
Alessandro
\begin{center}
\begin{lstlisting}[caption={original program}, frame=trBL]
....
code
....
\end{lstlisting}
\end{center}
you'll see that "listings" package actually uses the *whole* length of
the line/paper/whatever.
So I would think that a variant of listings, which uses "varwidth"
instead of "minipage" or whatever, would solve your problem.
Regretfully I am not that much of a latex guru to write such a hack
myself.
Best regards,
bob
LateX Error: Command \see already defined.
Or name \end... illegal, see p.192 of the manual.
See LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.41 \newcommand*\see[2](\emph(\seename> #1)
?"
The preamble contains
\documentclass{fim-l}
\usepackage{latexsym,srcltx}
\usepackage{amssymb}
\usepackage{amsxtra}
\usepackage{makeidx}
\makeindex
\usepackage{amsmath}
\input xypic
\input crr.tex
\bibliographystyle{plain}
\usepackage{glossary}
\makeglossary
\newcommand{\gloss}[3]{\glossary{name={#1},description={#2},sort={#3}}}
\usepackage{paralist}
(fim-l is an AMS style file)
Help!
Carl
It's in the class (which is *not* standard):
\newcommand\seename{see also}%
\newcommand\see[2]{{\em \seename\/} #1}%
--
Joseph Wright