How do I get figure wrapping and captions to behave the way I want them to in Latex?
May 22, 2011 8:25 PM   Subscribe

So I'm writing a proposal in a mock NRSA (NIH) grant format and I used a Latex template I found here. But for some reason, my figures are now not getting wrapped by text, and the figure captions extend well beyond the figure width on either side. What to do?

I can't seem to figure out what part of the nih.cls file that I downloaded sets figure captions to behave in this way. I could use a regular template for Latex, but this template does behave the way I want in every other way so I'm loath to start over. However, having figures be on a separate page, with captions the entire width of the page is not acceptable, as I need to stick to seven pages for the entire proposal, figures and all. Any advice would be greatly appreciated, as my deadline is fast approaching. Thanks!
posted by peacheater to Computers & Internet (10 answers total)
 
Response by poster: Here's a link to the cls file in question.
posted by peacheater at 8:28 PM on May 22, 2011


You might also want to try http://tex.stackexchange.com/.
posted by dfan at 8:31 PM on May 22, 2011 [2 favorites]


You know the NIH has switched from PHS 398 to SF424 for NRSA applications, and almost every other grant application type, right?
posted by grouse at 8:51 PM on May 22, 2011


Well, sounds from grouse' answer like this may be moot, but I would guess the class is typesetting captions in LR mode (see here). Try putting the caption in a parbox.
posted by advil at 9:01 PM on May 22, 2011


Response by poster: You know the NIH has switched from PHS 398 to SF424 for NRSA applications, and almost every other grant application type, right?
Yup, but the changes to the things that matter to a Latex template seem to be minor (the changes are mostly about the sections required and page limits etc.). I could be wrong about this.
posted by peacheater at 10:11 PM on May 22, 2011


Best answer: The most important difference for these purposes is that SF424 no longer has the same header/footer cruft that the PHS 398 pages did. I would suggest that you not spend any time jumping through hoops to reproduce the look of an obsolete 13-year-old form. I used the basic LaTeX article class on my last NIH grant application and it looked fine.
posted by grouse at 10:25 PM on May 22, 2011


My apologies—it looks like Bruce Donald has updated his templates to fit an obsolete 7-year-old version instead. My point remains the same.
posted by grouse at 10:26 PM on May 22, 2011


Yeah, the top of the last NRSA application I handled looks like this
% \documentclass[11pt]{nih} % Bruce Donald produced this class
\documentclass[a4paper,10pt]{article}
posted by a robot made out of meat at 4:47 AM on May 23, 2011


Response by poster: Ok, I think you all are right, I'll switch to a basic article format instead.
posted by peacheater at 8:14 AM on May 23, 2011


Likewise, 'cept mine was on letter and not a4, and I had no issues at all w. eRA taking it. Not sure if they still prefer helvetica, but I used it anyway (although I hate it):

\documentclass[11pt]{article}
\usepackage[letterpaper,top=0.5in, bottom=0.5in, left=0.5in, right=0.5in]{geometry}
\RequirePackage{helvet}\renewcommand{\familydefault}{\sfdefault}

For figures/captions specifically, I use:

\usepackage{wrapfig}
\usepackage[rightcaption]{sidecap}
\setlength{\captionmargin}{1em}

I then use the figure environment when I want the captions below the figure with the text wrapped around it and the SCfigure environment when I want the captions to the right with figure+cap spanning the text width [likewise tables]. That, plus judicious use of sloppy, kept everything in line. Good luck!
posted by Westringia F. at 9:32 AM on May 23, 2011


« Older why do my hands smell like garbage?   |   Female multi-vitamin? Newer »
This thread is closed to new comments.