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 &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_footer
 
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 2542 of file latexgen.cpp.

2543{
2544 TextStream t;
2545 filterLatexString(t,s,insideTabbing,false,false,false,keepSpaces);
2546 return t.str();
2547}
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()

static QCString extraLatexStyleSheet ( )
static

Definition at line 730 of file latexgen.cpp.

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

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

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

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

static QCString latex_batchmode ( )
static

Definition at line 776 of file latexgen.cpp.

777{
778 switch (Config_getEnum(LATEX_BATCHMODE))
779 {
780 case LATEX_BATCHMODE_t::NO: return "";
781 case LATEX_BATCHMODE_t::YES: return "\\batchmode";
782 case LATEX_BATCHMODE_t::BATCH: return "\\batchmode";
783 case LATEX_BATCHMODE_t::NON_STOP: return "\\nonstopmode";
784 case LATEX_BATCHMODE_t::SCROLL: return "\\scrollmode";
785 case LATEX_BATCHMODE_t::ERROR_STOP: return "\\errorstopmode";
786 }
787 return "";
788}
#define Config_getEnum(name)
Definition config.h:35

References Config_getEnum.

Referenced by substituteLatexKeywords().

◆ latexEscapeIndexChars()

QCString latexEscapeIndexChars ( const QCString & s)

Definition at line 2594 of file latexgen.cpp.

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

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

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

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

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

Referenced by LatexGenerator::startMemberDoc().

◆ latexFilterURL()

QCString latexFilterURL ( const QCString & s)

Definition at line 2668 of file latexgen.cpp.

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

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

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

◆ makeIndex()

static QCString makeIndex ( )
static

Definition at line 758 of file latexgen.cpp.

759{
760 QCString result;
761 QCString latex_mkidx_command = Config_getString(LATEX_MAKEINDEX_CMD);
762 if (!latex_mkidx_command.isEmpty())
763 {
764 if (latex_mkidx_command[0] == '\\')
765 result += latex_mkidx_command;
766 else
767 result += "\\"+latex_mkidx_command;
768 }
769 else
770 {
771 result += "\\makeindex";
772 }
773 return result;
774}
#define Config_getString(name)
Definition config.h:32

References Config_getString, and QCString::isEmpty().

Referenced by substituteLatexKeywords().

◆ objectLinkToString()

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

Definition at line 1398 of file latexgen.cpp.

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

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

◆ processEntity()

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

Definition at line 1423 of file latexgen.cpp.

1424{
1425 if (pdfHyperlinks)
1426 {
1427 t << "\\texorpdfstring{";
1428 }
1429 t << strForm;
1430 if (pdfHyperlinks)
1431 {
1432 t << "}{" << strRepl << "}";
1433 }
1434}

Referenced by filterLatexString().

◆ substituteLatexKeywords()

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

Definition at line 790 of file latexgen.cpp.

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

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

static void writeDefaultStyleSheet ( TextStream & t)
static

Definition at line 677 of file latexgen.cpp.

678{
679 t << ResourceMgr::instance().getAsString("doxygen.sty");
680}
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 2323 of file latexgen.cpp.

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

References Config_getList.

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

◆ writeLatexMakefile()

static void writeLatexMakefile ( )
static

Definition at line 362 of file latexgen.cpp.

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

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

Referenced by LatexGenerator::init().

◆ writeLatexSpecialFormulaChars()

void writeLatexSpecialFormulaChars ( TextStream & t)

Definition at line 2341 of file latexgen.cpp.

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

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

◆ writeMakeBat()

static void writeMakeBat ( )
static

Definition at line 498 of file latexgen.cpp.

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

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

Referenced by LatexGenerator::init().

Variable Documentation

◆ g_footer

QCString g_footer
static

Definition at line 52 of file latexgen.cpp.

◆ g_header

QCString g_header
static

Definition at line 51 of file latexgen.cpp.

◆ latexMarkerInfo

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

Definition at line 53 of file latexgen.cpp.

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

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