Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve table styles #24

Merged
merged 2 commits into from
Jun 9, 2020
Merged

Improve table styles #24

merged 2 commits into from
Jun 9, 2020

Conversation

vincentdoerig
Copy link
Owner

@vincentdoerig vincentdoerig commented Jun 3, 2020

This is an attempt to make the tables in this library to look more like tables we see in LaTeX.

Before

image

After

image

Same table in actual LaTeX

image

Add two new example tables image

Detailed Changes

  • table does not stretch to 100% width anymore (auto width, aligned left)
  • add a thicker border above and below the table
  • add a thin border below the header/above the footer
  • add table numbering
  • add two more example tables
  • fix semantic heading of "Contents" from h3 to h2

TODO

  • decrease line-height
  • figure out a way to make an x-overflow scroll when the table is larger than 100%
  • unbold header/footer (?)

- add two more example tables
- add caption to tables
- add caption counter
- fix content heading semantics
@vercel
Copy link

vercel bot commented Jun 3, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vincentdoerig/latex-css/bugrywxm2
✅ Preview: https://latex-css-git-better-tables.vincentdoerig.now.sh

- decrease line-height
- add `scroll-wrapper` class
- make tables not wrap when wrapped with the `scroll-wrapper` class
- fix image height
@tiagofilipesilva
Copy link
Contributor

How were the \LaTeX tables typset? With a default tabular environment?

@vincentdoerig
Copy link
Owner Author

Correct:

\begin{tabular}{@{}lll@{}} \toprule
	Header 1        & Header 2        & Header 3      \\ \midrule
	Description 1 & Description 2 & Description 3 \\
	Description 1 & Description 2 & Description 3 \\
	Description 1 & Description 2 & Description 3 \\ \midrule
	Footer 1      & Footer 2      & Footer 3      \\ \bottomrule 
\end{tabular}

@vincentdoerig vincentdoerig merged commit 0449713 into master Jun 9, 2020
@vincentdoerig vincentdoerig deleted the better-tables branch June 9, 2020 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants