InsetArgument Code Questions

Richard Kimberly Heck rikiheck at lyx.org
Tue Oct 13 22:13:27 UTC 2020


First, there is a nodelim member for the latexarg struct, but there does
not seem to be any way to set it. Is this an oversight? If so, I can
write the necessary code.

Second, this looks puzzling to me:

void addArgInsets(Paragraph const & par, string const & prefix,
                 Layout::LaTeXArgMap const & latexargs,
                 map<int, InsetArgument const *> & ilist,
                 vector<string> & required)
{
    for (auto const & table : par.insetList()) {
        InsetArgument const * arg = table.inset->asInsetArgument();
        if (!arg)
            continue;
        if (arg->name().empty()) {
            LYXERR0("Error: Unnamed argument inset!");
            continue;
        }
        string const name = prefix.empty() ?
            arg->name() : split(arg->name(), ':');

At least at first glance, it seems as if we ought to be checking if the
RIGHT prefix is present here. If not, why not?

Riki




More information about the lyx-devel mailing list