Graphics, Figures & TablesHELP: Keywords in the algorithm are underlined

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
unaben
Posts: 1
Joined: Tue Feb 09, 2010 4:30 pm

HELP: Keywords in the algorithm are underlined

Post by unaben »

Hello everyone,

I'm trying to insert an algorithm into my latex file, but the keywords such as if, where, comment, appear underlined in the pdf file. I'm using the program package. Below is the part of the code of the simple example algorithm. Should I include a line of code to cancel this keyword underlignement? I'm grateful for any suggestions :)

Code: Select all

\begin{program}
\mbox{A fast exponentiation procedure:}
\BEGIN 
  \FOR i:=1 \TO 10 \STEP 1 \DO
     |expt|(2,i); \\ |newline|() \OD 
\WHERE
\PROC |expt|(x,n) \BODY
          z:=1;
          \DO \IF n=0 \THEN \EXIT \FI;
             \DO \IF |odd|(n) \THEN \EXIT \FI;
\COMMENT{This is a comment statement};
                n:=n/2; x:=x*x \OD;
             \{ n>0 \};
             n:=n-1; z:=z*x \OD;
          |print|(z) \ENDPROC
\END
\end{program} 
Thanx, Una

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: HELP: Keywords in the algorithm are underlined

Post by localghost »

Post a full example reduced to minimal code instead of useless code snippets. With the provided information the issue is not comprehensible.


Best regards and welcome to the board
Thorsten¹
Post Reply