I'm using pod2latex to convert the Perl FAQ POD files to LaTeX and then pdflatex to convert them to PDF. The first few FAQ files converted fine, but perlfaq4 is giving me an error: Runaway argument? ! Paragraph ended before \@ssect was complete. I think this is because \subsection can't contain paragraphs, but the pod2latex tool generates paragraphs within \subsections. How should I approach this problem? Is there a way to allow \subsection to contain paragraphs? Here is a short example extracted from the document that throws the same error:
\documentclass{article}
\begin{document}
\subsection*{How do I find yesterday's date?
\index{date}
\index{yesterday}
\index{DateTime}
\index{Date::Calc}
\index{Time::Local}
\index{daylight saving time}
\index{day}
\index{Today\ and\ Now}
\index{localtime}
\index{timelocal}\label{How_do_I_find_yesterday_s_date_date_yesterday_DateTime_Date::Calc_Time::Local_daylight_saving_time_day_Today_and_Now_localtime_timelocal}\index{How do I find yesterday's date?
date
yesterday
DateTime
Date::Calc
Time::Local
daylight saving time
day
Today\ and\ Now
localtime
timelocal}}
\end{document}
\subsection*and\indexcannot have paragraphs in their arguments, which is what you have. (Each blank line indicates the start of a new paragraph.) I also suggest you move the\indexcommands outside the argument of the\subsection*command. – Marc van Dongen Mar 21 at 6:43s/\n\n+/\\endgraf /(assuming\nmeans "newline" in your regex engine - I don't remember Perl's one's details) if you really, really want to have paragraphs within\section. – mbork Mar 21 at 7:34