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 Prompt”You have already added the roll number to the absent list” Else Continue with the adding process 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 Prompt” The student has already been added to the file” 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 ?