Doxygen
Loading...
Searching...
No Matches
latexgen.cpp File Reference
#include <cstdlib>
#include "latexgen.h"
#include "config.h"
#include "message.h"
#include "doxygen.h"
#include "util.h"
#include "diagram.h"
#include "language.h"
#include "version.h"
#include "dot.h"
#include "dotcallgraph.h"
#include "dotclassgraph.h"
#include "dotdirdeps.h"
#include "dotgroupcollaboration.h"
#include "dotincldepgraph.h"
#include "pagedef.h"
#include "docparser.h"
#include "docnode.h"
#include "latexdocvisitor.h"
#include "dirdef.h"
#include "cite.h"
#include "groupdef.h"
#include "classlist.h"
#include "namespacedef.h"
#include "filename.h"
#include "resourcemgr.h"
#include "portable.h"
#include "fileinfo.h"
#include "utf8.h"
#include "datetime.h"
#include "outputlist.h"
#include "moduledef.h"
Include dependency graph for latexgen.cpp:

Go to the source code of this file.

Macros

#define COPYCHAR()

Functions

static QCString substituteLatexKeywords (const QCString &file, const QCString &str, const QCString &title)
static void writeLatexMakefile ()
static void writeMakeBat ()
static void writeDefaultStyleSheet (TextStream &t)
static QCString extraLatexStyleSheet ()
static QCString makeIndex ()
static QCString latex_batchmode ()
static QCString objectLinkToString (const QCString &ref, const QCString &f, const QCString &anchor, const QCString &text, bool insideTabbing, bool disableLinks)
static void processEntity (TextStream &t, bool pdfHyperlinks, const char *strForm, const char *strRepl)
void writeExtraLatexPackages (TextStream &t)
void writeLatexSpecialFormulaChars (TextStream &t)
void filterLatexString (TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)
QCString convertToLaTeX (const QCString &s, bool insideTabbing, bool keepSpaces)
QCString latexEscapeLabelName (const QCString &s)
QCString latexEscapeIndexChars (const QCString &s)
QCString latexEscapePDFString (const QCString &s)
QCString latexFilterURL (const QCString &s)

Variables

static QCString g_header
static QCString g_header_file
static QCString g_footer
static QCString g_footer_file
static const SelectionMarkerInfo latexMarkerInfo = { '%', "%%BEGIN ",8 ,"%%END ",6, "",0 }

Macro Definition Documentation

◆ COPYCHAR

#define COPYCHAR ( )
Value:
do { \
int bytes = getUTF8CharNumBytes(c); \
if (lresult < (i + bytes + 1)) \
{ \
lresult += 512; \
result = static_cast<char *>(realloc(result, lresult)); \
} \
for (int j=0; j<bytes && *p; j++) \
{ \
result[i++]=*p++; \
} \
m_col++; \
} while(0)
uint8_t getUTF8CharNumBytes(char c)
Returns the number of bytes making up a single UTF8 character given the first byte in the sequence.
Definition utf8.cpp:23

Referenced by LatexCodeGenerator::codify().

Function Documentation

◆ convertToLaTeX()

QCString convertToLaTeX ( const QCString & s,
bool insideTabbing,
bool keepSpaces )

Definition at line 2553 of file latexgen.cpp.

2554{
2555 TextStream t;
2556 filterLatexString(t,s,insideTabbing,false,false,false,keepSpaces);
2557 return t.str();
2558}
Text streaming class that buffers data.
Definition textstream.h:36
std::string str() const
Return the contents of the buffer as a std::string object.
Definition textstream.h:229
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)

References filterLatexString(), and TextStream::str().

Referenced by LatexGenerator::endIndexSection(), objectLinkToString(), LatexGenerator::startIndexSection(), substituteLatexKeywords(), and LatexGenerator::writeInheritedSectionTitle().

◆ extraLatexStyleSheet()

QCString extraLatexStyleSheet ( )
static

Definition at line 739 of file latexgen.cpp.

740{
741 QCString result;
742 const StringVector &extraLatexStyles = Config_getList(LATEX_EXTRA_STYLESHEET);
743 for (const auto &fileName : extraLatexStyles)
744 {
745 if (!fileName.empty())
746 {
747 FileInfo fi(fileName);
748 if (fi.exists())
749 {
750 result += "\\usepackage{";
751 if (checkExtension(fi.fileName().c_str(), LATEX_STYLE_EXTENSION))
752 {
753 // strip the extension, it will be added by the usepackage in the tex conversion process
754 result += stripExtensionGeneral(fi.fileName().c_str(), LATEX_STYLE_EXTENSION);
755 }
756 else
757 {
758 result += fi.fileName();
759 }
760 result += "}\n";
761 }
762 }
763 }
764 return result;
765}
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
This is an alternative implementation of QCString.
Definition qcstring.h:101
#define Config_getList(name)
Definition config.h:38
std::vector< std::string > StringVector
Definition containers.h:33
#define LATEX_STYLE_EXTENSION
Definition latexgen.h:22
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
Definition util.cpp:5424
bool checkExtension(const QCString &fName, const QCString &ext)
Definition util.cpp:5407

References checkExtension(), Config_getList, FileInfo::exists(), FileInfo::fileName(), LATEX_STYLE_EXTENSION, and stripExtensionGeneral().

Referenced by substituteLatexKeywords().

◆ filterLatexString()

void filterLatexString ( TextStream & t,
const QCString & str,
bool insideTabbing,
bool insidePre,
bool insideItem,
bool insideTable,
bool keepSpaces,
const bool retainNewline )

Definition at line 2395 of file latexgen.cpp.

2397{
2398 if (str.isEmpty()) return;
2399 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2400 //printf("filterLatexString(%s) insideTabbing=%d\n",qPrint(str),insideTabbing);
2401 const char *p = str.data();
2402 const char *q = nullptr;
2403 unsigned char pc='\0';
2404
2405 while (*p)
2406 {
2407 unsigned char c=static_cast<unsigned char>(*p++);
2408
2409 if (insidePre)
2410 {
2411 switch(c)
2412 {
2413 case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
2414 // the LaTeX command \ucr has been defined in doxygen.sty
2415 if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
2416 {
2417 t << "{\\ucr}";
2418 p += 2;
2419 }
2420 else
2421 t << static_cast<char>(c);
2422 break;
2423 case '\\': t << "\\(\\backslash\\)"; break;
2424 case '{': t << "\\{"; break;
2425 case '}': t << "\\}"; break;
2426 case '_': t << "\\_"; break;
2427 case '&': t << "\\&"; break;
2428 case '%': t << "\\%"; break;
2429 case '#': t << "\\#"; break;
2430 case '$': t << "\\$"; break;
2431 case '"': t << "\"{}"; break;
2432 case '-': t << "-\\/"; break;
2433 case '^': insideTable ? t << "\\string^" : t << static_cast<char>(c); break;
2434 case '~': t << "\\string~"; break;
2435 case '\n': if (retainNewline) t << "\\newline"; else t << ' ';
2436 break;
2437 case ' ': if (keepSpaces) t << "~"; else t << ' ';
2438 break;
2439 default:
2440 if (c<32) t << ' '; // non printable control character
2441 else t << static_cast<char>(c);
2442 break;
2443 }
2444 }
2445 else
2446 {
2447 switch(c)
2448 {
2449 case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
2450 // the LaTeX command \ucr has been defined in doxygen.sty
2451 if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
2452 {
2453 t << "{\\ucr}";
2454 p += 2;
2455 }
2456 else
2457 t << static_cast<char>(c);
2458 break;
2459 case '#': t << "\\#"; break;
2460 case '$': t << "\\$"; break;
2461 case '%': t << "\\%"; break;
2462 case '^': processEntity(t,pdfHyperlinks,"$^\\wedge$","\\string^"); break;
2463 case '&': {
2464 // possibility to have a special symbol
2465 q = p;
2466 int cnt = 2; // we have to count & and ; as well
2467 while ((*q >= 'a' && *q <= 'z') || (*q >= 'A' && *q <= 'Z') || (*q >= '0' && *q <= '9'))
2468 {
2469 cnt++;
2470 q++;
2471 }
2472 if (*q == ';')
2473 {
2474 --p; // we need & as well
2477 {
2478 p++;
2479 t << "\\&";
2480 }
2481 else
2482 {
2484 q++;
2485 p = q;
2486 }
2487 }
2488 else
2489 {
2490 t << "\\&";
2491 }
2492 }
2493 break;
2494 case '*': processEntity(t,pdfHyperlinks,"$\\ast$","*"); break;
2495 case '_': if (!insideTabbing) t << "\\+";
2496 t << "\\_";
2497 if (!insideTabbing) t << "\\+";
2498 break;
2499 case '{': t << "\\{"; break;
2500 case '}': t << "\\}"; break;
2501 case '<': t << "$<$"; break;
2502 case '>': t << "$>$"; break;
2503 case '|': processEntity(t,pdfHyperlinks,"$\\vert$","|"); break;
2504 case '~': processEntity(t,pdfHyperlinks,"$\\sim$","\\string~"); break;
2505 case '[': if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2506 t << "\\mbox{[}";
2507 else
2508 t << "[";
2509 break;
2510 case ']': if (pc=='[') t << "$\\,$";
2511 if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2512 t << "\\mbox{]}";
2513 else
2514 t << "]";
2515 break;
2516 case '-': t << "-\\/";
2517 break;
2518 case '\\': t << "\\textbackslash{}";
2519 break;
2520 case '"': t << "\"{}";
2521 break;
2522 case '`': t << "\\`{}";
2523 break;
2524 case '\'': t << "\\textquotesingle{}";
2525 break;
2526 case '\n': if (retainNewline) t << "\\newline"; else t << ' ';
2527 break;
2528 case ' ': if (keepSpaces) { if (insideTabbing) t << "\\>"; else t << '~'; } else t << ' ';
2529 break;
2530
2531 default:
2532 //if (!insideTabbing && forceBreaks && c!=' ' && *p!=' ')
2533 if (!insideTabbing &&
2534 ((c>='A' && c<='Z' && pc!=' ' && !(pc>='A' && pc <= 'Z') && pc!='\0' && *p) || (c==':' && pc!=':') || (pc=='.' && isId(c)))
2535 )
2536 {
2537 t << "\\+";
2538 }
2539 if (c<32)
2540 {
2541 t << ' '; // non-printable control character
2542 }
2543 else
2544 {
2545 t << static_cast<char>(c);
2546 }
2547 }
2548 }
2549 pc = c;
2550 }
2551}
const char * latex(SymType symb) const
Access routine to the LaTeX code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
#define Config_getBool(name)
Definition config.h:33
bool insideTable(const DocNodeVariant *n)
static void processEntity(TextStream &t, bool pdfHyperlinks, const char *strForm, const char *strRepl)
bool isId(int c)
Definition util.h:208

References Config_getBool, QCString::data(), insideTable(), HtmlEntityMapper::instance(), QCString::isEmpty(), isId(), HtmlEntityMapper::latex(), HtmlEntityMapper::name2sym(), processEntity(), and HtmlEntityMapper::Sym_Unknown.

Referenced by LatexCodeGenerator::codify(), convertToLaTeX(), LatexGenerator::docify(), LatexDocVisitor::filter(), latexEscapeIndexChars(), latexEscapeLabelName(), and substituteLatexKeywords().

◆ latex_batchmode()

QCString latex_batchmode ( )
static

Definition at line 785 of file latexgen.cpp.

786{
787 switch (Config_getEnum(LATEX_BATCHMODE))
788 {
789 case LATEX_BATCHMODE_t::NO: return "";
790 case LATEX_BATCHMODE_t::YES: return "\\batchmode";
791 case LATEX_BATCHMODE_t::BATCH: return "\\batchmode";
792 case LATEX_BATCHMODE_t::NON_STOP: return "\\nonstopmode";
793 case LATEX_BATCHMODE_t::SCROLL: return "\\scrollmode";
794 case LATEX_BATCHMODE_t::ERROR_STOP: return "\\errorstopmode";
795 }
796 return "";
797}
#define Config_getEnum(name)
Definition config.h:35

References Config_getEnum.

Referenced by substituteLatexKeywords().

◆ latexEscapeIndexChars()

QCString latexEscapeIndexChars ( const QCString & s)

Definition at line 2605 of file latexgen.cpp.

2606{
2607 //printf("latexEscapeIndexChars(%s)\n",qPrint(s));
2608 if (s.isEmpty()) return s;
2610 TextStream t;
2611 const char *p=s.data();
2612 char c = 0;
2613 while ((c=*p++))
2614 {
2615 switch (c)
2616 {
2617 case '!': t << "\"!"; break;
2618 case '"': t << "\"\""; break;
2619 case '@': t << "\"@"; break;
2620 case '|': t << "\\texttt{\"|}"; break;
2621 case '[': t << "["; break;
2622 case ']': t << "]"; break;
2623 case '{': t << "\\lcurly{}"; break;
2624 case '}': t << "\\rcurly{}"; break;
2625 // NOTE: adding a case here, means adding it to while below as well!
2626 default:
2627 {
2628 int i=0;
2629 // collect as long string as possible, before handing it to docify
2630 tmp[i++]=c;
2631 while ((c=*p) && c!='"' && c!='@' && c!='[' && c!=']' && c!='!' && c!='{' && c!='}' && c!='|')
2632 {
2633 tmp[i++]=c;
2634 p++;
2635 }
2636 tmp[i]=0;
2637 filterLatexString(t,tmp,
2638 true, // insideTabbing
2639 false, // insidePre
2640 false, // insideItem
2641 false, // insideTable
2642 false // keepSpaces
2643 );
2644 }
2645 break;
2646 }
2647 }
2648 return t.str();
2649}
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
@ ExplicitSize
Definition qcstring.h:133

References QCString::data(), QCString::ExplicitSize, filterLatexString(), QCString::isEmpty(), QCString::length(), and TextStream::str().

Referenced by LatexGenerator::addIndexItem(), LatexGenerator::endTitleHead(), LatexDocVisitor::operator()(), and LatexGenerator::startMemberDoc().

◆ latexEscapeLabelName()

QCString latexEscapeLabelName ( const QCString & s)

Definition at line 2560 of file latexgen.cpp.

2561{
2562 //printf("latexEscapeLabelName(%s)\n",qPrint(s));
2563 if (s.isEmpty()) return s;
2565 TextStream t;
2566 const char *p=s.data();
2567 char c = 0;
2568 while ((c=*p++))
2569 {
2570 switch (c)
2571 {
2572 case '|': t << "\\texttt{\"|}"; break;
2573 case '!': t << "\"!"; break;
2574 case '@': t << "\"@"; break;
2575 case '%': t << "\\%"; break;
2576 case '{': t << "\\lcurly{}"; break;
2577 case '}': t << "\\rcurly{}"; break;
2578 case '~': t << "````~"; break; // to get it a bit better in index together with other special characters
2579 // NOTE: adding a case here, means adding it to while below as well!
2580 default:
2581 {
2582 int i=0;
2583 // collect as long string as possible, before handing it to docify
2584 tmp[i++]=c;
2585 while ((c=*p) && c!='@' && c!='[' && c!=']' && c!='!' && c!='{' && c!='}' && c!='|')
2586 {
2587 tmp[i++]=c;
2588 p++;
2589 }
2590 tmp[i]=0;
2591 filterLatexString(t,tmp,
2592 true, // insideTabbing
2593 false, // insidePre
2594 false, // insideItem
2595 false, // insideTable
2596 false // keepSpaces
2597 );
2598 }
2599 break;
2600 }
2601 }
2602 return t.str();
2603}

References QCString::data(), QCString::ExplicitSize, filterLatexString(), QCString::isEmpty(), QCString::length(), and TextStream::str().

Referenced by LatexGenerator::addIndexItem(), LatexGenerator::endTitleHead(), LatexDocVisitor::operator()(), and LatexGenerator::startMemberDoc().

◆ latexEscapePDFString()

QCString latexEscapePDFString ( const QCString & s)

Definition at line 2651 of file latexgen.cpp.

2652{
2653 if (s.isEmpty()) return s;
2654 TextStream t;
2655 const char *p=s.data();
2656 char c = 0;
2657 while ((c=*p++))
2658 {
2659 switch (c)
2660 {
2661 case '\\': t << "\\textbackslash{}"; break;
2662 case '{': t << "\\{"; break;
2663 case '}': t << "\\}"; break;
2664 case '_': t << "\\_"; break;
2665 case '%': t << "\\%"; break;
2666 case '&': t << "\\&"; break;
2667 case '#': t << "\\#"; break;
2668 case '$': t << "\\$"; break;
2669 case '^': t << "\\string^"; break;
2670 case '~': t << "\\string~"; break;
2671 default:
2672 t << c;
2673 break;
2674 }
2675 }
2676 return t.str();
2677}

References QCString::data(), QCString::isEmpty(), and TextStream::str().

Referenced by LatexGenerator::startMemberDoc().

◆ latexFilterURL()

QCString latexFilterURL ( const QCString & s)

Definition at line 2679 of file latexgen.cpp.

2680{
2681 constexpr auto hex = "0123456789ABCDEF";
2682 if (s.isEmpty()) return s;
2683 TextStream t;
2684 const char *p=s.data();
2685 char c = 0;
2686 while ((c=*p++))
2687 {
2688 switch (c)
2689 {
2690 case '#': t << "\\#"; break;
2691 case '%': t << "\\%"; break;
2692 case '\\': t << "\\\\"; break;
2693 default:
2694 if (c<0)
2695 {
2696 unsigned char id = static_cast<unsigned char>(c);
2697 t << "\\%" << hex[id>>4] << hex[id&0xF];
2698 }
2699 else
2700 {
2701 t << c;
2702 }
2703 break;
2704 }
2705 }
2706 return t.str();
2707}
static constexpr auto hex

References QCString::data(), hex, QCString::isEmpty(), and TextStream::str().

Referenced by LatexDocVisitor::operator()(), and LatexDocVisitor::operator()().

◆ makeIndex()

QCString makeIndex ( )
static

Definition at line 767 of file latexgen.cpp.

768{
769 QCString result;
770 QCString latex_mkidx_command = Config_getString(LATEX_MAKEINDEX_CMD);
771 if (!latex_mkidx_command.isEmpty())
772 {
773 if (latex_mkidx_command[0] == '\\')
774 result += latex_mkidx_command;
775 else
776 result += "\\"+latex_mkidx_command;
777 }
778 else
779 {
780 result += "\\makeindex";
781 }
782 return result;
783}
#define Config_getString(name)
Definition config.h:32

References Config_getString, and QCString::isEmpty().

Referenced by substituteLatexKeywords().

◆ objectLinkToString()

QCString objectLinkToString ( const QCString & ref,
const QCString & f,
const QCString & anchor,
const QCString & text,
bool insideTabbing,
bool disableLinks )
static

Definition at line 1412 of file latexgen.cpp.

1415{
1416 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1417 QCString result;
1418 if (!disableLinks && ref.isEmpty() && pdfHyperlinks)
1419 {
1420 result += "\\mbox{\\hyperlink{";
1421 if (!f.isEmpty()) result += stripPath(f);
1422 if (!f.isEmpty() && !anchor.isEmpty()) result += "_";
1423 if (!anchor.isEmpty()) result += anchor;
1424 result += "}{";
1425 result += convertToLaTeX(text,insideTabbing);
1426 result += "}}";
1427 }
1428 else
1429 {
1430 result += "\\textbf{ ";
1431 result += convertToLaTeX(text,insideTabbing);
1432 result += "}";
1433 }
1434 return result;
1435}
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
QCString stripPath(const QCString &s)
Definition util.cpp:5461

References Config_getBool, convertToLaTeX(), QCString::isEmpty(), and stripPath().

◆ processEntity()

void processEntity ( TextStream & t,
bool pdfHyperlinks,
const char * strForm,
const char * strRepl )
static

Definition at line 1437 of file latexgen.cpp.

1438{
1439 if (pdfHyperlinks)
1440 {
1441 t << "\\texorpdfstring{";
1442 }
1443 t << strForm;
1444 if (pdfHyperlinks)
1445 {
1446 t << "}{" << strRepl << "}";
1447 }
1448}

Referenced by filterLatexString().

◆ substituteLatexKeywords()

QCString substituteLatexKeywords ( const QCString & file,
const QCString & str,
const QCString & title )
static

Definition at line 799 of file latexgen.cpp.

802{
803 bool compactLatex = Config_getBool(COMPACT_LATEX);
804 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
805 bool usePdfLatex = Config_getBool(USE_PDFLATEX);
806 QCString paperType = Config_getEnumAsString(PAPER_TYPE);
807
808 QCString style = Config_getString(LATEX_BIB_STYLE);
809 if (style.isEmpty())
810 {
811 style="plainnat";
812 }
813
814 TextStream tg;
815 QCString generatedBy;
816 auto timeStamp = Config_getEnum(TIMESTAMP);
817 switch (timeStamp)
818 {
819 case TIMESTAMP_t::YES:
820 case TIMESTAMP_t::DATETIME:
821 generatedBy = theTranslator->trGeneratedAt(dateToString(DateTimeType::DateTime),
822 Config_getString(PROJECT_NAME));
823 break;
824 case TIMESTAMP_t::DATE:
825 generatedBy = theTranslator->trGeneratedAt(dateToString(DateTimeType::Date),
826 Config_getString(PROJECT_NAME));
827 break;
828 case TIMESTAMP_t::NO:
829 generatedBy = theTranslator->trGeneratedBy();
830 break;
831 }
832 filterLatexString(tg, generatedBy,
833 false, // insideTabbing
834 false, // insidePre
835 false, // insideItem
836 false, // insideTable
837 false // keepSpaces
838 );
839 generatedBy = tg.str();
840
841 QCString latexFontenc = theTranslator->latexFontenc();
842
843 QCString latexEmojiDirectory = Config_getString(LATEX_EMOJI_DIRECTORY);
844 if (latexEmojiDirectory.isEmpty()) latexEmojiDirectory = ".";
845 latexEmojiDirectory = substitute(latexEmojiDirectory,"\\","/");
846
847 TextStream tg1;
849 QCString extraLatexPackages = tg1.str();
850
851 TextStream tg2;
853 QCString latexSpecialFormulaChars = tg2.str();
854
855 QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
856 QCString stripMacroFile;
857 if (!formulaMacrofile.isEmpty())
858 {
859 FileInfo fi(formulaMacrofile.str());
860 formulaMacrofile=fi.absFilePath();
861 stripMacroFile = fi.fileName();
862 copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
863 }
864
865 QCString projectNumber = Config_getString(PROJECT_NUMBER);
866
867 // first substitute generic keywords
868 QCString result = substituteKeywords(file,str,title,
869 convertToLaTeX(Config_getString(PROJECT_NAME),false),
870 convertToLaTeX(projectNumber,false),
871 convertToLaTeX(Config_getString(PROJECT_BRIEF),false));
872
873 // additional LaTeX only keywords
874 result = substituteKeywords(file,result,
875 {
876 // keyword value getter
877 { "$datetime", [&]() { return dateToString(DateTimeType::DateTime); } },
878 { "$date", [&]() { return dateToString(DateTimeType::Date); } },
879 { "$time", [&]() { return dateToString(DateTimeType::Time); } },
880 { "$year", [&]() { return yearToString(); } },
881 { "$latexdocumentpre", [&]() { return theTranslator->latexDocumentPre(); } },
882 { "$latexdocumentpost", [&]() { return theTranslator->latexDocumentPost(); } },
883 { "$generatedby", [&]() { return generatedBy; } },
884 { "$latexbibstyle", [&]() { return style; } },
885 { "$latexcitereference", [&]() { return theTranslator->trCiteReferences(); } },
886 { "$latexbibfiles", [&]() { return CitationManager::instance().latexBibFiles(); } },
887 { "$papertype", [&]() { return paperType+"paper"; } },
888 { "$extralatexstylesheet", [&]() { return extraLatexStyleSheet(); } },
889 { "$languagesupport", [&]() { return theTranslator->latexLanguageSupportCommand(); } },
890 { "$latexfontenc", [&]() { return latexFontenc; } },
891 { "$latexfont", [&]() { return theTranslator->latexFont(); } },
892 { "$latexemojidirectory", [&]() { return latexEmojiDirectory; } },
893 { "$makeindex", [&]() { return makeIndex(); } },
894 { "$extralatexpackages", [&]() { return extraLatexPackages; } },
895 { "$latexspecialformulachars", [&]() { return latexSpecialFormulaChars; } },
896 { "$formulamacrofile", [&]() { return stripMacroFile; } },
897 { "$latex_batchmode", [&]() { return latex_batchmode(); } }
898 });
899
900 // remove conditional blocks
901 result = selectBlocks(result,
902 {
903 // marker is enabled
904 { "CITATIONS_PRESENT", !CitationManager::instance().isEmpty() },
905 { "COMPACT_LATEX", compactLatex },
906 { "PDF_HYPERLINKS", pdfHyperlinks },
907 { "USE_PDFLATEX", usePdfLatex },
908 { "TIMESTAMP", timeStamp!=TIMESTAMP_t::NO },
909 { "LATEX_FONTENC", !latexFontenc.isEmpty() },
910 { "FORMULA_MACROFILE", !formulaMacrofile.isEmpty() },
911 { "PROJECT_NUMBER", !projectNumber.isEmpty() }
913
914 result = removeEmptyLines(result);
915
916 return result;
917}
QCString latexBibFiles()
lists the bibtex cite files in a comma separated list
Definition cite.cpp:577
static CitationManager & instance()
Definition cite.cpp:86
bool isEmpty() const
return TRUE if there are no citations.
Definition cite.cpp:117
const std::string & str() const
Definition qcstring.h:537
#define Config_getEnumAsString(name)
Definition config.h:36
QCString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
Definition datetime.cpp:63
QCString yearToString()
Returns the current year as a string.
Definition datetime.cpp:76
Translator * theTranslator
Definition language.cpp:71
static QCString latex_batchmode()
Definition latexgen.cpp:785
static QCString makeIndex()
Definition latexgen.cpp:767
static const SelectionMarkerInfo latexMarkerInfo
Definition latexgen.cpp:55
static QCString extraLatexStyleSheet()
Definition latexgen.cpp:739
void writeExtraLatexPackages(TextStream &t)
void writeLatexSpecialFormulaChars(TextStream &t)
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:477
QCString removeEmptyLines(const QCString &s)
Definition util.cpp:7097
QCString selectBlocks(const QCString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
Definition util.cpp:6920
QCString substituteKeywords(const QCString &file, const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3572
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition util.cpp:6370

References FileInfo::absFilePath(), Config_getBool, Config_getEnum, Config_getEnumAsString, Config_getString, convertToLaTeX(), copyFile(), Date, DateTime, dateToString(), extraLatexStyleSheet(), FileInfo::fileName(), filterLatexString(), CitationManager::instance(), CitationManager::isEmpty(), QCString::isEmpty(), latex_batchmode(), CitationManager::latexBibFiles(), latexMarkerInfo, makeIndex(), removeEmptyLines(), selectBlocks(), QCString::str(), TextStream::str(), substitute(), substituteKeywords(), theTranslator, Time, writeExtraLatexPackages(), writeLatexSpecialFormulaChars(), and yearToString().

Referenced by LatexGenerator::endIndexSection(), LatexGenerator::init(), and LatexGenerator::startIndexSection().

◆ writeDefaultStyleSheet()

void writeDefaultStyleSheet ( TextStream & t)
static

Definition at line 686 of file latexgen.cpp.

687{
688 t << ResourceMgr::instance().getAsString("doxygen.sty");
689}
static ResourceMgr & instance()
Returns the one and only instance of this class.
QCString getAsString(const QCString &name) const
Gets the resource data as a C string.

References ResourceMgr::getAsString(), and ResourceMgr::instance().

◆ writeExtraLatexPackages()

void writeExtraLatexPackages ( TextStream & t)

Definition at line 2334 of file latexgen.cpp.

2335{
2336 // User-specified packages
2337 const StringVector &extraPackages = Config_getList(EXTRA_PACKAGES);
2338 if (!extraPackages.empty())
2339 {
2340 t << "% Packages requested by user\n";
2341 for (const auto &pkgName : extraPackages)
2342 {
2343 if ((pkgName[0] == '[') || (pkgName[0] == '{'))
2344 t << "\\usepackage" << pkgName.c_str() << "\n";
2345 else
2346 t << "\\usepackage{" << pkgName.c_str() << "}\n";
2347 }
2348 t << "\n";
2349 }
2350}

References Config_getList.

Referenced by FormulaManager::createLatexFile(), and substituteLatexKeywords().

◆ writeLatexMakefile()

void writeLatexMakefile ( )
static

Definition at line 367 of file latexgen.cpp.

368{
369 bool generateBib = !CitationManager::instance().isEmpty();
370 QCString fileName=Config_getString(LATEX_OUTPUT)+"/Makefile";
371 std::ofstream f = Portable::openOutputStream(fileName);
372 if (!f.is_open())
373 {
374 term("Could not open file {} for writing\n",fileName);
375 }
376 TextStream t(&f);
377 // inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
378 QCString latex_command = theTranslator->latexCommandName().quoted();
379 QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME).quoted();
380 QCString bibtex_command = "bibtex";
381 QCString manual_file = "refman";
382 const int latex_count = 8;
383 // end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
384 t << "LATEX_CMD?=" << latex_command << "\n"
385 << "MKIDX_CMD?=" << mkidx_command << "\n"
386 << "BIBTEX_CMD?=" << bibtex_command << "\n"
387 << "LATEX_COUNT?=" << latex_count << "\n"
388 << "MANUAL_FILE?=" << manual_file << "\n"
389 << "\n";
390 if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
391 {
392 t << "all: $(MANUAL_FILE).dvi\n"
393 << "\n"
394 << "ps: $(MANUAL_FILE).ps\n"
395 << "\n"
396 << "pdf: $(MANUAL_FILE).pdf\n"
397 << "\n"
398 << "ps_2on1: $(MANUAL_FILE).ps\n"
399 << "\n"
400 << "pdf_2on1: $(MANUAL_FILE).pdf\n"
401 << "\n"
402 << "$(MANUAL_FILE).ps: $(MANUAL_FILE).dvi\n"
403 << "\tdvips -o $(MANUAL_FILE).ps $(MANUAL_FILE).dvi\n"
404 << "\n";
405 t << "$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n";
406 t << "\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n\n";
407 t << "$(MANUAL_FILE).dvi: clean $(MANUAL_FILE).tex doxygen.sty\n"
408 << "\techo \"Running latex...\"\n"
409 << "\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
410 << "\tif [ $$? != 0 ] ; then \\\n"
411 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
412 << "\t false; \\\n"
413 << "\tfi\n"
414 << "\techo \"Running makeindex...\"\n"
415 << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
416 if (generateBib)
417 {
418 t << "\techo \"Running bibtex...\"\n";
419 t << "\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
420 t << "\techo \"Rerunning latex....\"\n";
421 t << "\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
422 << "\tif [ $$? != 0 ] ; then \\\n"
423 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
424 << "\t false; \\\n"
425 << "\tfi\n";
426 }
427 t << "\techo \"Rerunning latex....\"\n"
428 << "\t$(LATEX_CMD) $(MANUAL_FILE).tex\n"
429 << "\tlatex_count=$(LATEX_COUNT) ; \\\n"
430 << "\twhile grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
431 << "\t do \\\n"
432 << "\t echo \"Rerunning latex....\" ;\\\n"
433 << "\t $(LATEX_CMD) $(MANUAL_FILE).tex ; \\\n"
434 << "\t $(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
435 << "\t if [ $$? != 0 ] ; then \\\n"
436 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
437 << "\t false; \\\n"
438 << "\t fi; \\\n"
439 << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
440 << "\t done\n"
441 << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
442 << "\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
443 << "\tif [ $$? != 0 ] ; then \\\n"
444 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
445 << "\t false; \\\n"
446 << "\tfi\n"
447 << "$(MANUAL_FILE).ps: $(MANUAL_FILE).ps\n"
448 << "\tpsnup -2 $(MANUAL_FILE).ps >$(MANUAL_FILE).ps\n"
449 << "\n"
450 << "$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n"
451 << "\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n";
452 }
453 else // use pdflatex for higher quality output
454 {
455 t << "all: $(MANUAL_FILE).pdf\n\n"
456 << "pdf: $(MANUAL_FILE).pdf\n\n";
457 t << "$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex\n";
458 t << "\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
459 << "\tif [ $$? != 0 ] ; then \\\n"
460 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
461 << "\t false; \\\n"
462 << "\tfi\n";
463 t << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
464 if (generateBib)
465 {
466 t << "\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
467 t << "\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
468 << "\tif [ $$? != 0 ] ; then \\\n"
469 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
470 << "\t false; \\\n"
471 << "\tfi\n";
472 }
473 t << "\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
474 << "\tif [ $$? != 0 ] ; then \\\n"
475 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
476 << "\t false; \\\n"
477 << "\tfi\n"
478 << "\tlatex_count=$(LATEX_COUNT) ; \\\n"
479 << "\twhile grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
480 << "\t do \\\n"
481 << "\t echo \"Rerunning latex....\" ;\\\n"
482 << "\t $(LATEX_CMD) $(MANUAL_FILE) || \\\n"
483 << "\t if [ $$? != 0 ] ; then \\\n"
484 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
485 << "\t false; \\\n"
486 << "\t fi; \\\n"
487 << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
488 << "\t done\n"
489 << "\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
490 << "\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
491 << "\tif [ $$? != 0 ] ; then \\\n"
492 << "\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
493 << "\t false; \\\n"
494 << "\tfi\n";
495 }
496
497 t << "\n"
498 << "clean:\n"
499 << "\trm -f "
500 << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf\n";
501}
QCString quoted() const
Definition qcstring.h:260
#define term(fmt,...)
Definition message.h:137
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665

References Config_getBool, Config_getString, CitationManager::instance(), CitationManager::isEmpty(), Portable::openOutputStream(), QCString::quoted(), term, and theTranslator.

Referenced by LatexGenerator::init().

◆ writeLatexSpecialFormulaChars()

void writeLatexSpecialFormulaChars ( TextStream & t)

Definition at line 2352 of file latexgen.cpp.

2353{
2354 unsigned char minus[4]; // Superscript minus
2355 unsigned char sup2[3]; // Superscript two
2356 unsigned char sup3[3];
2357 minus[0]= 0xE2;
2358 minus[1]= 0x81;
2359 minus[2]= 0xBB;
2360 minus[3]= 0;
2361 sup2[0]= 0xC2;
2362 sup2[1]= 0xB2;
2363 sup2[2]= 0;
2364 sup3[0]= 0xC2;
2365 sup3[1]= 0xB3;
2366 sup3[2]= 0;
2367
2368 t << "\\ifPDFTeX\n";
2369 t << "\\usepackage{newunicodechar}\n";
2370 // taken from the newunicodechar package and removed the warning message
2371 // actually forcing to redefine the unicode character
2372 t << " \\makeatletter\n"
2373 " \\def\\doxynewunicodechar#1#2{%\n"
2374 " \\@tempswafalse\n"
2375 " \\edef\\nuc@tempa{\\detokenize{#1}}%\n"
2376 " \\if\\relax\\nuc@tempa\\relax\n"
2377 " \\nuc@emptyargerr\n"
2378 " \\else\n"
2379 " \\edef\\@tempb{\\expandafter\\@car\\nuc@tempa\\@nil}%\n"
2380 " \\nuc@check\n"
2381 " \\if@tempswa\n"
2382 " \\@namedef{u8:\\nuc@tempa}{#2}%\n"
2383 " \\fi\n"
2384 " \\fi\n"
2385 " }\n"
2386 " \\makeatother\n";
2387
2388 t << " \\doxynewunicodechar{" << minus << "}{${}^{-}$}% Superscript minus\n"
2389 " \\doxynewunicodechar{" << sup2 << "}{${}^{2}$}% Superscript two\n"
2390 " \\doxynewunicodechar{" << sup3 << "}{${}^{3}$}% Superscript three\n"
2391 "\n";
2392 t << "\\fi\n";
2393}

Referenced by FormulaManager::createLatexFile(), and substituteLatexKeywords().

◆ writeMakeBat()

void writeMakeBat ( )
static

Definition at line 503 of file latexgen.cpp.

504{
505#if defined(_MSC_VER)
506 QCString dir=Config_getString(LATEX_OUTPUT);
507 QCString fileName=dir+"/make.bat";
508 QCString latex_command = theTranslator->latexCommandName().quoted();
509 QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME).quoted();
510 QCString bibtex_command = "bibtex";
511 QCString manual_file = "refman";
512 const int latex_count = 8;
513 bool generateBib = !CitationManager::instance().isEmpty();
514 std::ofstream t = Portable::openOutputStream(fileName);
515 if (!t.is_open())
516 {
517 term("Could not open file {} for writing\n",fileName);
518 }
519 t << "pushd %~dp0\r\n";
520 t << "if not %errorlevel% == 0 goto :end1\r\n";
521 t << "\r\n";
522 t << "set ORG_LATEX_CMD=%LATEX_CMD%\r\n";
523 t << "set ORG_MKIDX_CMD=%MKIDX_CMD%\r\n";
524 t << "set ORG_BIBTEX_CMD=%BIBTEX_CMD%\r\n";
525 t << "set ORG_LATEX_COUNT=%LATEX_COUNT%\r\n";
526 t << "set ORG_MANUAL_FILE=%MANUAL_FILE%\r\n";
527 t << "if \"X\"%LATEX_CMD% == \"X\" set LATEX_CMD=" << latex_command << "\r\n";
528 t << "if \"X\"%MKIDX_CMD% == \"X\" set MKIDX_CMD=" << mkidx_command << "\r\n";
529 t << "if \"X\"%BIBTEX_CMD% == \"X\" set BIBTEX_CMD=" << bibtex_command << "\r\n";
530 t << "if \"X\"%LATEX_COUNT% == \"X\" set LATEX_COUNT=" << latex_count << "\r\n";
531 t << "if \"X\"%MANUAL_FILE% == \"X\" set MANUAL_FILE=" << manual_file << "\r\n";
532 t << "\r\n";
533 t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf\r\n\r\n";
534 t << "\r\n";
535 if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
536 {
537 t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
538 t << "@if ERRORLEVEL 1 goto :error\r\n";
539 t << "echo ----\r\n";
540 t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
541 if (generateBib)
542 {
543 t << "%BIBTEX_CMD% %MANUAL_FILE%\r\n";
544 t << "echo ----\r\n";
545 t << "\t%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
546 t << "@if ERRORLEVEL 1 goto :error\r\n";
547 }
548 t << "setlocal enabledelayedexpansion\r\n";
549 t << "set count=%LAT#EX_COUNT%\r\n";
550 t << ":repeat\r\n";
551 t << "set content=X\r\n";
552 t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
553 t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
554 t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
555 t << "if !content! == X goto :skip\r\n";
556 t << "set /a count-=1\r\n";
557 t << "if !count! EQU 0 goto :skip\r\n\r\n";
558 t << "echo ----\r\n";
559 t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
560 t << "@if ERRORLEVEL 1 goto :error\r\n";
561 t << "goto :repeat\r\n";
562 t << ":skip\r\n";
563 t << "endlocal\r\n";
564 t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
565 t << "%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
566 t << "@if ERRORLEVEL 1 goto :error\r\n";
567 t << "dvips -o %MANUAL_FILE%.ps %MANUAL_FILE%.dvi\r\n";
569 t << " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
570 "-sOutputFile=%MANUAL_FILE%.pdf -c save pop -f %MANUAL_FILE%.ps\r\n";
571 }
572 else // use pdflatex
573 {
574 t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
575 t << "@if ERRORLEVEL 1 goto :error\r\n";
576 t << "echo ----\r\n";
577 t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
578 if (generateBib)
579 {
580 t << "%BIBTEX_CMD% %MANUAL_FILE%\r\n";
581 t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
582 t << "@if ERRORLEVEL 1 goto :error\r\n";
583 }
584 t << "echo ----\r\n";
585 t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
586 t << "@if ERRORLEVEL 1 goto :error\r\n";
587 t << "\r\n";
588 t << "setlocal enabledelayedexpansion\r\n";
589 t << "set count=%LATEX_COUNT%\r\n";
590 t << ":repeat\r\n";
591 t << "set content=X\r\n";
592 t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
593 t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
594 t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
595 t << "if !content! == X goto :skip\r\n";
596 t << "set /a count-=1\r\n";
597 t << "if !count! EQU 0 goto :skip\r\n\r\n";
598 t << "echo ----\r\n";
599 t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
600 t << "@if ERRORLEVEL 1 goto :error\r\n";
601 t << "goto :repeat\r\n";
602 t << ":skip\r\n";
603 t << "endlocal\r\n";
604 t << "%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
605 t << "%LATEX_CMD% %MANUAL_FILE%\r\n";
606 t << "@if ERRORLEVEL 1 goto :error\r\n";
607 }
608 t<< "\r\n";
609 t << "goto :end\r\n";
610 t << ":error\r\n";
611 t << "@echo ===============\r\n";
612 t << "@echo Please consult %MANUAL_FILE%.log to see the error messages\r\n";
613 t << "@echo ===============\r\n";
614 t<< "\r\n";
615 t<< ":end\r\n";
616 t<< "@REM reset environment\r\n";
617 t<< "popd\r\n";
618 t<< "set LATEX_CMD=%ORG_LATEX_CMD%\r\n";
619 t<< "set ORG_LATEX_CMD=\r\n";
620 t<< "set MKIDX_CMD=%ORG_MKIDX_CMD%\r\n";
621 t<< "set ORG_MKIDX_CMD=\r\n";
622 t<< "set BIBTEX_CMD=%ORG_BIBTEX_CMD%\r\n";
623 t<< "set ORG_BIBTEX_CMD=\r\n";
624 t<< "set MANUAL_FILE=%ORG_MANUAL_FILE%\r\n";
625 t<< "set ORG_MANUAL_FILE=\r\n";
626 t<< "set LATEX_COUNT=%ORG_LATEX_COUNT%\r\n";
627 t<< "set ORG_LATEX_COUNT=\r\n";
628 t<< "\r\n";
629 t<< ":end1\r\n";
630#endif
631}
const char * ghostScriptCommand()
Definition portable.cpp:454

References Config_getBool, Config_getString, Portable::ghostScriptCommand(), CitationManager::instance(), CitationManager::isEmpty(), Portable::openOutputStream(), QCString::quoted(), term, and theTranslator.

Referenced by LatexGenerator::init().

Variable Documentation

◆ g_footer

QCString g_footer
static

Definition at line 53 of file latexgen.cpp.

◆ g_footer_file

QCString g_footer_file
static

Definition at line 54 of file latexgen.cpp.

◆ g_header

QCString g_header
static

Definition at line 51 of file latexgen.cpp.

◆ g_header_file

QCString g_header_file
static

Definition at line 52 of file latexgen.cpp.

◆ latexMarkerInfo

const SelectionMarkerInfo latexMarkerInfo = { '%', "%%BEGIN ",8 ,"%%END ",6, "",0 }
static

Definition at line 55 of file latexgen.cpp.

55{ '%', "%%BEGIN ",8 ,"%%END ",6, "",0 };

Referenced by LatexGenerator::init(), and substituteLatexKeywords().