#define XERR
#include "handler.ih"

void Handler::outputLatex()
{
    ifstream latexSkel{ g_options.latexSkeleton() };
    ofstream latexOut{ "job.latex" };

    if (not latexSkel)
        throw Exception{PANIC} << "cannot read `" << 
                                        g_options.latexSkeleton() << "'\n";

    size_t nlPos = 70;
    while (nlPos <= d_author.length())
    {
        nlPos = d_author.rfind(' ', nlPos);
        d_author.insert(nlPos + 1, "\\\\");
        nlPos += 72;
    }

    filter(latexOut, latexSkel);
}




