Package writer2latex.latex.util
Class BeforeAfter
- java.lang.Object
-
- writer2latex.latex.util.BeforeAfter
-
public class BeforeAfter extends java.lang.ObjectUtility class to hold LaTeX code to put before/after other LaTeX code
-
-
Constructor Summary
Constructors Constructor Description BeforeAfter()Default constructor: Create with empty stringsBeforeAfter(java.lang.String sBefore1, java.lang.String sAfter1)Constructor to initialize the object with a pair of strings
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String sBefore1, java.lang.String sAfter1)Add data to theBeforeAftervoidadd(BeforeAfter ba)Add the content of anotherBeforeAfterto thisBeforeAftervoidenclose(java.lang.String sBefore1, java.lang.String sAfter1)Add data to theBeforeAfterjava.lang.StringgetAfter()Get LaTeX code to put afterjava.lang.StringgetBefore()Get LaTeX code to put beforebooleanisEmpty()Check if thisBeforeAftercontains any data
-
-
-
Constructor Detail
-
BeforeAfter
public BeforeAfter(java.lang.String sBefore1, java.lang.String sAfter1)Constructor to initialize the object with a pair of strings- Parameters:
sBefore1- LaTeX code to put beforesAfter1- LaTeX code to put after
-
BeforeAfter
public BeforeAfter()
Default constructor: Create with empty strings
-
-
Method Detail
-
add
public void add(java.lang.String sBefore1, java.lang.String sAfter1)Add data to the
BeforeAfterThe new data will be be added "inside", thus for example
add("\textsf{","}");add("\textit{","}");
will create the pair
\textsf{\textit{,}}- Parameters:
sBefore1- LaTeX code to put beforesAfter1- LaTeX code to put after
-
enclose
public void enclose(java.lang.String sBefore1, java.lang.String sAfter1)Add data to the
BeforeAfterThe new data will be be added "outside", thus for example
enclose("\textsf{","}");enclose("\textit{","}");
will create the pair
\textit{\textsf{,}}- Parameters:
sBefore1- LaTeX code to put beforesAfter1- LaTeX code to put after
-
add
public void add(BeforeAfter ba)
Add the content of another
BeforeAfterto thisBeforeAfterThe new data will be be added "inside"
- Parameters:
ba- the code to add
-
getBefore
public java.lang.String getBefore()
Get LaTeX code to put before- Returns:
- then LaTeX code
-
getAfter
public java.lang.String getAfter()
Get LaTeX code to put after- Returns:
- then LaTeX code
-
isEmpty
public boolean isEmpty()
Check if thisBeforeAftercontains any data- Returns:
- true if there is data in at least one part
-
-