\parbox, yay
Posted: June 2nd, 2009 | Author: emma | Filed under: misc | No Comments »this has been driving me crazy for months, so i thought i’d just post something in case anybody else has this problem. i’ve been using the examples.sty package that comes with the sp document class and something that i can’t quite figure out is why within the examples, line breaks just don’t happen. you can, of course, force a line break, but it often looks clunky (and more like something you’d get if you’d been editing your document in word). now, the hack solution would be to never have an example sentence that was longer than a line, but since my current work on adnominal emphatic reflexives requires quite a bit of contextual information, that won’t do.
enter \parbox, which fixes the problem. for my document, which has 1in margins, \parbox[t]{6in}{text} does the trick (you’ll have to play around with that second argument if you have different margin sizes, of course). since i’m using this a lot in my paper (with the many long examples), i wrote up a command to automate some of this: \newcommand{\exalign}[1]{\parbox[t]{6in}{#1}}. so now i can just call \exalign on any piece of multi-line text within \examples.
Leave a Reply