Belle II Software  release-08-01-10
String Class Reference
Inheritance diagram for String:
Collaboration diagram for String:

Public Member Functions

def __init__ (self, text='')
 
def add (self, text='')
 
def finish (self, **kwargs)
 
def __str__ (self)
 
def add (self)
 
def finish (self)
 
def save (self, filename, compile=False)
 

Public Attributes

 output
 output string
 

Detailed Description

Used for wrapping conventionel text into latex-code.
Has to possibility to handle python-style format-placeholders

Definition at line 163 of file b2latex.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  text = '' 
)
Calls super-class initialize and adds initial text to output
    @param text intial text, usually you want to give a raw string r"some text"

Definition at line 169 of file b2latex.py.

Member Function Documentation

◆ __str__()

def __str__ (   self)
inherited
Transform object to string, in this case, just returns .the generated latex-code

Definition at line 26 of file b2latex.py.

◆ add() [1/2]

def add (   self)
inherited
Add latex-code to the output string.
This method is usually overriden in the subclasses

Definition at line 32 of file b2latex.py.

◆ add() [2/2]

def add (   self,
  text = '' 
)
Adds an object to the output, can contain python-placeholders
    @param text string or object with implicit string conversion (like LatexObject)

Definition at line 178 of file b2latex.py.

◆ finish() [1/2]

def finish (   self)
inherited
Finishes the generation of latex-code.
E.g. adds end latex-commands
This method is usually overriden in the subclasses

Reimplemented in Itemize, and Graphics.

Definition at line 39 of file b2latex.py.

◆ finish() [2/2]

def finish (   self,
**  kwargs 
)
Finish the generation of the string by replacing possible placehholders with the given dictionary
    @param kwargs dictionary used to replace placeholders

Definition at line 186 of file b2latex.py.

◆ save()

def save (   self,
  filename,
  compile = False 
)
inherited
Saves the latex-code into a file, adds preamble and end of document,
and compiles the code if requested.
    @param filename latex-code is stored in this file, should end on .tex
    @param compile compile the .tex file using pdflatex into a .pdf file

Definition at line 47 of file b2latex.py.


The documentation for this class was generated from the following file: