-
Notifications
You must be signed in to change notification settings - Fork 409
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
Build latex files with the @doc
alias
#5366
Conversation
c522f15
to
f91c21f
Compare
Apologies, could you explain a bit more what you are proposing on this PR? Are you adding a new built-in alias to generate LaTeX? Are you modifying the existing In general it seems sensible to support other output formats support by |
Yes, sorry the wording was unclear |
Note from meeting:
|
Once this solidifies a bit, I'd like to submit a separate pull request to add a |
Signed-off-by: Sacha Ayoun <[email protected]>
Signed-off-by: Sacha Ayoun <[email protected]>
…-doc Signed-off-by: Sacha Ayoun <[email protected]>
I'm not really sure where to restrict the feature to dune > 3.1, where should I be adding a guard? In the |
Additionally, I'm trying to get things to work using directory targets, but I get
Is there something specific I should be doing with directory targets? |
It is the easiest place. Features that have a specific stanza are restricted at parsing time, it is more static. But here since there is only an alias;
You should specify that the action with the directory target is sandoxed. |
Update: I had a very intense deadline the past week and was not able to work on that for a while, I apologise |
I've made some progress but I'm stuck with mainly one thing
Should I just choose use |
If it's any consolation, we went with |
I have #6778 if you want to use that alias. |
Marking as draft since it is still in progress. |
Please re-open if this is still relevant |
Hi!
This PR aims at adding a
_latex
target to the@doc
standard alias. There is no open issue containing the wordlatex
so I thought I might just as well write a PR to get the discussion going.It's still a work in progress for several reasons:
highlight.pack.js
andodoc.css
are generated, using someodoc support-files
commandsome-thing
, odoc generates a file calledsome_thing
, I use Re to replace every-
into an_
but I'm not sure that's the best thing to do\input
in any latex file accessible from the toplevel file.I tried to factor out as much as the common logic between html and latex as possible, but I'm not sure if of how well I did that. One thing is that I'm really not satisfied with the following functor names
Generator_setup
,Generator_helper
,Html_setup
,Latex_setup
,Html_generator
andLatex_generator
.Additionally, here, or in a subsequent PR, it would be nice to have a stanza in the dune-project file that explains how to call some kind of latex command to build the latex manual as an option
Any early feedback would be helpful :)
In parallel I'll try to improve the latex story on odoc's side, in particular, trying to make progress on ocaml/odoc#123
PS: as a bonus, there's a tiny "fix". The usage of
List.filter_map
was unnecessary. Looks like the legacy of some previous version where there was something to filter