Tell me more ×
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.

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}
share|improve this question
2  
Some commands like \subsection* and \index cannot 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 \index commands outside the argument of the \subsection* command. – Marc van Dongen Mar 21 at 6:43
1  
I can't resist: this is what Perl hackery leads to... You may do something like s/\n\n+/\\endgraf / (assuming \n means "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
This is a bug in pod2latex; please take it to the maintainers. – Martin Schröder Mar 21 at 12:48

closed as too localized by Martin Schröder, barbara beeton, hpesoj626, lockstep, Andrew Swann Mar 21 at 13:23

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

Browse other questions tagged or ask your own question.