@@ -276,6 +276,25 @@ def _write_tabular_begin(self, buf, column_format):
276
276
277
277
buf .write ('\\ begin{{tabular}}{{{fmt}}}\n ' .format (fmt = column_format ))
278
278
279
+ def _write_tabular_end (self , buf ):
280
+ """
281
+ Write the end of a tabular environment or nested table/tabular
282
+ environment.
283
+
284
+ Parameters
285
+ ----------
286
+ buf : string or file handle
287
+ File path or object. If not specified, the result is returned as
288
+ a string.
289
+
290
+ """
291
+ buf .write ('\\ bottomrule\n ' )
292
+ buf .write ('\\ end{tabular}\n ' )
293
+ if self .caption is None and self .label is None :
294
+ pass
295
+ else :
296
+ buf .write ('\\ end{table}\n ' )
297
+
279
298
def _write_longtable_begin (self , buf , column_format ):
280
299
"""
281
300
Write the beginning of a longtable environment including caption and
@@ -312,25 +331,6 @@ def _write_longtable_begin(self, buf, column_format):
312
331
# https://tex.stackexchange.com/questions/219138
313
332
buf .write ('\\ \\ \n ' )
314
333
315
- def _write_tabular_end (self , buf ):
316
- """
317
- Write the end of a tabular environment or nested table/tabular
318
- environment.
319
-
320
- Parameters
321
- ----------
322
- buf : string or file handle
323
- File path or object. If not specified, the result is returned as
324
- a string.
325
-
326
- """
327
- buf .write ('\\ bottomrule\n ' )
328
- buf .write ('\\ end{tabular}\n ' )
329
- if self .caption is None and self .label is None :
330
- pass
331
- else :
332
- buf .write ('\\ end{table}\n ' )
333
-
334
334
@staticmethod
335
335
def _write_longtable_end (buf ):
336
336
"""
0 commit comments