Problems

Tables: Border and internal lines

Below are notes about an issue that faculty have been experiencing when working with tables in Pressbooks. Comments are welcomed.

Reported problem

When a table is added to a page in Pressbooks, the border and internal lines (for rows and columns) are light in the web view and non-existent in the PDF.

  • How can lines be darkened in the web view?
  • How can lines be made visible in the PDF output?

What we know

There are still some inconsistencies in styling between the web version and some of the file outputs in Pressbooks. These issues are slowing being addressed by the Pressbooks development community and implemented through upgrade releases every few months. This issue will be added to the list of requested improvements.

One solution

Currently, users can adjust table properties — specifically how lines within a table — display using the Table properties option. Follow these steps.

Step 1

Hover over the Table icon in the toolbar at the top of the page.

Step 2

Choose “Insert table” from the drop-down list, and highlight the number of rows and columns needed for the table. Press “Enter”.

Step 3

Highlight the table just created, in the text body.

Step 4

Hover over the Table icon again, and select “Table properties” from the drop-down list.

Step 5

Select “Class” to reveal that drop-down list. See below this screenshot for how these class options affect the lines within a table, both for the web view and PDF output.

Class: Standard

  • light lines for both rows and columns in web view
  • no lines at all (including border around table) on print and digital PDFs

Class: No lines

  • light lines for columns and bordering table in web view; no internal lines for rows
  • no lines at all (including border around table) on print and digital PDFs

Class: Lines

  • dark lines don’t appear in web view; only light lines for both rows and columns
  • dark lines for rows only (no lines at all for columns) on print and digital PDFs

Web view

PDF output

Class: Shaded

  • light lines for both rows and columns within a shaded box, in web view
  • entire table appears as one shaded box with no lines for either rows or columns on print and digital PDF

Web view

PDF output

How to create dark lines for both the web version and PDF output

To create a table with dark lines in both the web view and PDF files, like this one…

… markup language can be added to the “Text” tab when using the visual editor in Pressbooks. For each table, place the below markup language in place of the beginning table tag. “Update” after each replacement, and check the web view. A sample PDF can be exported as well to double-check this change.

Replace <table>

with

<table {
width: 100%;
border: 1px solid #000;
}

th, td {
width: 25%;
text-align: left;
vertical-align: top;
border: 1px solid #000;
border-spacing: 0;
}>

Comments are closed.