Discussion:
how to indicate location between characters
Naugab Lee
2006-12-11 15:34:44 UTC
Permalink
All,

I'll appreciate if anybody shows me how to indicate the location between characters by a symbol such as a caret or any more appropriate symbol. I'd like to use this techinque to explain how a regular expression works in Perl.

Thanks.

Ed Lee


---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
Yannick
2006-12-13 17:41:23 UTC
Permalink
Yannick
2006-12-13 17:32:05 UTC
Permalink
If I understand you right, you want to typ some sort of pseudo code of
perl. And you want to insert a symbol instead of a space.
So you could just insert a symbol you like. I attached a pdf with MANY
symbols. You can choose one you like.
If you want the symbol to be inserted when you type the space-bar, I
can't help you. I don't know how to archive this.
Hope I could help you,

Yannick
Kristof Möller
2006-12-13 22:11:11 UTC
Permalink
Hi,

please have a look on the listings-package
(http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=listings)
and try this example:

\documentclass{article}
\usepackage{listings}
\usepackage{times}
%
\begin{document}
%
\lstset{language=Perl,
showspaces=true,
showtabs=true,
tabsize=4,
tab=\hrulefill,
basicstyle=\ttfamily,
keywordstyle=\bfseries}
%
\begin{lstlisting}
if (invalid($start_number))
{
get_new_start_number;
exit;
}
else
{
sequence;
print_output;
}
\end{lstlisting}
%
\end{document}


Have fun
Kris
Post by Naugab Lee
All,
I'll appreciate if anybody shows me how to indicate the location
between characters by a symbol such as a caret or any more appropriate
symbol. I'd like to use this techinque to explain how a regular
expression works in Perl.
Thanks.
Ed Lee
------------------------------------------------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
<http://us.rd.yahoo.com/evt=42297/*http://advision.webevents.yahoo.com/mailbeta>
Loading...