Skip to content

Conversation

Octachron
Copy link
Member

Based on top of #484, this PR proposes to reorganize the latex backend to split the definition of types and macro (and environment definitions) from the rendering itself.

This is done mostly to make it clearer which latex macros and environments are used by the backend.

Moreover, the name of the macros and environment intended to be defined in the preamble (in a odoc.sty file for instance) are now consistently prefixed by ocaml.

@jonludlam
Copy link
Member

Sorry @Octachron, this needs rebasing now!

@jonludlam
Copy link
Member

On the plus side, once it's rebased the CI should work :-)

@Octachron Octachron force-pushed the latex_cleanup branch 2 times, most recently from 1bf72b0 to dd3bb5c Compare October 21, 2020 09:35
@Octachron
Copy link
Member Author

Rebased and simplified.

@Drup
Copy link
Contributor

Drup commented Oct 25, 2020

one more rebase ? :x

- Avoid using raw latex code fragment in the generator
- Use ocaml prefix for macros that are expected to be user-defined:
  Either for customization purpose
  * ocamlinlinecode
  * ocamlcodeblock
  * ocamlcodefragment
or because they require specific latex packages in the current
implementation:
  * ocamllongtable
  * ocamlindent
- Tags (keywords, type-var, ...) are wrapped as \ocamltag{tag}{content}
  Latex consumer are expected to implement the handling of unknowns tags by
  themselves
@Octachron
Copy link
Member Author

One more rebase done.

@jonludlam jonludlam merged commit b4fead7 into ocaml:master Oct 26, 2020
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.

3 participants