diff options
-rw-r--r-- | ocamldoc/Changes.txt | 2 | ||||
-rw-r--r-- | ocamldoc/odoc_latex.ml | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/ocamldoc/Changes.txt b/ocamldoc/Changes.txt index 5ebd21f0f2..7f28b83f63 100644 --- a/ocamldoc/Changes.txt +++ b/ocamldoc/Changes.txt @@ -1,4 +1,6 @@ Current : +OK - fix: when generating separated files in latex, generate them in + the same directory than the main file, (the one specified by -o) OK - mod: one section per to module in latex output + improve latex output OK - mod: odoc_latex: use buffers instead of string concatenation OK - add: new ocamldoc man page, thanks to Samuel Mimram diff --git a/ocamldoc/odoc_latex.ml b/ocamldoc/odoc_latex.ml index 39d1c9c737..ebd51a96db 100644 --- a/ocamldoc/odoc_latex.ml +++ b/ocamldoc/odoc_latex.ml @@ -1074,12 +1074,14 @@ class latex = (** Generate the LaTeX file from a module list, in the {!Odoc_info.Args.out_file} file. *) method generate module_list = self#generate_style_file ; + let main_file = !Args.out_file in + let dir = Filename.dirname main_file in if !Args.separate_files then ( let f m = try let chanout = - open_out ((Filename.concat !Args.target_dir (Name.simple m.m_name))^".tex") + open_out ((Filename.concat dir (Name.simple m.m_name))^".tex") in let fmt = Format.formatter_of_out_channel chanout in self#generate_for_top_module fmt m ; @@ -1095,7 +1097,7 @@ class latex = ); try - let chanout = open_out !Args.out_file in + let chanout = open_out main_file in let fmt = Format.formatter_of_out_channel chanout in if !Args.with_header then self#latex_header fmt; List.iter |