Skip to content

Commit

Permalink
update manual
Browse files Browse the repository at this point in the history
  • Loading branch information
lvjr committed Oct 9, 2022
1 parent 03e5182 commit a7dba2e
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 14 deletions.
34 changes: 27 additions & 7 deletions manual/manual-3.tex
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ \chapter{Extra Interfaces}
of \verb!tblr! environment, most of which are used for long tables (see Chapter \ref{chap:long}).

You can use \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
to set default inner and outer specifications of tables, respectively.
to set default inner and outer specifications of tables, respectively (see Section \ref{sec:default}).

\section{Inner Specifications}

Expand Down Expand Up @@ -78,6 +78,16 @@ \subsection{Minimal Strut for Cell Text}
\end{tblr}
\end{demohigh}

By replacing stretch with row heights, we can get perfect vertical centering for your numerical tables.

\begin{demohigh}
\begin{tblr}{hlines, stretch=0, rows={ht=\baselineskip}}
2021 & 2022 & 2023 \\
0.4 & 0.5 & 0.6 \\
1.1 & 2.2 & 3.3 \\
\end{tblr}
\end{demohigh}

\subsection{Rowseps and Colseps for All}

The following example uses \verb!rowsep! and \verb!colsep! keys to set padding for all rows and columns.
Expand Down Expand Up @@ -279,18 +289,32 @@ \subsection{Expand Macros First}
\end{demohigh}

\section{Default Specifications}
\label{sec:default}

\verb!Tabularray! package provides \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
for you to change the default inner and outer specifications of tables.

In the below example, the first line draws all hlines and vlines for all tables created afterwards,
while the second line makes all tables created afterwards vertically align at the last row.
In general different \verb!tabularray! environments (\verb!tblr!, \verb!talltblr!,
\verb!longtblr!, etc) could have different default specifications.
You can list the environments in the optional arguments of these two commands,
and they only apply to \verb!tblr! environment when the optional arguments are omitted.

In the following example, the first line draws all hlines and vlines for all \verb!tblr! tables
created afterwards, while the second line makes all \verb!tblr! tables created afterwards
vertically align at the last row.

\begin{codehigh}
\SetTblrInner{hlines,vlines}
\SetTblrOuter{baseline=B}
\end{codehigh}

And the following example sets zero \verb!rowsep! for all \verb!tblr! and \verb!longtblr! tables
created afterwards.

\begin{codehigh}
\SetTblrInner[tblr,longtblr]{rowsep=0pt}
\end{codehigh}

\section{New Tabularray Environments}

You can define new \verb!tabularray! environments using \verb!\NewTblrEnviron! command:
Expand All @@ -306,10 +330,6 @@ \section{New Tabularray Environments}
\end{mytblr} Text
\end{demohigh}

If not giving the optional argument to \verb!\SetTblrInner! or \verb!\SetTblrOuter! command,
we set the default specifications for \verb!tblr! environment.
And different tabularray environments could have different default specifications.

\section{New General Environments}

With \verb!+b! argument type of \verb!\NewDocumentEnvironment! command,
Expand Down
10 changes: 10 additions & 0 deletions manual/manual-5.tex
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,11 @@ \subsection{Inner key \texttt{process} in action}
\end{tblr}
\end{demohigh}
\section{Library \texttt{nameref}}
From version 2022D, you can load \verb!nameref! library
to make \verb!\nameref! and \verb!longtblr! work together.
\section{Library \texttt{siunitx}}
When writing \verb!\UseTblrLibrary{siunitx}! in the preamble of the document,
Expand Down Expand Up @@ -597,4 +602,9 @@ \section{Library \texttt{varwidth}}
in \verb!tabularray! environments with \verb!rowsep=0pt!, such as
\verb!booktabs!/\verb!longtabs!/\verb!talltabs! environments from \verb!booktabs! library.
\section{Library \texttt{zref}}
From version 2022D, you can load \verb!zref! library
to make \verb!\zref! and \verb!longtblr! work together.
\end{document}
44 changes: 37 additions & 7 deletions tabularray.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ \chapter{Extra Interfaces}
of \verb!tblr! environment, most of which are used for long tables (see Chapter \ref{chap:long}).
You can use \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
to set default inner and outer specifications of tables, respectively.
to set default inner and outer specifications of tables, respectively (see Section \ref{sec:default}).
\section{Inner Specifications}
Expand Down Expand Up @@ -1414,6 +1414,16 @@ \subsection{Minimal Strut for Cell Text}
\end{tblr}
\end{demohigh}
By replacing stretch with row heights, we can get perfect vertical centering for your numerical tables.
\begin{demohigh}
\begin{tblr}{hlines, stretch=0, rows={ht=\baselineskip}}
2021 & 2022 & 2023 \\
0.4 & 0.5 & 0.6 \\
1.1 & 2.2 & 3.3 \\
\end{tblr}
\end{demohigh}
\subsection{Rowseps and Colseps for All}
The following example uses \verb!rowsep! and \verb!colsep! keys to set padding for all rows and columns.
Expand Down Expand Up @@ -1615,18 +1625,32 @@ \subsection{Expand Macros First}
\end{demohigh}
\section{Default Specifications}
\label{sec:default}
\verb!Tabularray! package provides \verb!\SetTblrInner! and \verb!\SetTblrOuter! commands
for you to change the default inner and outer specifications of tables.
In the below example, the first line draws all hlines and vlines for all tables created afterwards,
while the second line makes all tables created afterwards vertically align at the last row.
In general different \verb!tabularray! environments (\verb!tblr!, \verb!talltblr!,
\verb!longtblr!, etc) could have different default specifications.
You can list the environments in the optional arguments of these two commands,
and they only apply to \verb!tblr! environment when the optional arguments are omitted.
In the following example, the first line draws all hlines and vlines for all \verb!tblr! tables
created afterwards, while the second line makes all \verb!tblr! tables created afterwards
vertically align at the last row.
\begin{codehigh}
\SetTblrInner{hlines,vlines}
\SetTblrOuter{baseline=B}
\end{codehigh}
And the following example sets zero \verb!rowsep! for all \verb!tblr! and \verb!longtblr! tables
created afterwards.
\begin{codehigh}
\SetTblrInner[tblr,longtblr]{rowsep=0pt}
\end{codehigh}
\section{New Tabularray Environments}
You can define new \verb!tabularray! environments using \verb!\NewTblrEnviron! command:
Expand All @@ -1642,10 +1666,6 @@ \section{New Tabularray Environments}
\end{mytblr} Text
\end{demohigh}
If not giving the optional argument to \verb!\SetTblrInner! or \verb!\SetTblrOuter! command,
we set the default specifications for \verb!tblr! environment.
And different tabularray environments could have different default specifications.
\section{New General Environments}
With \verb!+b! argument type of \verb!\NewDocumentEnvironment! command,
Expand Down Expand Up @@ -2820,6 +2840,11 @@ \subsection{Inner key \texttt{process} in action}
\end{tblr}
\end{demohigh}
\section{Library \texttt{nameref}}
From version 2022D, you can load \verb!nameref! library
to make \verb!\nameref! and \verb!longtblr! work together.
\section{Library \texttt{siunitx}}
When writing \verb!\UseTblrLibrary{siunitx}! in the preamble of the document,
Expand Down Expand Up @@ -2957,6 +2982,11 @@ \section{Library \texttt{varwidth}}
in \verb!tabularray! environments with \verb!rowsep=0pt!, such as
\verb!booktabs!/\verb!longtabs!/\verb!talltabs! environments from \verb!booktabs! library.
\section{Library \texttt{zref}}
From version 2022D, you can load \verb!zref! library
to make \verb!\zref! and \verb!longtblr! work together.
\chapter{History and Future}
\section{The Future}
Expand Down

0 comments on commit a7dba2e

Please sign in to comment.