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

2550{
2551 TextStream t;
2552 filterLatexString(t,s,insideTabbing,false,false,false,keepSpaces);
2553 return t.str();
2554}
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 736 of file latexgen.cpp.

737{
738 QCString result;
739 const StringVector &extraLatexStyles = Config_getList(LATEX_EXTRA_STYLESHEET);
740 for (const auto &fileName : extraLatexStyles)
741 {
742 if (!fileName.empty())
743 {
744 FileInfo fi(fileName);
745 if (fi.exists())
746 {
747 result += "\\usepackage{";
748 if (checkExtension(fi.fileName().c_str(), LATEX_STYLE_EXTENSION))
749 {
750 // strip the extension, it will be added by the usepackage in the tex conversion process
751 result += stripExtensionGeneral(fi.fileName().c_str(), LATEX_STYLE_EXTENSION);
752 }
753 else
754 {
755 result += fi.fileName();
756 }
757 result += "}\n";
758 }
759 }
760 }
761 return result;
762}
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:5420
bool checkExtension(const QCString &fName, const QCString &ext)
Definition util.cpp:5403

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

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

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

References Config_getEnum.

Referenced by substituteLatexKeywords().

◆ latexEscapeIndexChars()

QCString latexEscapeIndexChars ( const QCString & s)

Definition at line 2601 of file latexgen.cpp.

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

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

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

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

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

Referenced by LatexGenerator::startMemberDoc().

◆ latexFilterURL()

QCString latexFilterURL ( const QCString & s)

Definition at line 2675 of file latexgen.cpp.

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

765{
766 QCString result;
767 QCString latex_mkidx_command = Config_getString(LATEX_MAKEINDEX_CMD);
768 if (!latex_mkidx_command.isEmpty())
769 {
770 if (latex_mkidx_command[0] == '\\')
771 result += latex_mkidx_command;
772 else
773 result += "\\"+latex_mkidx_command;
774 }
775 else
776 {
777 result += "\\makeindex";
778 }
779 return result;
780}
#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 1405 of file latexgen.cpp.

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

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

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

Referenced by filterLatexString().

◆ substituteLatexKeywords()

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

Definition at line 796 of file latexgen.cpp.

799{
800 bool compactLatex = Config_getBool(COMPACT_LATEX);
801 bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
802 bool usePdfLatex = Config_getBool(USE_PDFLATEX);
803 QCString paperType = Config_getEnumAsString(PAPER_TYPE);
804
805 QCString style = Config_getString(LATEX_BIB_STYLE);
806 if (style.isEmpty())
807 {
808 style="plainnat";
809 }
810
811 TextStream tg;
812 QCString generatedBy;
813 auto timeStamp = Config_getEnum(TIMESTAMP);
814 switch (timeStamp)
815 {
816 case TIMESTAMP_t::YES:
817 case TIMESTAMP_t::DATETIME:
818 generatedBy = theTranslator->trGeneratedAt(dateToString(DateTimeType::DateTime),
819 Config_getString(PROJECT_NAME));
820 break;
821 case TIMESTAMP_t::DATE:
822 generatedBy = theTranslator->trGeneratedAt(dateToString(DateTimeType::Date),
823 Config_getString(PROJECT_NAME));
824 break;
825 case TIMESTAMP_t::NO:
826 generatedBy = theTranslator->trGeneratedBy();
827 break;
828 }
829 filterLatexString(tg, generatedBy,
830 false, // insideTabbing
831 false, // insidePre
832 false, // insideItem
833 false, // insideTable
834 false // keepSpaces
835 );
836 generatedBy = tg.str();
837
838 QCString latexFontenc = theTranslator->latexFontenc();
839
840 QCString latexEmojiDirectory = Config_getString(LATEX_EMOJI_DIRECTORY);
841 if (latexEmojiDirectory.isEmpty()) latexEmojiDirectory = ".";
842 latexEmojiDirectory = substitute(latexEmojiDirectory,"\\","/");
843
844 TextStream tg1;
846 QCString extraLatexPackages = tg1.str();
847
848 TextStream tg2;
850 QCString latexSpecialFormulaChars = tg2.str();
851
852 QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
853 QCString stripMacroFile;
854 if (!formulaMacrofile.isEmpty())
855 {
856 FileInfo fi(formulaMacrofile.str());
857 formulaMacrofile=fi.absFilePath();
858 stripMacroFile = fi.fileName();
859 copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
860 }
861
862 QCString projectNumber = Config_getString(PROJECT_NUMBER);
863
864 // first substitute generic keywords
865 QCString result = substituteKeywords(file,str,title,
866 convertToLaTeX(Config_getString(PROJECT_NAME),false),
867 convertToLaTeX(projectNumber,false),
868 convertToLaTeX(Config_getString(PROJECT_BRIEF),false));
869
870 // additional LaTeX only keywords
871 result = substituteKeywords(file,result,
872 {
873 // keyword value getter
874 { "$latexdocumentpre", [&]() { return theTranslator->latexDocumentPre(); } },
875 { "$latexdocumentpost", [&]() { return theTranslator->latexDocumentPost(); } },
876 { "$generatedby", [&]() { return generatedBy; } },
877 { "$latexbibstyle", [&]() { return style; } },
878 { "$latexcitereference", [&]() { return theTranslator->trCiteReferences(); } },
879 { "$latexbibfiles", [&]() { return CitationManager::instance().latexBibFiles(); } },
880 { "$papertype", [&]() { return paperType+"paper"; } },
881 { "$extralatexstylesheet", [&]() { return extraLatexStyleSheet(); } },
882 { "$languagesupport", [&]() { return theTranslator->latexLanguageSupportCommand(); } },
883 { "$latexfontenc", [&]() { return latexFontenc; } },
884 { "$latexfont", [&]() { return theTranslator->latexFont(); } },
885 { "$latexemojidirectory", [&]() { return latexEmojiDirectory; } },
886 { "$makeindex", [&]() { return makeIndex(); } },
887 { "$extralatexpackages", [&]() { return extraLatexPackages; } },
888 { "$latexspecialformulachars", [&]() { return latexSpecialFormulaChars; } },
889 { "$formulamacrofile", [&]() { return stripMacroFile; } },
890 { "$latex_batchmode", [&]() { return latex_batchmode(); } }
891 });
892
893 // remove conditional blocks
894 result = selectBlocks(result,
895 {
896 // marker is enabled
897 { "CITATIONS_PRESENT", !CitationManager::instance().isEmpty() },
898 { "COMPACT_LATEX", compactLatex },
899 { "PDF_HYPERLINKS", pdfHyperlinks },
900 { "USE_PDFLATEX", usePdfLatex },
901 { "TIMESTAMP", timeStamp!=TIMESTAMP_t::NO },
902 { "LATEX_FONTENC", !latexFontenc.isEmpty() },
903 { "FORMULA_MACROFILE", !formulaMacrofile.isEmpty() },
904 { "PROJECT_NUMBER", !projectNumber.isEmpty() }
906
907 result = removeEmptyLines(result);
908
909 return result;
910}
QCString latexBibFiles()
lists the bibtex cite files in a comma separated list
Definition cite.cpp:559
static CitationManager & instance()
Definition cite.cpp:80
bool isEmpty() const
return TRUE if there are no citations.
Definition cite.cpp:111
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
Translator * theTranslator
Definition language.cpp:71
static QCString latex_batchmode()
Definition latexgen.cpp:782
static QCString makeIndex()
Definition latexgen.cpp:764
static const SelectionMarkerInfo latexMarkerInfo
Definition latexgen.cpp:55
static QCString extraLatexStyleSheet()
Definition latexgen.cpp:736
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:7062
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:6885
QCString substituteKeywords(const QCString &file, const QCString &s, const KeywordSubstitutionList &keywords)
Definition util.cpp:3564
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:6335

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, writeExtraLatexPackages(), and writeLatexSpecialFormulaChars().

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

◆ writeDefaultStyleSheet()

void writeDefaultStyleSheet ( TextStream & t)
static

Definition at line 683 of file latexgen.cpp.

684{
685 t << ResourceMgr::instance().getAsString("doxygen.sty");
686}
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 2330 of file latexgen.cpp.

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

References Config_getList.

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

◆ writeLatexMakefile()

void writeLatexMakefile ( )
static

Definition at line 364 of file latexgen.cpp.

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

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

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

◆ writeMakeBat()

void writeMakeBat ( )
static

Definition at line 500 of file latexgen.cpp.

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