PhoenixLecture  2.0.0
Set of tools to make lectures
platexobj_tex.cpp File Reference
#include <sys/stat.h>
#include <sys/types.h>
#include "convertToString.h"
#include "parser_utils.h"
#include "platexobj_tex.h"
+ Include dependency graph for platexobj_tex.cpp:

Go to the source code of this file.

Functions

POutputTex defaultPOutputTex ()
 Create a default POutputTex. More...
 
bool isPLatexObjInline (const PLatexObj &obj)
 Say if the given PLatexObj is inlined. More...
 
PString platexobj_indexTex (POutputTex &outputMode, const PLatexObj &obj)
 Save the index.tex file. More...
 
bool platexobj_tex (POutputTex &outputMode, const PLatexObj &obj)
 Save the main PLatexObj. More...
 
PString platexobj_texCreateLabelSearchLink (const PString &labelName)
 Create the link to the label of the current PLatexObj if it exist. More...
 
PString platexobj_texMainTitle (const PString &title, const PString &latexFunction)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStr (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation, bool allowText)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStr (POutputTex &outputMode, const PVecLatexObj &vecObj, const PString &indentation, bool allowText)
 Save a vector of PLatexObj in tex. More...
 
PString platexobj_texStrAllPart (POutputTex &outputMode, const PLatexObj &obj, const PString &latexFunction, const PString &indentation)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrBasicEnv (POutputTex &outputMode, const PLatexObj &obj, const PString &baliseName, const PString &indentation, bool allowText)
 Convert a basic environement into a string. More...
 
PString platexobj_texStrBasicEnv (POutputTex &outputMode, const PLatexObj &obj, const PString &envName, const PString &indentation)
 Convert an environement into a tex string. More...
 
PString platexobj_texStrCaption (POutputTex &outputMode, const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrCitation (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrColumns (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrComment (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrEnumerate (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert an itemize environement in tex. More...
 
PString platexobj_texStrExtraEnvironement (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrExtraFunction (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrExtraParser (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrGetenv (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrHref (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrImage (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrInlineMath (POutputTex &outputMode, const PLatexObj &obj)
 convert inline fomulae into latex More...
 
PString platexobj_texStrItem (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert an itemize environement in tex. More...
 
PString platexobj_texStrItemize (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert an itemize environement in tex. More...
 
PString platexobj_texStrMathEnv (POutputTex &outputMode, const PLatexObj &obj, const PString &latexEnvName)
 convert fomulae env into latex More...
 
PString platexobj_texStrRef (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrSection (POutputTex &outputMode, const PLatexObj &obj, const PString &latexFunction)
 Save a section in tex. More...
 
PString platexobj_texStrSpaceParagraph (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrTabCell (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a cell into a tex string. More...
 
PString platexobj_texStrTabRow (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a row into a tex string. More...
 
PString platexobj_texStrTabular (POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
 Convert a tabular into a tex string. More...
 
PString platexobj_texStrText (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrTextBf (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrTextDebug (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrTextFootnote (POutputTex &outputMode, const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrTextIt (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrUrl (const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 
PString platexobj_texStrVideo (const PLatexObj &obj)
 Convert a video call in tex. More...
 
PString platexobj_texStrWip (POutputTex &outputMode, const PLatexObj &obj)
 Convert a PLatexObj into a string. More...
 

Function Documentation

◆ defaultPOutputTex()

POutputTex defaultPOutputTex ( )

Create a default POutputTex.

Returns
default POutputTex

Definition at line 18 of file platexobj_tex.cpp.

18  {
19  POutputTex out;
20  out.isLastObjInline = true;
21  out.splitPart = false;
22  out.splitChapter = false;
23  out.splitSection = false;
24  out.splitSubSection = false;
25  out.splitSubSubSection = false;
26  return out;
27 }
Output mode for tex backend.
Definition: platexobj_tex.h:13
bool isLastObjInline
True if the last used PLatexObj was inlined, false if it was a block.
Definition: platexobj_tex.h:15
bool splitPart
True to split parts in separates files.
Definition: platexobj_tex.h:17
bool splitSection
True to split sections in separates files.
Definition: platexobj_tex.h:21
bool splitChapter
True to split charpters in separates files.
Definition: platexobj_tex.h:19
bool splitSubSubSection
True to split subsubsections in separates files.
Definition: platexobj_tex.h:25
bool splitSubSection
True to split subsections in separates files.
Definition: platexobj_tex.h:23

References POutputTex::isLastObjInline, POutputTex::splitChapter, POutputTex::splitPart, POutputTex::splitSection, POutputTex::splitSubSection, and POutputTex::splitSubSubSection.

Referenced by processAllFile().

+ Here is the caller graph for this function:

◆ isPLatexObjInline()

bool isPLatexObjInline ( const PLatexObj obj)

Say if the given PLatexObj is inlined.

Parameters
obj: PLatexObj to be checked
Returns
true if the given PLatexObj is inlined, false otherwise

Definition at line 33 of file platexobj_tex.cpp.

33  {
34  PLatexType::PLatexType type(obj.getType());
35  return type == PLatexType::CITATION || type == PLatexType::FOOTNOTE || type == PLatexType::HREF ||
36  type == PLatexType::INLINEMATH || type == PLatexType::REF ||
37  type == PLatexType::TEXT || type == PLatexType::TEXTBF || type == PLatexType::TEXTIT || type == PLatexType::URL ||
38  type == PLatexType::VARCALL;
39 }
const PLatexType::PLatexType & getType() const
Gets the type of the PLatexObj.
Definition: PLatexObj.cpp:298
PLatexType
Type of the PLatexObj.
Definition: PLatexType.h:12

References PLatexType::CITATION, PLatexType::FOOTNOTE, PLatexObj::getType(), PLatexType::HREF, PLatexType::INLINEMATH, PLatexType::REF, PLatexType::TEXT, PLatexType::TEXTBF, PLatexType::TEXTIT, PLatexType::URL, and PLatexType::VARCALL.

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_indexTex()

PString platexobj_indexTex ( POutputTex outputMode,
const PLatexObj obj 
)

Save the index.tex file.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be used
isBibliography: true if there is a bibliography, false otherwise

Definition at line 376 of file platexobj_tex.cpp.

376  {
377  PString body("");
378  body += platexobj_texMainTitle(obj.getName(), "title");
379  body += platexobj_texMainTitle(obj.getSubTitle(), "subtitle");
380  body += platexobj_texMainTitle(obj.getAuthor(), "author");
381  body += platexobj_texMainTitle(obj.getDate(), "date");
382 
383  const PVecLatexObj & vecObj = obj.getVecContent();
384  for(PVecLatexObj::const_iterator it(vecObj.begin()); it != vecObj.end(); ++it){
385  body += platexobj_texStr(outputMode, *it, "", true);
386  }
387  return body;
388 }
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const PString & getSubTitle() const
Gets the subTitle of the PLatexObj.
Definition: PLatexObj.cpp:340
const PString & getName() const
Gets the name of the PLatexObj.
Definition: PLatexObj.cpp:326
const PString & getAuthor() const
Gets the author of the PLatexObj.
Definition: PLatexObj.cpp:508
const PString & getDate() const
Gets the date of the PLatexObj.
Definition: PLatexObj.cpp:522
Extends the std::string.
Definition: PString.h:16
PString platexobj_texStr(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation, bool allowText)
Convert a PLatexObj into a string.
PString platexobj_texMainTitle(const PString &title, const PString &latexFunction)
Convert a PLatexObj into a string.
std::vector< PLatexObj > PVecLatexObj
Vector of obj.

References PLatexObj::getAuthor(), PLatexObj::getDate(), PLatexObj::getName(), PLatexObj::getSubTitle(), PLatexObj::getVecContent(), platexobj_texMainTitle(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_tex()

bool platexobj_tex ( POutputTex outputMode,
const PLatexObj obj 
)

Save the main PLatexObj.

Parameters
[out]outputMode: output mode of the tex backend
obj: main PLatexObj to be saved
Returns
true on success, false otherwise

Definition at line 566 of file platexobj_tex.cpp.

566  {
567  PString fileContent(platexobj_texStr(outputMode, obj, ""));
568  PPath indexTex(obj.getLink());
569  if(!indexTex.saveFileContent(fileContent)){
570  std::cerr << "platexobj_tex : can't save file '"<<indexTex<<"'" << std::endl;
571  return false;
572  }else{
573  std::cerr << "platexobj_tex : save file '"<<indexTex<<"'" << std::endl;
574  }
575  return true;
576 }
const PString & getLink() const
Gets the link of the PLatexObj.
Definition: PLatexObj.cpp:368
Path of a directory or a file.
Definition: PPath.h:17

References PLatexObj::getLink(), platexobj_texStr(), and PPath::saveFileContent().

Referenced by processAllFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texCreateLabelSearchLink()

PString platexobj_texCreateLabelSearchLink ( const PString labelName)

Create the link to the label of the current PLatexObj if it exist.

Parameters
labelName: name of the label to be used
Returns
tex link to search the label or empty string if there is no label

Definition at line 45 of file platexobj_tex.cpp.

45  {
46  if(labelName == ""){return "";}
47  PString body("\\label{"+labelName+"}");
48  return body;
49 }

Referenced by platexobj_texStrAllPart(), platexobj_texStrBasicEnv(), platexobj_texStrCaption(), platexobj_texStrExtraEnvironement(), platexobj_texStrExtraFunction(), platexobj_texStrExtraParser(), platexobj_texStrImage(), platexobj_texStrInlineMath(), platexobj_texStrMathEnv(), platexobj_texStrSection(), platexobj_texStrTabular(), and platexobj_texStrWip().

+ Here is the caller graph for this function:

◆ platexobj_texMainTitle()

PString platexobj_texMainTitle ( const PString title,
const PString latexFunction 
)

Convert a PLatexObj into a string.

Parameters
title: title name
latexFunction: name of the latex function to be used
Returns
output string which contains the PLatexObj

Definition at line 365 of file platexobj_tex.cpp.

365  {
366  if(title == ""){return "";}
367  PString body("\\" + latexFunction + "{"+title+"}\n");
368  return body;
369 }

Referenced by platexobj_indexTex().

+ Here is the caller graph for this function:

◆ platexobj_texStr() [1/2]

PString platexobj_texStr ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation,
bool  allowText 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
allowText: true if the TEXT PLatexObj are allowed, false if not
indentation: indentation of the text
Returns
output string which contains the PLatexObj

Definition at line 472 of file platexobj_tex.cpp.

472  {
473  PString body("");
474  bool isCurrentObjInlined(isPLatexObjInline(obj));
475 // if(isCurrentObjInlined != outputMode.isLastObjInline){
476 // body += "\n";
477 // }
478  outputMode.isLastObjInline = isCurrentObjInlined;
479 
480  PLatexType::PLatexType type(obj.getType());
481  if(type == PLatexType::TEXT && allowText){body += platexobj_texStrText(obj);}
482  else if(type == PLatexType::COMMENT){body += platexobj_texStrComment(obj);}
483  else if(type == PLatexType::PERCENT){body += "\\%";}
484  else if(type == PLatexType::URL){body += platexobj_texStrUrl(obj);}
485  else if(type == PLatexType::GETENV){body += platexobj_texStrGetenv(obj);}
486  else if(type == PLatexType::REF){body += platexobj_texStrRef(obj);}
487  else if(type == PLatexType::SPACEPARAGRAPH){body += platexobj_texStrSpaceParagraph(obj);}
488  else if(type == PLatexType::AUTOSPACEPARAGRAPH){body += "\n\n";}
489  else if(type == PLatexType::CITATION){body += platexobj_texStrCitation(obj);}
490 
491  else if(type == PLatexType::HREF){body += platexobj_texStrHref(obj);}
492  else if(type == PLatexType::TEXTBF){body += platexobj_texStrTextBf(obj);}
493  else if(type == PLatexType::TEXTIT){body += platexobj_texStrTextIt(obj);}
494  else if(type == PLatexType::DEBUG){body += platexobj_texStrTextDebug(obj);}
495  else if(type == PLatexType::FOOTNOTE){body += platexobj_texStrTextFootnote(outputMode, obj);}
496  else if(type == PLatexType::CAPTION){body += platexobj_texStrCaption(outputMode, obj);}
497  else if(type == PLatexType::WORK_IN_PROGRESS){body += platexobj_texStrWip(outputMode, obj);}
498 
499  else if(type == PLatexType::IMAGE){body += platexobj_texStrImage(obj);}
500 
501  else if(type == PLatexType::PARTSTAR){body += platexobj_texStrAllPart(outputMode, obj, "part*", "");}
502  else if(type == PLatexType::CHAPTERSTAR){body += platexobj_texStrAllPart(outputMode, obj, "chapter*", "\t");}
503  else if(type == PLatexType::SECTIONSTAR){body += platexobj_texStrAllPart(outputMode, obj, "section*", "\t\t");}
504  else if(type == PLatexType::SUBSECTIONSTAR){body += platexobj_texStrAllPart(outputMode, obj, "subsection*", "\t\t\t");}
505  else if(type == PLatexType::SUBSUBSECTIONSTAR){body += platexobj_texStrAllPart(outputMode, obj, "subsubsection*", "\t\t\t\t");}
506 
507  else if(type == PLatexType::PART){body += platexobj_texStrSection(outputMode, obj, "part");}
508  else if(type == PLatexType::CHAPTER){body += platexobj_texStrSection(outputMode, obj, "chapter");}
509  else if(type == PLatexType::SECTION){body += platexobj_texStrSection(outputMode, obj, "section");}
510  else if(type == PLatexType::SUBSECTION){body += platexobj_texStrSection(outputMode, obj, "subsection");}
511  else if(type == PLatexType::SUBSUBSECTION){body += platexobj_texStrSection(outputMode, obj, "subsubsection");}
512 
513 
514  else if(type == PLatexType::PARAGRAPHE){body += platexobj_texStrBasicEnv(outputMode, obj, "paragraph", indentation);}
515  else if(type == PLatexType::CENTER){body += platexobj_texStrBasicEnv(outputMode, obj, "center", indentation);}
516  else if(type == PLatexType::COLUMN){body += platexobj_texStrBasicEnv(outputMode, obj, "column", indentation);}
517 
518  else if(type == PLatexType::COLUMNS){body += platexobj_texStrColumns(outputMode, obj, indentation);}
519 
520  else if(type == PLatexType::TABLE){body += platexobj_texStrBasicEnv(outputMode, obj, "table", indentation);}
521  else if(type == PLatexType::TABULAR){body += platexobj_texStrTabular(outputMode, obj, indentation);}
522  else if(type == PLatexType::TABROW){body += platexobj_texStrTabRow(outputMode, obj, indentation);}
523  else if(type == PLatexType::TABCELL){body += platexobj_texStrTabCell(outputMode, obj, indentation);}
524  else if(type == PLatexType::FIGURE){body += platexobj_texStrBasicEnv(outputMode, obj, "figure", indentation);}
525 
526  else if(type == PLatexType::DISPLAYMATH){body += platexobj_texStrMathEnv(outputMode, obj, "displaymath");}
527  else if(type == PLatexType::EQNARRAY){body += platexobj_texStrMathEnv(outputMode, obj, "eqnarray*");}
528  else if(type == PLatexType::INLINEMATH){body += platexobj_texStrInlineMath(outputMode, obj);}
529 
530  else if(type == PLatexType::ITEMIZE){body += platexobj_texStrItemize(outputMode, obj, indentation);}
531  else if(type == PLatexType::ENUMERATE){body += platexobj_texStrEnumerate(outputMode, obj, indentation);}
532  else if(type == PLatexType::ITEM){body += platexobj_texStrItem(outputMode, obj, indentation);}
533  else if(type == PLatexType::VIDEO){body += platexobj_texStrVideo(obj);}
534 
535  else if(type == PLatexType::ENVIRONEMENT){body += platexobj_texStrExtraEnvironement(outputMode, obj, indentation);}
536  else if(type == PLatexType::FUNCTION){body += platexobj_texStrExtraFunction(outputMode, obj, indentation);}
537  else if(type == PLatexType::PARSER){body += platexobj_texStrExtraParser(obj);}
538 
539  else if(type == PLatexType::FILE){body += platexobj_indexTex(outputMode, obj);}
540  else{
541  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation, allowText);
542  }
543  return body;
544 }
@ SUBSUBSECTION
Definition: PLatexType.h:54
@ SUBSECTIONSTAR
Definition: PLatexType.h:60
@ AUTOSPACEPARAGRAPH
Definition: PLatexType.h:28
@ SPACEPARAGRAPH
Definition: PLatexType.h:27
@ ENVIRONEMENT
Definition: PLatexType.h:85
@ SUBSUBSECTIONSTAR
Definition: PLatexType.h:61
@ WORK_IN_PROGRESS
Definition: PLatexType.h:32
PString platexobj_texStrColumns(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a PLatexObj into a string.
PString platexobj_texStrExtraParser(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrMathEnv(POutputTex &outputMode, const PLatexObj &obj, const PString &latexEnvName)
convert fomulae env into latex
PString platexobj_texStrEnumerate(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert an itemize environement in tex.
PString platexobj_texStrVideo(const PLatexObj &obj)
Convert a video call in tex.
PString platexobj_texStrItemize(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert an itemize environement in tex.
PString platexobj_texStrTextDebug(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrText(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrTextIt(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrTabCell(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a cell into a tex string.
PString platexobj_texStrUrl(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrComment(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrAllPart(POutputTex &outputMode, const PLatexObj &obj, const PString &latexFunction, const PString &indentation)
Convert a PLatexObj into a string.
PString platexobj_texStrTextFootnote(POutputTex &outputMode, const PLatexObj &obj)
Convert a PLatexObj into a string.
bool isPLatexObjInline(const PLatexObj &obj)
Say if the given PLatexObj is inlined.
PString platexobj_texStrImage(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrItem(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert an itemize environement in tex.
PString platexobj_texStrCitation(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_indexTex(POutputTex &outputMode, const PLatexObj &obj)
Save the index.tex file.
PString platexobj_texStrRef(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrTextBf(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrTabRow(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a row into a tex string.
PString platexobj_texStrSpaceParagraph(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrGetenv(const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrInlineMath(POutputTex &outputMode, const PLatexObj &obj)
convert inline fomulae into latex
PString platexobj_texStrExtraEnvironement(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a PLatexObj into a string.
PString platexobj_texStrWip(POutputTex &outputMode, const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrExtraFunction(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a PLatexObj into a string.
PString platexobj_texStrBasicEnv(POutputTex &outputMode, const PLatexObj &obj, const PString &baliseName, const PString &indentation, bool allowText)
Convert a basic environement into a string.
PString platexobj_texStrSection(POutputTex &outputMode, const PLatexObj &obj, const PString &latexFunction)
Save a section in tex.
PString platexobj_texStrCaption(POutputTex &outputMode, const PLatexObj &obj)
Convert a PLatexObj into a string.
PString platexobj_texStrTabular(POutputTex &outputMode, const PLatexObj &obj, const PString &indentation)
Convert a tabular into a tex string.
PString platexobj_texStrHref(const PLatexObj &obj)
Convert a PLatexObj into a string.

References PLatexType::AUTOSPACEPARAGRAPH, PLatexType::CAPTION, PLatexType::CENTER, PLatexType::CHAPTER, PLatexType::CHAPTERSTAR, PLatexType::CITATION, PLatexType::COLUMN, PLatexType::COLUMNS, PLatexType::COMMENT, PLatexType::DEBUG, PLatexType::DISPLAYMATH, PLatexType::ENUMERATE, PLatexType::ENVIRONEMENT, PLatexType::EQNARRAY, PLatexType::FIGURE, PLatexType::FILE, PLatexType::FOOTNOTE, PLatexType::FUNCTION, PLatexType::GETENV, PLatexObj::getType(), PLatexObj::getVecContent(), PLatexType::HREF, PLatexType::IMAGE, PLatexType::INLINEMATH, POutputTex::isLastObjInline, isPLatexObjInline(), PLatexType::ITEM, PLatexType::ITEMIZE, PLatexType::PARAGRAPHE, PLatexType::PARSER, PLatexType::PART, PLatexType::PARTSTAR, PLatexType::PERCENT, platexobj_indexTex(), platexobj_texStrAllPart(), platexobj_texStrBasicEnv(), platexobj_texStrCaption(), platexobj_texStrCitation(), platexobj_texStrColumns(), platexobj_texStrComment(), platexobj_texStrEnumerate(), platexobj_texStrExtraEnvironement(), platexobj_texStrExtraFunction(), platexobj_texStrExtraParser(), platexobj_texStrGetenv(), platexobj_texStrHref(), platexobj_texStrImage(), platexobj_texStrInlineMath(), platexobj_texStrItem(), platexobj_texStrItemize(), platexobj_texStrMathEnv(), platexobj_texStrRef(), platexobj_texStrSection(), platexobj_texStrSpaceParagraph(), platexobj_texStrTabCell(), platexobj_texStrTabRow(), platexobj_texStrTabular(), platexobj_texStrText(), platexobj_texStrTextBf(), platexobj_texStrTextDebug(), platexobj_texStrTextFootnote(), platexobj_texStrTextIt(), platexobj_texStrUrl(), platexobj_texStrVideo(), platexobj_texStrWip(), PLatexType::REF, PLatexType::SECTION, PLatexType::SECTIONSTAR, PLatexType::SPACEPARAGRAPH, PLatexType::SUBSECTION, PLatexType::SUBSECTIONSTAR, PLatexType::SUBSUBSECTION, PLatexType::SUBSUBSECTIONSTAR, PLatexType::TABCELL, PLatexType::TABLE, PLatexType::TABROW, PLatexType::TABULAR, PLatexType::TEXT, PLatexType::TEXTBF, PLatexType::TEXTIT, PLatexType::URL, PLatexType::VIDEO, and PLatexType::WORK_IN_PROGRESS.

Referenced by platexobj_indexTex(), platexobj_tex(), platexobj_texStr(), platexobj_texStrAllPart(), platexobj_texStrBasicEnv(), platexobj_texStrCaption(), platexobj_texStrColumns(), platexobj_texStrEnumerate(), platexobj_texStrExtraEnvironement(), platexobj_texStrExtraFunction(), platexobj_texStrItem(), platexobj_texStrItemize(), platexobj_texStrSection(), platexobj_texStrTabCell(), platexobj_texStrTabRow(), platexobj_texStrTabular(), platexobj_texStrTextFootnote(), and platexobj_texStrWip().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStr() [2/2]

PString platexobj_texStr ( POutputTex outputMode,
const PVecLatexObj vecObj,
const PString indentation,
bool  allowText 
)

Save a vector of PLatexObj in tex.

Parameters
[out]outputMode: output mode of the tex backend
vecObj: vector of PLatexObj to be saved in tex
allowText: true if the TEXT PLatexObj are allowed, false if not
indentation: indentation of the text
Returns
tex string

Definition at line 553 of file platexobj_tex.cpp.

553  {
554  PString body("");
555  for(PVecLatexObj::const_iterator it(vecObj.begin()); it != vecObj.end(); ++it){
556  body += platexobj_texStr(outputMode, *it, indentation, allowText);
557  }
558  return body;
559 }

References platexobj_texStr().

+ Here is the call graph for this function:

◆ platexobj_texStrAllPart()

PString platexobj_texStrAllPart ( POutputTex outputMode,
const PLatexObj obj,
const PString latexFunction,
const PString indentation 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
latexFunction: name of the latex function to be used
indentation: indentation of the section
Returns
output string which contains the PLatexObj

Definition at line 208 of file platexobj_tex.cpp.

208  {
209  PString body("\n\n" + indentation);
210  body += "\\" + latexFunction + "{" + platexobj_texStr(outputMode, obj.getComplexTitle(), "") + "}\n\n";
212  return body;
213 }
const std::vector< PLatexObj > & getComplexTitle() const
Gets the complexTitle of the PLatexObj.
Definition: PLatexObj.cpp:396
const PString & getLabelName() const
Gets the labelName of the PLatexObj.
Definition: PLatexObj.cpp:354
PString platexobj_texCreateLabelSearchLink(const PString &labelName)
Create the link to the label of the current PLatexObj if it exist.

References PLatexObj::getComplexTitle(), PLatexObj::getLabelName(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrBasicEnv() [1/2]

PString platexobj_texStrBasicEnv ( POutputTex outputMode,
const PLatexObj obj,
const PString baliseName,
const PString indentation,
bool  allowText 
)

Convert a basic environement into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted in tex
baliseName: name of the balise environement
indentation: text indentation
allowText: true if the TEXT PLatexObj are allowed, false if not
Returns
tex string

Definition at line 261 of file platexobj_tex.cpp.

261  {
262  PString body("\\begin{"+baliseName+"}\n");
263  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation, allowText);
264  body += "\\end{"+baliseName+"}";
265  body += platexobj_texCreateLabelSearchLink(obj.getLabelName()) + "\n";
266  return body;
267 }

References PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrBasicEnv() [2/2]

PString platexobj_texStrBasicEnv ( POutputTex outputMode,
const PLatexObj obj,
const PString envName,
const PString indentation 
)

Convert an environement into a tex string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted in tex
envName: name of the environement to bo used
indentation: text indentation
Returns
tex string

Definition at line 315 of file platexobj_tex.cpp.

315  {
316  PString body(indentation + "\\begin{"+envName+"}\n");
317  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation + "\t");
318  body += "\n" + indentation + "\\end{"+envName+"}" + platexobj_texCreateLabelSearchLink(obj.getLabelName())+"\n";
319  return body;
320 }

References PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

+ Here is the call graph for this function:

◆ platexobj_texStrCaption()

PString platexobj_texStrCaption ( POutputTex outputMode,
const PLatexObj obj 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 166 of file platexobj_tex.cpp.

166  {
167  PString body("\\caption{");
168  body += platexobj_texStr(outputMode, obj.getVecContent(), "") + "}\n";
170  return body;
171 }

References PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrCitation()

PString platexobj_texStrCitation ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 108 of file platexobj_tex.cpp.

108  {
109  PString body("\\cite{"+obj.getName()+"}");
110  return body;
111 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrColumns()

PString platexobj_texStrColumns ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
indentation: text indentation
Returns
output string which contains the PLatexObj

Definition at line 328 of file platexobj_tex.cpp.

328  {
329  PString body(indentation + "\\begin{columns}\n");
330  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation + "\t");
331  body += indentation + "\\end{columns}\n";
332  return body;
333 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrComment()

PString platexobj_texStrComment ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 63 of file platexobj_tex.cpp.

63  {
64  PString body("%" + obj.getName());
65  return body;
66 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrEnumerate()

PString platexobj_texStrEnumerate ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert an itemize environement in tex.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted
indentation: text indentation
Returns
tex string

Definition at line 432 of file platexobj_tex.cpp.

432  {
433  PString body(indentation + "\\begin{enumerate}\n");
434  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation + "\t");
435  body += indentation + "\\end{enumerate}\n";
436  return body;
437 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrExtraEnvironement()

PString platexobj_texStrExtraEnvironement ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
indentation: text indentation
Returns
output string which contains the PLatexObj

Definition at line 221 of file platexobj_tex.cpp.

221  {
222  PString body(indentation + "\\begin{" + obj.getName() + "}\n");
223  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation + "\t");
224  body += indentation + "\n\\end{" + obj.getName() + "}";
225  body += platexobj_texCreateLabelSearchLink(obj.getLabelName()) + "\n\n";
226  return body;
227 }

References PLatexObj::getLabelName(), PLatexObj::getName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrExtraFunction()

PString platexobj_texStrExtraFunction ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
indentation: text indentation
Returns
output string which contains the PLatexObj

Definition at line 235 of file platexobj_tex.cpp.

235  {
236  PString body("\\" + obj.getName() + "{");
237  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation) + "}" + platexobj_texCreateLabelSearchLink(obj.getLabelName());
238  return body;
239 }

References PLatexObj::getLabelName(), PLatexObj::getName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrExtraParser()

PString platexobj_texStrExtraParser ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 245 of file platexobj_tex.cpp.

245  {
246  PString body("\\begin{"+obj.getName()+"}\n");
247  body += obj.getSubTitle();
248  body += "\\end{"+obj.getName()+"}";
250  return body;
251 }

References PLatexObj::getLabelName(), PLatexObj::getName(), PLatexObj::getSubTitle(), and platexobj_texCreateLabelSearchLink().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrGetenv()

PString platexobj_texStrGetenv ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 81 of file platexobj_tex.cpp.

81  {
82  PString body("\\getenv{" + obj.getName() + "}");
83  return body;
84 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrHref()

PString platexobj_texStrHref ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 117 of file platexobj_tex.cpp.

117  {
118  PString body("\\href{" + obj.getName() + "}{" + obj.getText() + "}");
119  return body;
120 }
const PString & getText() const
Gets the text of the PLatexObj.
Definition: PLatexObj.cpp:312

References PLatexObj::getName(), and PLatexObj::getText().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrImage()

PString platexobj_texStrImage ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 190 of file platexobj_tex.cpp.

190  {
191  PString option(obj.getText());
192  PString body("\\includegraphics");
193  if(option != ""){
194  body += "["+option+"]";
195  }
196  body += "{" + obj.getName() + "}\n";
198  return body;
199 }

References PLatexObj::getLabelName(), PLatexObj::getName(), PLatexObj::getText(), and platexobj_texCreateLabelSearchLink().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrInlineMath()

PString platexobj_texStrInlineMath ( POutputTex outputMode,
const PLatexObj obj 
)

convert inline fomulae into latex

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted

Definition at line 406 of file platexobj_tex.cpp.

406  {
407  PString body("$");
408  body += obj.getText();
409  body += "$" + platexobj_texCreateLabelSearchLink(obj.getLabelName()) + "\n";
410  return body;
411 }

References PLatexObj::getLabelName(), PLatexObj::getText(), and platexobj_texCreateLabelSearchLink().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrItem()

PString platexobj_texStrItem ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert an itemize environement in tex.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted
indentation: text indentation
Returns
tex string

Definition at line 445 of file platexobj_tex.cpp.

445  {
446  PString body(indentation);
447  body += "\\item ";
448  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation) + "\n";
449  return body;
450 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrItemize()

PString platexobj_texStrItemize ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert an itemize environement in tex.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted
indentation: text indentation
Returns
tex string

Definition at line 419 of file platexobj_tex.cpp.

419  {
420  PString body(indentation + "\\begin{itemize}\n");
421  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation + "\t");
422  body += indentation + "\\end{itemize}\n";
423  return body;
424 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrMathEnv()

PString platexobj_texStrMathEnv ( POutputTex outputMode,
const PLatexObj obj,
const PString latexEnvName 
)

convert fomulae env into latex

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted
latexEnvName: name of the latex env to be used

Definition at line 395 of file platexobj_tex.cpp.

395  {
396  PString body("\\begin{"+latexEnvName+"}\n");
397  body += obj.getText();
398  body += "\\end{"+latexEnvName+"}" + platexobj_texCreateLabelSearchLink(obj.getLabelName()) + "\n";
399  return body;
400 }

References PLatexObj::getLabelName(), PLatexObj::getText(), and platexobj_texCreateLabelSearchLink().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrRef()

PString platexobj_texStrRef ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 90 of file platexobj_tex.cpp.

90  {
91  PString body("\\ref{" + obj.getName() + "}");
92  return body;
93 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrSection()

PString platexobj_texStrSection ( POutputTex outputMode,
const PLatexObj obj,
const PString latexFunction 
)

Save a section in tex.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be saved
latexFunction: latex function to be used
Returns
output string which contains the PLatexObj

Definition at line 341 of file platexobj_tex.cpp.

341  {
342  PString body("\n\n\\" + latexFunction + "{");
343  const PVecLatexObj & vecObj = obj.getComplexTitle();
344  for(PVecLatexObj::const_iterator it(vecObj.begin()); it != vecObj.end(); ++it){
345  body += platexobj_texStr(outputMode, *it, "");
346  }
347  body += "}" + platexobj_texCreateLabelSearchLink(obj.getLabelName()) + "\n\n";
348 
349  body += platexobj_texStr(outputMode, obj.getVecContent(), "");
350 
351 // PString fileName(obj.getLink());
352 // if(!saveFileContent(fileName, body)){
353 // cerr << "platexobj_texStrSection : can't save file '"<<fileName<<"' for object '" << obj.getName() << "'" << endl;
354 // }else{
355 // cout << "platexobj_texStrSection : save file '"<<fileName<<"'" << endl;
356 // }
357  return body;
358 }

References PLatexObj::getComplexTitle(), PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrSpaceParagraph()

PString platexobj_texStrSpaceParagraph ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 99 of file platexobj_tex.cpp.

99  {
100  PString body("\\spaceparagraph{}\n");
101  return body;
102 }

Referenced by platexobj_texStr().

+ Here is the caller graph for this function:

◆ platexobj_texStrTabCell()

PString platexobj_texStrTabCell ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a cell into a tex string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted in tex
indentation: text indentation
Returns
tex string

Definition at line 301 of file platexobj_tex.cpp.

301  {
302  PString body("");
303  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation);
304  body += "\t&\t";
305  return body;
306 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTabRow()

PString platexobj_texStrTabRow ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a row into a tex string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted in tex
indentation: text indentation
Returns
tex string

Definition at line 288 of file platexobj_tex.cpp.

288  {
289  PString body("");
290  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation);
291  body += "\\\\\n";
292  return body;
293 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTabular()

PString platexobj_texStrTabular ( POutputTex outputMode,
const PLatexObj obj,
const PString indentation 
)

Convert a tabular into a tex string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted in tex
indentation: text indentation
Returns
tex string

Definition at line 275 of file platexobj_tex.cpp.

275  {
276  PString body("\\begin{tabular}\n");
277  body += platexobj_texStr(outputMode, obj.getVecContent(), indentation);
278  body += "\\end{tabular}" + platexobj_texCreateLabelSearchLink(obj.getLabelName())+"\n";
279  return body;
280 }

References PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrText()

PString platexobj_texStrText ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 55 of file platexobj_tex.cpp.

55  {
56  return obj.getText().eraseFirstLastChar("\t\n");
57 }
PString eraseFirstLastChar(const PString &vecChar) const
Erase first and last char in a string.
Definition: PString.cpp:545

References PString::eraseFirstLastChar(), and PLatexObj::getText().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTextBf()

PString platexobj_texStrTextBf ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 126 of file platexobj_tex.cpp.

126  {
127  PString body("\\textbf{" + obj.getName() + "}");
128  return body;
129 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTextDebug()

PString platexobj_texStrTextDebug ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 144 of file platexobj_tex.cpp.

144  {
145  PString body("\\debug{" + obj.getName() + "}");
146  return body;
147 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTextFootnote()

PString platexobj_texStrTextFootnote ( POutputTex outputMode,
const PLatexObj obj 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 154 of file platexobj_tex.cpp.

154  {
155  PString body("\\footnote{");
156  body += platexobj_texStr(outputMode, obj.getVecContent(), ""); //Content of the footnote
157  body += "}";
158  return body;
159 }

References PLatexObj::getVecContent(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrTextIt()

PString platexobj_texStrTextIt ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 135 of file platexobj_tex.cpp.

135  {
136  PString body("\\textit{" + obj.getName() + "}");
137  return body;
138 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrUrl()

PString platexobj_texStrUrl ( const PLatexObj obj)

Convert a PLatexObj into a string.

Parameters
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 72 of file platexobj_tex.cpp.

72  {
73  PString body("\\url{" + obj.getName() + "}");
74  return body;
75 }

References PLatexObj::getName().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrVideo()

PString platexobj_texStrVideo ( const PLatexObj obj)

Convert a video call in tex.

Parameters
obj: PLatexObj to be converted
Returns
tex string

Definition at line 456 of file platexobj_tex.cpp.

456  {
457  PString body("\\video"), fileName(obj.getName());
458  if(obj.getText() != ""){
459  body += "[" + obj.getText() + "]";
460  }
461  body += "{" + fileName + "}\n";
462  return body;
463 }

References PLatexObj::getName(), and PLatexObj::getText().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ platexobj_texStrWip()

PString platexobj_texStrWip ( POutputTex outputMode,
const PLatexObj obj 
)

Convert a PLatexObj into a string.

Parameters
[out]outputMode: output mode of the tex backend
obj: PLatexObj to be converted into a string
Returns
output string which contains the PLatexObj

Definition at line 178 of file platexobj_tex.cpp.

178  {
179  PString body("\\wip{");
180  body += platexobj_texStr(outputMode, obj.getVecContent(), "");
182  body += "}\n";
183  return body;
184 }

References PLatexObj::getLabelName(), PLatexObj::getVecContent(), platexobj_texCreateLabelSearchLink(), and platexobj_texStr().

Referenced by platexobj_texStr().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: