[scribus] Tables in 1.5.6svn
John Jason Jordan
johnxj at gmx.com
Fri Jan 10 21:05:27 UTC 2020
On Wed, 8 Jan 2020 12:28:38 -0800
John Jason Jordan <johnxj at gmx.com> dijo:
>Having said that, in the process of trying to create tables in render
>frames I ran into a Latex option - \usepackage{booktabs}. It looks like
>this: https://www.latex-tutorial.com/tutorials/tables/ . (You have to
>scroll down to get to the samples with booktabs.)
>
>Although I personally don't like vertical lines, the booktabs package
>looks cool. Unfortunately, although I found lots of sample tables using
>booktabs with the code to create them, I can't get it to work in a
>render table. Mostly the errors I get are that \usepackage{booktabs}
>can only be used in the preamble, but I can't figure out where the
>preamble is for a Latex render frame.
>
>But here is something even more interesting that I unearthed:
>
> https://tablesgenerator.com/#
>
>This will allow you to create the Latex code for a table using a
>completely graphical interface. It includes the option to use booktabs,
>but when I created a table with booktabs and then pasted the code into
>a render frame it failed, with the same error message as above. But if
>I use the site to create a table without booktabs it works fine in a
>render table. Perhaps others here can play with it.
I finally got the booktabs package working in a render frame. In the
Edit window you have to go into the Fonts/Headers tab and add:
\usepackage{booktabs}
I also bumped up the resolution to 1200 dpi. I'm not sure I need that
much, but it only slows down the rendering time slightly.
Then I used the tablesgenerator.com site above to create a table of
four rows and five columns, using the booktabs option. I pasted the
code into the render frame edit page, and it worked.
But it created a midrule for every line, and I didn't like that, so I
did a little editing to delete all but the midrule at the end of the
first row. I really like the results.
Remaining to be figured out:
o Do I really need 1200 dpi?
o How to remove the first and last vertical lines
o How to set the thickness of the rules
To make my table, add \usepackage{booktabs} in the Fonts/Headers tab of
the Edit Source window, then copy and paste the following into the left
side of the window:
\begin{table}[]
\caption{Table with \textbackslash{}usepackage\{booktabs\}}
\label{tab:my-table}
\begin{tabular}{@{}|c|c|c|l|r|@{}}
\toprule
Row 1, column 1 & Row 1, column 2 & Row 1, column 3 & Row 1, column 4 & Row 1, column 5 \\ \midrule
Row 2, column 1 & Row 2, column 2 & Row 2, column 3 & Row 2, column 4 & Row 2, column 5 \\
Row 3, column 1 & Row 3, column 2 & Row 3, column 3 & Row 3, column 4 & Row 3, column 5 \\
Row 4, column 1 & Row 4, column 2 & Row 4, column 3 & Row 4, column 4 & Row 4, column 5 \\ \bottomrule \end{tabular}
\end{table}
More information about the scribus
mailing list