std::vector<docstring> const & text_commands, std::vector<docstring> const & math_commands,
std::string const & text_preamble, std::string const & math_preamble,
std::string const & tipa_shortcut, unsigned int flags);
+ // Add a new text command for this symbol.
+ void addTextCommand(const docstring& newTextCommand) { text_commands_.emplace_back(newTextCommand); }
+ // Add a new math command for this symbol.
+ void addMathCommand(const docstring& newMathCommand) { math_commands_.emplace_back(newMathCommand); }
+
// we assume that at least one command is nonempty when using unicodesymbols
bool isUnicodeSymbol() const { return !text_commands_.empty() || !math_commands_.empty(); }
/// LaTeX command (text mode) for this character
docstring textCommand() const { return text_commands_[0]; }
/// All known LaTeX commands (text mode) for this character
- std::vector<docstring> textCommands() const { return text_commands_; }
+ const std::vector<docstring>& textCommands() const { return text_commands_; }
/// LaTeX command (math mode) for this character
docstring mathCommand() const { return math_commands_[0]; }
/// All known LaTeX commands (math mode) for this character
- std::vector<docstring> mathCommands() const { return math_commands_; }
+ const std::vector<docstring>& mathCommands() const { return math_commands_; }
/// Needed LaTeX preamble (or feature) for text mode
std::string textPreamble() const { return text_preamble_; }
/// Needed LaTeX preamble (or feature) for math mode
private:
/// LaTeX commands (text mode) for this character. The first one is the default, the others
/// are only present for compatibility other ways users may encode the character
- std::vector<trivdocstring> text_commands_;
+ std::vector<docstring> text_commands_;
/// LaTeX command (math mode) for this character. The first one is the default, the others
// /// are only present for compatibility other ways users may encode the character
- std::vector<trivdocstring> math_commands_;
+ std::vector<docstring> math_commands_;
/// Needed LaTeX preamble (or feature) for text mode
trivstring text_preamble_;
/// Needed LaTeX preamble (or feature) for math mode