# Best solution to present school computing algorithm

I need to typeset some computing class algorithms like:

Repeat
Accept Roll_Number
If (the Roll Number has already been added to the absent list) then
Else
End if
Connect to the Student’s table of Malpi’s database
Search for the match of Roll_Number
If (the match is found) Then
Display Student’s firstname,middlename,lastname,guardianname,contactnumber
Else
Don’t Display Anything
End If
Until (all the absent students have been added to the absent list)
Open the absent file where the records are to be added
Repeat
If (the student has already been added to the file for that day) Then
Else
Continue
End if
Until (All the Roll_Number in the list have been checked)
Get the record number of the last record in the absent file
Open the absent file where the records are to be added
Repeat
Add 1 to the record number
Save the student’s absent details to the file
Until (the records of all the students are saved in the absent file)


What is the best way to represent this in XeTeX ? I tried using \verbatim package but it seems to break margins ? Is there any good to present this ?

-
I realise these are dumb questions, however their answers are bound to help us understand your problem. A) what's holding you back from rearranging your text into shorter lines? B) what's the problem with typesetting your text in a smaller font size? C) Why can't you typeset your text in tt and issue successions of \quad's or \qquad's for indentation without dropping into \verb et al? – Geoffrey Jones Sep 6 '10 at 23:49
Thanks. I will try to rearrange them into shorter lines. – Ujjwol Sep 7 '10 at 5:45

Why not use “normal” text instead of \verbatim? A list (enumerate) would be well suited, I think. I don’t think \verbatim really offers any advantage here and I wouldn’t necessarily choose a typesetting font here, either: it’s an algorithm, not source code.