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 2545 of file latexgen.cpp.

2546{
2547 TextStream t;
2548 filterLatexString(t,s,insideTabbing,false,false,false,keepSpaces);
2549 return t.str();
2550}
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:5430
bool checkExtension(const QCString &fName, const QCString &ext)
Definition util.cpp:5413

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 2387 of file latexgen.cpp.

2389{
2390 if (str.isEmpty()) return;
2391 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
2392 //printf("filterLatexString(%s) insideTabbing=%d\n",qPrint(str),insideTabbing);
2393 const char *p = str.data();
2394 const char *q = nullptr;
2395 unsigned char pc='\0';
2396
2397 while (*p)
2398 {
2399 unsigned char c=static_cast<unsigned char>(*p++);
2400
2401 if (insidePre)
2402 {
2403 switch(c)
2404 {
2405 case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
2406 // the LaTeX command \ucr has been defined in doxygen.sty
2407 if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
2408 {
2409 t << "{\\ucr}";
2410 p += 2;
2411 }
2412 else
2413 t << static_cast<char>(c);
2414 break;
2415 case '\\': t << "\\(\\backslash\\)"; break;
2416 case '{': t << "\\{"; break;
2417 case '}': t << "\\}"; break;
2418 case '_': t << "\\_"; break;
2419 case '&': t << "\\&"; break;
2420 case '%': t << "\\%"; break;
2421 case '#': t << "\\#"; break;
2422 case '$': t << "\\$"; break;
2423 case '"': t << "\"{}"; break;
2424 case '-': t << "-\\/"; break;
2425 case '^': insideTable ? t << "\\string^" : t << static_cast<char>(c); break;
2426 case '~': t << "\\string~"; break;
2427 case '\n': if (retainNewline) t << "\\newline"; else t << ' ';
2428 break;
2429 case ' ': if (keepSpaces) t << "~"; else t << ' ';
2430 break;
2431 default:
2432 if (c<32) t << ' '; // non printable control character
2433 else t << static_cast<char>(c);
2434 break;
2435 }
2436 }
2437 else
2438 {
2439 switch(c)
2440 {
2441 case 0xef: // handle U+FFFD i.e. "Replacement character" caused by octal: 357 277 275 / hexadecimal 0xef 0xbf 0xbd
2442 // the LaTeX command \ucr has been defined in doxygen.sty
2443 if (static_cast<unsigned char>(*(p)) == 0xbf && static_cast<unsigned char>(*(p+1)) == 0xbd)
2444 {
2445 t << "{\\ucr}";
2446 p += 2;
2447 }
2448 else
2449 t << static_cast<char>(c);
2450 break;
2451 case '#': t << "\\#"; break;
2452 case '$': t << "\\$"; break;
2453 case '%': t << "\\%"; break;
2454 case '^': processEntity(t,pdfHyperlinks,"$^\\wedge$","\\string^"); break;
2455 case '&': {
2456 // possibility to have a special symbol
2457 q = p;
2458 int cnt = 2; // we have to count & and ; as well
2459 while ((*q >= 'a' && *q <= 'z') || (*q >= 'A' && *q <= 'Z') || (*q >= '0' && *q <= '9'))
2460 {
2461 cnt++;
2462 q++;
2463 }
2464 if (*q == ';')
2465 {
2466 --p; // we need & as well
2469 {
2470 p++;
2471 t << "\\&";
2472 }
2473 else
2474 {
2476 q++;
2477 p = q;
2478 }
2479 }
2480 else
2481 {
2482 t << "\\&";
2483 }
2484 }
2485 break;
2486 case '*': processEntity(t,pdfHyperlinks,"$\\ast$","*"); break;
2487 case '_': if (!insideTabbing) t << "\\+";
2488 t << "\\_";
2489 if (!insideTabbing) t << "\\+";
2490 break;
2491 case '{': t << "\\{"; break;
2492 case '}': t << "\\}"; break;
2493 case '<': t << "$<$"; break;
2494 case '>': t << "$>$"; break;
2495 case '|': processEntity(t,pdfHyperlinks,"$\\vert$","|"); break;
2496 case '~': processEntity(t,pdfHyperlinks,"$\\sim$","\\string~"); break;
2497 case '[': if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2498 t << "\\mbox{[}";
2499 else
2500 t << "[";
2501 break;
2502 case ']': if (pc=='[') t << "$\\,$";
2503 if (Config_getBool(PDF_HYPERLINKS) || insideItem)
2504 t << "\\mbox{]}";
2505 else
2506 t << "]";
2507 break;
2508 case '-': t << "-\\/";
2509 break;
2510 case '\\': t << "\\textbackslash{}";
2511 break;
2512 case '"': t << "\"{}";
2513 break;
2514 case '`': t << "\\`{}";
2515 break;
2516 case '\'': t << "\\textquotesingle{}";
2517 break;
2518 case '\n': if (retainNewline) t << "\\newline"; else t << ' ';
2519 break;
2520 case ' ': if (keepSpaces) { if (insideTabbing) t << "\\>"; else t << '~'; } else t << ' ';
2521 break;
2522
2523 default:
2524 //if (!insideTabbing && forceBreaks && c!=' ' && *p!=' ')
2525 if (!insideTabbing &&
2526 ((c>='A' && c<='Z' && pc!=' ' && !(pc>='A' && pc <= 'Z') && pc!='\0' && *p) || (c==':' && pc!=':') || (pc=='.' && isId(c)))
2527 )
2528 {
2529 t << "\\+";
2530 }
2531 if (c<32)
2532 {
2533 t << ' '; // non-printable control character
2534 }
2535 else
2536 {
2537 t << static_cast<char>(c);
2538 }
2539 }
2540 }
2541 pc = c;
2542 }
2543}
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 2597 of file latexgen.cpp.

2598{
2599 //printf("latexEscapeIndexChars(%s)\n",qPrint(s));
2600 if (s.isEmpty()) return s;
2602 TextStream t;
2603 const char *p=s.data();
2604 char c = 0;
2605 while ((c=*p++))
2606 {
2607 switch (c)
2608 {
2609 case '!': t << "\"!"; break;
2610 case '"': t << "\"\""; break;
2611 case '@': t << "\"@"; break;
2612 case '|': t << "\\texttt{\"|}"; break;
2613 case '[': t << "["; break;
2614 case ']': t << "]"; break;
2615 case '{': t << "\\lcurly{}"; break;
2616 case '}': t << "\\rcurly{}"; break;
2617 // NOTE: adding a case here, means adding it to while below as well!
2618 default:
2619 {
2620 int i=0;
2621 // collect as long string as possible, before handing it to docify
2622 tmp[i++]=c;
2623 while ((c=*p) && c!='"' && c!='@' && c!='[' && c!=']' && c!='!' && c!='{' && c!='}' && c!='|')
2624 {
2625 tmp[i++]=c;
2626 p++;
2627 }
2628 tmp[i]=0;
2629 filterLatexString(t,tmp,
2630 true, // insideTabbing
2631 false, // insidePre
2632 false, // insideItem
2633 false, // insideTable
2634 false // keepSpaces
2635 );
2636 }
2637 break;
2638 }
2639 }
2640 return t.str();
2641}
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 2552 of file latexgen.cpp.

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

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 2643 of file latexgen.cpp.

2644{
2645 if (s.isEmpty()) return s;
2646 TextStream t;
2647 const char *p=s.data();
2648 char c = 0;
2649 while ((c=*p++))
2650 {
2651 switch (c)
2652 {
2653 case '\\': t << "\\textbackslash{}"; break;
2654 case '{': t << "\\{"; break;
2655 case '}': t << "\\}"; break;
2656 case '_': t << "\\_"; break;
2657 case '%': t << "\\%"; break;
2658 case '&': t << "\\&"; break;
2659 case '#': t << "\\#"; break;
2660 case '$': t << "\\$"; break;
2661 case '^': t << "\\string^"; break;
2662 case '~': t << "\\string~"; break;
2663 default:
2664 t << c;
2665 break;
2666 }
2667 }
2668 return t.str();
2669}

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

Referenced by LatexGenerator::startMemberDoc().

◆ latexFilterURL()

QCString latexFilterURL ( const QCString & s)

Definition at line 2671 of file latexgen.cpp.

2672{
2673 constexpr auto hex = "0123456789ABCDEF";
2674 if (s.isEmpty()) return s;
2675 TextStream t;
2676 const char *p=s.data();
2677 char c = 0;
2678 while ((c=*p++))
2679 {
2680 switch (c)
2681 {
2682 case '#': t << "\\#"; break;
2683 case '%': t << "\\%"; break;
2684 case '\\': t << "\\\\"; break;
2685 default:
2686 if (c<0)
2687 {
2688 unsigned char id = static_cast<unsigned char>(c);
2689 t << "\\%" << hex[id>>4] << hex[id&0xF];
2690 }
2691 else
2692 {
2693 t << c;
2694 }
2695 break;
2696 }
2697 }
2698 return t.str();
2699}
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 1404 of file latexgen.cpp.

1407{
1408 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1409 QCString result;
1410 if (!disableLinks && ref.isEmpty() && pdfHyperlinks)
1411 {
1412 result += "\\mbox{\\hyperlink{";
1413 if (!f.isEmpty()) result += stripPath(f);
1414 if (!f.isEmpty() && !anchor.isEmpty()) result += "_";
1415 if (!anchor.isEmpty()) result += anchor;
1416 result += "}{";
1417 result += convertToLaTeX(text,insideTabbing);
1418 result += "}}";
1419 }
1420 else
1421 {
1422 result += "\\textbf{ ";
1423 result += convertToLaTeX(text,insideTabbing);
1424 result += "}";
1425 }
1426 return result;
1427}
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
QCString stripPath(const QCString &s)
Definition util.cpp:5467

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 1429 of file latexgen.cpp.

1430{
1431 if (pdfHyperlinks)
1432 {
1433 t << "\\texorpdfstring{";
1434 }
1435 t << strForm;
1436 if (pdfHyperlinks)
1437 {
1438 t << "}{" << strRepl << "}";
1439 }
1440}

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:7103
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:6926
QCString substituteKeywords(const QCString &file, const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3575
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:6376

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 2326 of file latexgen.cpp.

2327{
2328 // User-specified packages
2329 const StringVector &extraPackages = Config_getList(EXTRA_PACKAGES);
2330 if (!extraPackages.empty())
2331 {
2332 t << "% Packages requested by user\n";
2333 for (const auto &pkgName : extraPackages)
2334 {
2335 if ((pkgName[0] == '[') || (pkgName[0] == '{'))
2336 t << "\\usepackage" << pkgName.c_str() << "\n";
2337 else
2338 t << "\\usepackage{" << pkgName.c_str() << "}\n";
2339 }
2340 t << "\n";
2341 }
2342}

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 2344 of file latexgen.cpp.

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

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().