Skip to content

Instantly share code, notes, and snippets.

@paulrougieux
Last active February 23, 2022 03:57
Show Gist options
  • Save paulrougieux/0e99e690b6ae8cd839bf to your computer and use it in GitHub Desktop.
Save paulrougieux/0e99e690b6ae8cd839bf to your computer and use it in GitHub Desktop.
Use of the package threeparttable with Lyx
#LyX 2.1 created this file. For more info see http://www.lyx.org/
\lyxformat 474
\begin_document
\begin_header
\textclass article
\begin_preamble
\usepackage[flushleft]{threeparttable}
\end_preamble
\use_default_options true
\begin_modules
knitr
\end_modules
\maintain_unincluded_children false
\language british
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman default
\font_sans default
\font_typewriter default
\font_math auto
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\default_output_format default
\output_sync 1
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks false
\pdf_pdfborder true
\pdf_colorlinks false
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry false
\use_package amsmath 1
\use_package amssymb 1
\use_package cancel 1
\use_package esint 1
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 1
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine natbib
\cite_engine_type authoryear
\biblio_style plainnat
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 1
\branch NoChildDocument
\selected 0
\filename_suffix 0
\color #faf0e6
\end_branch
\branch threeparttable
\selected 1
\filename_suffix 0
\color #faf0e6
\end_branch
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
Full Latex
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{table}
\end_layout
\begin_layout Plain Layout
\backslash
begin{threeparttable}
\end_layout
\begin_layout Plain Layout
\backslash
caption{Full Latex}
\end_layout
\begin_layout Plain Layout
\backslash
begin{tabular}{|c|c|c|}
\end_layout
\begin_layout Plain Layout
\backslash
hline
\end_layout
\begin_layout Plain Layout
This & That & Description
\backslash
tabularnewline
\end_layout
\begin_layout Plain Layout
\backslash
hline
\end_layout
\begin_layout Plain Layout
\backslash
hline
\end_layout
\begin_layout Plain Layout
bli & bla & blablabla
\backslash
tabularnewline
\end_layout
\begin_layout Plain Layout
\backslash
hline
\end_layout
\begin_layout Plain Layout
blu & blo & blebleble
\backslash
tabularnewline
\end_layout
\begin_layout Plain Layout
\backslash
hline
\end_layout
\begin_layout Plain Layout
\backslash
end{tabular}
\end_layout
\begin_layout Plain Layout
\backslash
begin{tablenotes}
\end_layout
\begin_layout Plain Layout
\backslash
item [a] the first note ...
\end_layout
\begin_layout Plain Layout
\backslash
end{tablenotes}
\end_layout
\begin_layout Plain Layout
\backslash
end{threeparttable}
\end_layout
\begin_layout Plain Layout
\backslash
end{table}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
Latex with Lyx table
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{table}
\end_layout
\begin_layout Plain Layout
\backslash
begin{threeparttable}
\end_layout
\begin_layout Plain Layout
\backslash
caption{Latex with Lyx table}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
This
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
That
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Description
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bli
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bla
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blablabla
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blu
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blo
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blebleble
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Standard
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{tablenotes}
\end_layout
\begin_layout Plain Layout
\backslash
item [a] the first note ...
\end_layout
\begin_layout Plain Layout
\backslash
end{tablenotes}
\end_layout
\begin_layout Plain Layout
\backslash
end{threeparttable}
\end_layout
\begin_layout Plain Layout
\backslash
end{table}
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Note Note
status open
\begin_layout Plain Layout
"Three part table" with Lyx table and Lyx table float
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Branch threeparttable
status open
\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open
\begin_layout Plain Layout
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{threeparttable}
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
"Three part table" with Lyx table and Lyx table float
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<column alignment="center" valignment="top">
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
This
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
tnote{a}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
That
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
tnote{b}
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Description
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bli
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bla
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blablabla
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blu
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blo
\end_layout
\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blebleble
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset ERT
status open
\begin_layout Plain Layout
\backslash
begin{tablenotes}
\backslash
item [a] the first note ...
\end_layout
\begin_layout Plain Layout
\backslash
item [b] the second note ...
\end_layout
\begin_layout Plain Layout
\backslash
item []Note: a general note concerning the whole table.
\end_layout
\begin_layout Plain Layout
\backslash
end{tablenotes}
\end_layout
\begin_layout Plain Layout
\backslash
end{threeparttable}
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open
\begin_layout Plain Layout
\begin_inset Caption Standard
\begin_layout Plain Layout
\begin_inset CommandInset label
LatexCommand label
name "tab:EU28-consumption-1990-2010"
\end_inset
Table notes using a minibox
\end_layout
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset VSpace defskip
\end_inset
\end_layout
\begin_layout Plain Layout
\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
use_makebox 0
width "100col%"
special "none"
height "1in"
height_special "totalheight"
status open
\begin_layout Plain Layout
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="3">
<features rotate="0" tabularvalignment="middle">
<column alignment="left" valignment="top" width="0pt">
<column alignment="right" valignment="top">
<column alignment="right" valignment="top">
<row>
<cell alignment="left" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
This
\begin_inset Foot
status open
\begin_layout Plain Layout
A first footnote
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
That
\begin_inset Foot
status open
\begin_layout Plain Layout
A second footnote
\end_layout
\end_inset
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" topline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
Description
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bli
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
bla
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blablabla
\end_layout
\end_inset
</cell>
</row>
<row>
<cell alignment="left" valignment="top" bottomline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blu
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" bottomline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blo
\end_layout
\end_inset
</cell>
<cell alignment="right" valignment="top" bottomline="true" usebox="none">
\begin_inset Text
\begin_layout Plain Layout
blebleble
\end_layout
\end_inset
</cell>
</row>
</lyxtabular>
\end_inset
\end_layout
\end_inset
\end_layout
\end_inset
\end_layout
\end_body
\end_document
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment