Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Print programs with its proper syntax
Line Breaks in Text Mode not Working

I need to write some pseudocode. I tried using the algorithimic package, but it introduced some errors (particularly indenting the first line, paragraph style, of multi-line statements).

I didn't notice these before sending a draft to my academic advisor. He's now specifically asked me to use the tabular environment to force indenting (of, for example, the lines executed inside a loop). I can't find any examples out there of this done right, and I'm particularly curious about how to allow content in a table cell to extend to the right edge of the page (even when the cell in question isn't in the rightmost column, as will occur with text that isn't the most indented in the pseudocode segement, if that makes sense?)

share|improve this question
4  
You can consider tabbing, see this answer and this answer –  egreg Mar 7 '12 at 21:11
    
If the link egreg pointed you to does not solve the problem, please keep in mind that it is always best to compose a fully compilable MWE that illustrates the problem including the \documentclass and the appropriate packages so that those trying to help don't have to recreate it. Basically better to show the problem rather than describe the problem. –  Peter Grill Mar 7 '12 at 21:20
1  
...also see Print programs with its proper syntax. –  Werner Mar 7 '12 at 21:20
    
Thanks much. I will try using tabbing. –  Aster42 Mar 7 '12 at 21:33
add comment

marked as duplicate by Marco Daniel, tohecz, lockstep, Joseph Wright May 5 '12 at 21:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Browse other questions tagged or ask your own question.