Belle II Software light-2406-ragdoll
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)
 

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"

Reimplemented from LatexObject.

Definition at line 169 of file b2latex.py.

169 def __init__(self, text=''):
170 """
171 Calls super-class initialize and adds initial text to output
172 @param text intial text, usually you want to give a raw string r"some text"
173 """
174 super().__init__()
175
176 self.output += str(text)
177
Definition: output.py:1

Member Function Documentation

◆ add()

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)

Reimplemented from LatexObject.

Definition at line 178 of file b2latex.py.

178 def add(self, text=''):
179 """
180 Adds an object to the output, can contain python-placeholders
181 @param text string or object with implicit string conversion (like LatexObject)
182 """
183 self.output += str(text)
184 return self
185

◆ finish()

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

Reimplemented from LatexObject.

Definition at line 186 of file b2latex.py.

186 def finish(self, **kwargs):
187 """
188 Finish the generation of the string by replacing possible placehholders with the given dictionary
189 @param kwargs dictionary used to replace placeholders
190 """
191
192 self.output = self.output.format(**kwargs) + '\n'
193 return self
194
195

Member Data Documentation

◆ output

output

output string

Definition at line 192 of file b2latex.py.


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