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

MPR7843: ocamldoc, latex: keep text in {{!lbl} text} #2013

Merged
merged 1 commit into from Sep 2, 2018

Conversation

Octachron
Copy link
Member

MPR7843: Currently ocamldoc latex backend translates {{!label}text} to [\ref{label}], discarding the text, if the label points to a (sub)section. Contrarily, the html backend keep the text by translating the ocamldoc markup to <a href=label> text </a>. This PR proposes to keep the text associated to the label in the latex mode too:
{{!label}text}text[\ref{label}].

@nojb
Copy link
Contributor

nojb commented Sep 1, 2018

Is the lack of space between text and [\ref{label}] intentional?

@Octachron
Copy link
Member Author

This is the format already used for other references, for instance

val x: unit
(**  {{!x}some text} *)

yields
... some text[\ref{val:Module_name.x}]

@nojb
Copy link
Contributor

nojb commented Sep 1, 2018

I see, thanks.

Copy link
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a correct fix, thanks!

(Don't forget to add the GPR number in the Changes entry.)

Changes Outdated
@@ -206,6 +206,10 @@ Working version

### Tools

- MPR#7843: ocamldoc, better handling of {{!label}text} in the latex
backend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final dot missing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@nojb nojb merged commit f058a3e into ocaml:trunk Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants