yegor256 / ffcode

LaTeX package for writing code in your articles in a good looking fixed-font
https://ctan.org/pkg/ffcode
MIT License
9 stars 1 forks source link

Special characters cannot be escaped #25

Closed haggishunt56 closed 8 months ago

haggishunt56 commented 1 year ago

I have LaTeX special characters in my code, namely { and }. These cause Overleaf to show errors during compiling. I have tried to escape the characters with { and } respectively which works outside of the ffcode block, but inside the formatted code block it displays both the backslash and curly bracket characters. Screenshot 2023-06-05 at 00 31 56 Can this be amended so that escaped special characters are treated the same in ffcode as in other parts of the LaTeX file?

yegor256 commented 8 months ago

@haggishunt56 you don't need to escape them inside ffcode blocks:

\begin{ffcode}
class Hello<T> {
}
\end{ffcode}

This will render correctly.