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

Projects
None yet
3 participants
@Octachron
Copy link
Contributor

commented Aug 31, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Sep 1, 2018

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

@Octachron

This comment has been minimized.

Copy link
Contributor Author

commented Sep 1, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Sep 1, 2018

I see, thanks.

@gasche

gasche approved these changes Sep 2, 2018

Copy link
Member

left a comment

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

This comment has been minimized.

Copy link
@nojb

nojb Sep 2, 2018

Contributor

Final dot missing.

This comment has been minimized.

Copy link
@Octachron

Octachron Sep 2, 2018

Author Contributor

Fixed, thanks!

@Octachron Octachron force-pushed the Octachron:ocamldoc_latex_ref branch from eba737b to 5d6c043 Sep 2, 2018

@nojb nojb merged commit f058a3e into ocaml:trunk Sep 2, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
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.