verso
verso copied to clipboard
fix: generate placeholder text for missing `toTex` implementations
Generate placeholder text for missing toTex implementations instead failing.
@david-christiansen With this change, the main.tex gets generated. However, running lualatex main.tex fails with errors. I have categorized the errors below along with the fixes to enable successful conversion to main.pdf.
- FIX: Need to add the following for showing error text in red color
\usepackage{xcolor}\colorlet{RED}{black} - FIX: Replace
\Verbwith\verb - ERROR: Cannot have verbatim text inside section titles
-
LaTeX Error: \verb illegal in argument. - e.g.,
\subsubsection{The \verb|ToFormat| Class} - FIX: We may need something like https://tex.stackexchange.com/questions/152229/strange-error-related-to-verb-in-section-titles
- Or https://tex.stackexchange.com/questions/24574/how-to-put-verb-command-inside-of-textbf-block
- Or https://tex.stackexchange.com/questions/2790/when-should-one-use-verb-and-when-texttt
-
- ERROR:
LaTeX Error: \verb ended by end of line— happens in hyperlink args- e.g., in
\hyperlink{"https://lean-lang.org/doc/reference/4.23.0-rc2/find/?domain=Verso.Genre.Manual.section&name=do-notation"}{\verb|do|-notation}.Because the resulting value is treated as a side-effect-free term, the compiler may re-order,` - FIX: use
\textttinstead
- e.g., in
- ERROR:
LaTeX Error: Command \item invalid in math mode.- e.g.,
.\item The syntax \verb|have (eq := h) pat := e|is equivalent to \verb|match h : e with | pat => _| - FIX: In the second line there is a
|inside\verb - So we should use some other delimiter character, such as
! - Or use
\begin{verbatim} - Also
\itemshould probably begin on a new line, perhaps?
- e.g.,
- ERROR:
LaTeX Error: Lonely \item--perhaps a missing list environment.- Issue due to
\hyperlinksecond arg having underscore - FIX: escape underscore
- Issue due to
- ERROR:
! Text line contains an invalid character.- e.g.,
l.32508 ... or. Usually accessed via the \verb|^^^ - FIX:
Try \verb|\^\^\^|
- e.g.,
- ERROR:
LaTeX Error: \verb illegal in argument.- FIX: Replace with
\textttinstead
- FIX: Replace with
Thanks for the big list of things that need fixing! That'll be really helpful to check off as it goes.
I'm away from the computer for a few days but will look again as soon as I'm back. Thanks again!