PhoenixLecture  2.0.0
Set of tools to make lectures
platexobj_html_book.h File Reference
+ Include dependency graph for platexobj_html_book.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

PString platexobj_bookHtml (POutoutMode &outputMode, const PLatexObj &obj, bool isBibliography, bool allowText)
 Convert a PLatexObj into a string with book theme. More...
 

Function Documentation

◆ platexobj_bookHtml()

PString platexobj_bookHtml ( POutoutMode outputMode,
const PLatexObj obj,
bool  isBibliography,
bool  allowText 
)

Convert a PLatexObj into a string with book theme.

Parameters
[out]outputMode: output mode of the html backend
obj: PLatexObj to be converted into a string
isBibliography: true if there is a bibliography, false otherwise
allowText: true if the TEXT PLatexObj are allowed, false if not
Returns
output string which contains the PLatexObj

Definition at line 105 of file platexobj_html_book.cpp.

105  {
106  PString body("");
107  PLatexType::PLatexType type(obj.getType());
108  if(type == PLatexType::PART){platexobj_book_createPage(outputMode, obj, "h1", "ptexpart", "Part", isBibliography);}
109  else if(type == PLatexType::CHAPTER){platexobj_book_createPage(outputMode, obj, "h2", "ptexchapter", "Chapter", isBibliography);}
110  else if(type == PLatexType::SECTION){platexobj_book_createPage(outputMode, obj, "h3", "ptexsection", "", isBibliography);}
111  else if(type == PLatexType::SUBSECTION){platexobj_book_createPage(outputMode, obj, "h4", "ptexsubsection", "", isBibliography);}
112  else if(type == PLatexType::SUBSUBSECTION){platexobj_book_createPage(outputMode, obj, "h5", "ptexsubsubsection", "", isBibliography);}
113  else if(type == PLatexType::FILE){body = platexobj_bookIndexHtml(outputMode, obj, isBibliography);}
114  else if(!platexobj_htmlStrBase(body, outputMode, obj, isBibliography, allowText)){
115  body = platexobj_bookHtml(outputMode, obj.getVecContent(), isBibliography, allowText);
116  }
117  return body;
118 }
const std::vector< PLatexObj > & getVecContent() const
Gets the vecContent of the PLatexObj.
Definition: PLatexObj.cpp:410
const PLatexType::PLatexType & getType() const
Gets the type of the PLatexObj.
Definition: PLatexObj.cpp:298
Extends the std::string.
Definition: PString.h:16
PLatexType
Type of the PLatexObj.
Definition: PLatexType.h:12
@ SUBSUBSECTION
Definition: PLatexType.h:54
bool platexobj_htmlStrBase(PString &body, POutoutMode &outputMode, const PLatexObj &obj, bool isBibliography, bool allowText)
PString platexobj_bookHtml(POutoutMode &outputMode, const std::vector< PLatexObj > &vecObj, bool isBibliography, bool allowText)
Convert a PLatexObj into a string with book theme.
bool platexobj_book_createPage(POutoutMode &outputMode, const PLatexObj &obj, const PString &baliseName, const PString &cssClassName, const PString &prefixTitle, bool isBibliography)
Create a page with book theme.
PString platexobj_bookIndexHtml(POutoutMode &outputMode, const PLatexObj &obj, bool isBibliography)
Save the index.html file.

References PLatexType::CHAPTER, PLatexType::FILE, PLatexObj::getType(), PLatexObj::getVecContent(), PLatexType::PART, platexobj_book_createPage(), platexobj_bookHtml(), platexobj_bookIndexHtml(), platexobj_htmlStrBase(), PLatexType::SECTION, PLatexType::SUBSECTION, and PLatexType::SUBSUBSECTION.

+ Here is the call graph for this function: