X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.h;h=b57ad7aa08f1aca65959ebbd5ea0b45bdaf96218;hb=5170489b983c08c8be8d878996710eb0f6db2679;hp=7b7e483b8345334b1b47d600b261e85b0f666613;hpb=1a6c599917355743a868c20a0b62b5f4c47c8294;p=lyx.git diff --git a/src/Encoding.h b/src/Encoding.h index 7b7e483b83..b57ad7aa08 100644 --- a/src/Encoding.h +++ b/src/Encoding.h @@ -80,6 +80,19 @@ public: * the command needs to be terminated by {} or a space. */ std::pair latexChar(char_type c) const; + /** + * Convert \p input to something that LaTeX can understand. + * This is either the string itself (if it is representable + * in this encoding), or a LaTeX macro. + * If a character is not representable in this encoding, but no + * LaTeX macro is known, a warning is given of lyxerr, and the + * character is returned in the second string of the pair and + * omitted in the first. + * \p dryrun specifies whether the string is used within source + * preview (which yields a special warning). + */ + std::pair latexString(docstring const input, + bool dryrun = false) const; /// Which LaTeX package handles this encoding? Package package() const { return package_; } /// A list of all characters usable in this encoding