File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -209,10 +209,20 @@ let ocamltag tag pp ppf x = create2 "ocamltag" Fmt.string pp ppf tag x
209
209
210
210
let math ppf x = Fmt. pf ppf {|$% s$| } x
211
211
212
+ let remove_empty_last_line x =
213
+ let rec find_last_line pos x =
214
+ if pos < 0 then x
215
+ else
216
+ match x.[pos] with
217
+ | ' ' | '\012' | '\n' | '\r' | '\t' -> find_last_line (pos - 1 ) x
218
+ | _ -> if pos = String. length x - 1 then x else String. sub x 0 (pos + 1 )
219
+ in
220
+ find_last_line (String. length x - 1 ) x
221
+
212
222
let equation ppf x =
213
223
let name = " equation*" in
214
224
mbegin ppf name;
215
225
Fmt. cut ppf () ;
216
- Fmt. string ppf x ;
226
+ Fmt. string ppf (remove_empty_last_line x) ;
217
227
Fmt. cut ppf () ;
218
228
mend ppf name
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ \subsection{Math\label{math}}%
91
91
\f\relax {x} = \int _{-\infty }^\infty
92
92
\f\hat\xi \, e^{2 \pi i \xi x}
93
93
\, d\xi
94
-
95
94
\end {equation* }
96
95
97
96
\subsection {Modules\label {modules } }%
You can’t perform that action at this time.
0 commit comments