diff options
| author | Alasdair Armstrong | 2020-10-21 14:23:54 +0100 |
|---|---|---|
| committer | GitHub | 2020-10-21 14:23:54 +0100 |
| commit | 75d5ec609a78a32e63027c66ad43a67d248a4983 (patch) | |
| tree | 2c2d86a21d567d613ea38addeba940605758e567 /src/sail.ml | |
| parent | fec8305037e566c2516bbe83cca570fadafce5fc (diff) | |
| parent | 28e18d39774079c9434439b35d967cb352ef41c8 (diff) | |
Merge pull request #106 from jrtc27/latex-abbrevs-spacing
latex: Guard abbreviations with \@
Diffstat (limited to 'src/sail.ml')
| -rw-r--r-- | src/sail.ml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sail.ml b/src/sail.ml index 38d4c2e8..5a1ad096 100644 --- a/src/sail.ml +++ b/src/sail.ml @@ -166,6 +166,14 @@ let options = Arg.align ([ ( "-latex_full_valspecs", Arg.Clear Latex.opt_simple_val, " print full valspecs in LaTeX output"); + ( "-latex_abbrevs", + Arg.String (fun s -> + let abbrevs = String.split_on_char ';' s in + let filtered = List.filter (fun abbrev -> not (String.equal "" abbrev)) abbrevs in + match List.find_opt (fun abbrev -> not (String.equal "." (String.sub abbrev (String.length abbrev - 1) 1))) filtered with + | None -> Latex.opt_abbrevs := filtered + | Some abbrev -> raise (Arg.Bad (abbrev ^ " does not end in a '.'"))), + " semicolon-separated list of abbreviations to fix spacing for in LaTeX output (default 'e.g.;i.e.')"); ( "-marshal", Arg.Tuple [set_target "marshal"; Arg.Set Initial_check.opt_undefined_gen], " OCaml-marshal out the rewritten AST to a file"); |
