Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Latex output for variant types #7488

Closed
vicuna opened this issue Feb 18, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Feb 18, 2017

Original bug ID: 7488
Reporter: @xavierleroy
Assigned to: @Octachron
Status: resolved (set by @gasche on 2017-02-19T00:36:08Z)
Resolution: fixed
Priority: high
Severity: minor
Version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: ocamldoc

Bug description

Consider the following type declaration in a .mli file:

type t =
| A (** This is case A )
| B (
* This is the other case, B *)

ocamldoc -latex produces:

\label{type:Foo.t}\begin{ocamldoccode}
type t =
\end{ocamldoccode}
| A\begin{ocamldoccomment}
This is case A

\end{ocamldoccomment}
| B\begin{ocamldoccomment}
This is the other case, B

\end{ocamldoccomment}

Notice that "| A" and "| B" are outside the ocamldoccode environment, causing LaTeX to render them incorrectly.

(Edited from original report) The problem doesn't happen consistently. For example, running ocamldoc on unix.mli from the 4.05 working sources, the "process_status" type is correctly formatted.
(End edit.)

There are many instances of this problem in the PDF manual for the working sources (4.05-dev), so if it could be solved by the 4.05 release this would be great.

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 18, 2017

Comment author: @Octachron

I can reproduce (and fix) the first failing case, but I am bit worried that I cannot reproduce the second counter-example: the latex output is still incorrect when I look at the generated latex code?

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 18, 2017

Comment author: @Octachron

A possible fix is proposed here: #1053.

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 19, 2017

Comment author: @gasche

Fixed using Octachron's patch.

@vicuna vicuna closed this Feb 19, 2017

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 19, 2017

Comment author: @xavierleroy

Thanks for the super-fast reply!

The second part of my report (about comments on their own lines) was completely wrong. I edited it for the record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.