Skip to content

Commit

Permalink
Incorrect macro file name in LaTeX
Browse files Browse the repository at this point in the history
In the "refman.tex" we see that for the macroFilename the original file is used instead of the to the LATEX_OUTPUT directory copied file name.
  • Loading branch information
albert-github committed Jan 6, 2022
1 parent 4e6d060 commit 0cedb76
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/latexgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,12 @@ static QCString substituteLatexKeywords(const QCString &str,
QCString latexSpecialFormulaChars = tg2.str();

QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
QCString stripMacroFile;
if (!formulaMacrofile.isEmpty())
{
FileInfo fi(formulaMacrofile.str());
formulaMacrofile=fi.absFilePath();
QCString stripMacroFile = fi.fileName();
stripMacroFile = fi.fileName();
copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
}

Expand All @@ -684,7 +685,7 @@ static QCString substituteLatexKeywords(const QCString &str,
result = substitute(result,"$makeindex",makeIndex());
result = substitute(result,"$extralatexpackages",extraLatexPackages);
result = substitute(result,"$latexspecialformulachars",latexSpecialFormulaChars);
result = substitute(result,"$formulamacrofile",formulaMacrofile);
result = substitute(result,"$formulamacrofile",stripMacroFile);

// additional LaTeX only conditional blocks
result = selectBlock(result,"CITATIONS_PRESENT", !CitationManager::instance().isEmpty(),OutputGenerator::Latex);
Expand Down

0 comments on commit 0cedb76

Please sign in to comment.