Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random |  
Login
create new user
Username:
Password:
forget your password?
Main Menu
Sections

Meta

Talkback

Downloads

Information
test table formatting (Definition)

LaTeX Table Rendering Test Suite

This entry tests LaTeX table rendering in the Physics Library make4ht pipeline.

For these examples, table rows are terminated with ∖tabularnewline rather than the traditional double-backslash notation. This avoids ambiguity introduced by text processing or editor escaping of repeated backslash characters.

The tests are intentionally introduced in stages. Each stage adds only a small number of new LaTeX features so that rendering failures can be isolated.

Test 1: Minimal Table

A B C
1 2 3
4 5 6

Test 2: Horizontal Rules




A B C



1 2 3
4 5 6



Test 3: Full Grid




ID Name Score



1 ALICE 85



2 Bob 92



3 Carol 78



Test 4: Alignment




Left Center Right



Apple 10 1.25
Orange 125 12.50
Banana 3 0.75



Test 5: Mathematics




Quantity Equation SI Unit



velocity v = dx-
dt m, s−1



acceleration a = d2x
dt2- m, s−2



force F = ma N



energy E = 1-
2mv2 J



Test 6: Multicolumn




Student Grades



Student Physics Mathematics



David A A-



Emma B+ A



Maria A- B+



Test 7: Paragraph Column



Feature

Description



Tabular

The standard LaTeX environment for arranging information into rows and columns.



Paragraph column

A fixed-width paragraph column allows longer text to wrap inside the table cell.



Rendering test

This tests how make4ht converts a fixed-width LaTeX table column into HTML.



Test 8: Grouped Headings






Velocity





Time x y vx vy





0 0 0 10 20





1 10 15.1 10 10.2





2 20 20.4 10 0.4





Stage 1A Result

If all of the tables above render correctly, the basic table system is working and the earlier failure can be attributed to corruption of the traditional double-backslash table row terminator.

The rendering suite therefore continues using ∖tabularnewline so that the source remains robust when copied through the Physics Library editing pipeline.

Stage 1B: Hyperlink Rendering

This stage introduces the hyperref package.

The preamble for this stage should contain

\usepackage{hyperref}

No color package is required for this stage.

Hyperlinks are first tested outside a table. A second test then places the same type of hyperlink inside a table cell. This allows the general hyperlink renderer and the interaction between hyperlinks and tables to be tested separately.

Test 9: Hyperlink Outside a Table

The following text should appear as a clickable external hyperlink:

Visit Physics Library

A second hyperlink points to the LaTeX Project:

Visit the LaTeX Project

If both pieces of text appear as working hyperlinks, then basic hyperref conversion is functioning.

Test 10: Hyperlinks Inside Table Cells

The same hyperlink command is now placed inside ordinary table cells.



Resource

Hyperlink



Physics Library

Open Physics Library



Physics Library Encyclopedia

Open the Physics Library Encyclopedia



LaTeX Project

Open the LaTeX Project



Test 11: Hyperlink Mixed With Mathematics

This test places mathematical notation and a hyperlink in the same table without placing them in the same cell.




Topic Example

Resource




Velocity v = dx-
dt

Physics Library velocity entry




Force F = ma

Physics Library force entry




Wave number k = 2π-
λ

Physics Library




Stage 1B Result

There are three useful outcomes from this stage.

  1. If Test 9 and Tests 10–11 all work, then ordinary external hyperlinks and hyperlinks inside tables are supported by the current make4ht pipeline.
  2. If Test 9 works but Tests 10–11 fail, then the problem is specifically associated with hyperlinks inside the tabular environment.
  3. If Test 9 itself fails, then the problem should be investigated at the hyperref or make4ht configuration level before table interaction is considered.

Next Rendering Stage

After the hyperlink tests are verified, the next stage will introduce color.

The first color test should use only

\usepackage{xcolor}

and ordinary commands such as

\textcolor{red}{Critical}

It should initially avoid

\usepackage[table]{xcolor}
\rowcolor
\cellcolor

because those commands alter table-row processing and therefore require a separate rendering test.

Test 12: Comparing ∖PMlinkexternal and ∖href

This test compares the Physics Library native external-link command ∖PMlinkexternal with the standard LaTeX ∖href command from the hyperref package.

The same URLs and visible labels are used in both columns.




Destination

∖PMlinkexternal

∖href




Physics Library

Physics Library

Physics Library




Physics Library Encyclopedia

Physics Library Encyclopedia

Physics Library Encyclopedia




LaTeX Project

LaTeX Project

LaTeX Project




Test 13: Colored Text Inside a Table

This test introduces the xcolor package.

Only ordinary text color is tested here. Colored cells and colored rows are intentionally deferred to a later test because those features modify table internals.




Status Value Meaning



Nominal 1.00 Normal operation



Warning 1.25 Check system



Critical 1.75 Immediate attention



Information 0.50 Informational state



Test 14: Colored Mathematics

This test applies color to mathematical expressions inside table cells.



Quantity Expression


Velocity v = dx-
dt


Force F = ma


Energy E = 1
--
2mv2


Wave number k = 2π
---
λ


Test 15: Colored Hyperlinks

This test combines the hyperlink capability established in the previous tests with ordinary text color.



Method

Example



Physics Library native

Physics Library



Standard LaTeX hyperlink

Physics Library



Test 16: Hyperlink Color Precedence

This test determines whether hyperlink styling from the generated HTML overrides an enclosing LaTeX text color.



Method

Example



Normal hyperlink

Physics Library



Color outside hyperlink

Physics Library



Color inside hyperlink label

Physics Library



Normal PM link

Physics Library



Color outside PM link

Physics Library



Color inside PM link label

Physics Library



Test 16 Result

The pdf and HTML renderers treat explicit hyperlink colors differently.

In the PDF output, explicit colors applied with ∖textcolor are preserved for both ∖href and ∖PMlinkexternal. This is true whether the color command surrounds the hyperlink or appears inside the hyperlink label.

In the Physics Library HTML output, hyperlinks retain the normal site link color. Explicit LaTeX text colors do not override the HTML hyperlink appearance.

Therefore, authors should not rely on ∖textcolor to control hyperlink appearance consistently across PDF and HTML output. Hyperlink color in the web version should generally be considered part of the Physics Library site style rather than article-level LaTeX formatting.

PDF Hyperlink Appearance

When the hyperref package is used with its default PDF settings, external hyperlinks may be surrounded by a colored rectangular border. For example, external URLs commonly receive a cyan border.

These borders are PDF hyperlink annotations rather than table borders.

They may be disabled while preserving hyperlink functionality with

\hypersetup{
pdfborder={0 0 0}
}

The corresponding HTML output is styled independently by the web browser and Physics Library CSS.

Test 17: Single Colored Table Cell

This test introduces the colortbl package and applies a background color to individual table cells.

This is intentionally a minimal test because table background coloring changes the internal processing of the tabular environment.



Status Result


Normal cell No background


Colored cell Yellow background


Another colored cell Green background



"test table formatting" is owned by bloftin.
(view preamble)
View style:

Cross-references: CSS, pdf, operation, work, wave, type, system, position, energy, force, acceleration, velocity, ALICE

This is version 9 of test table formatting, born on 2025-06-03, modified 2026-09-06.
Object id is 1017, canonical name is TestTableFormatting.
Accessed 2012 times total.

Classification:
Physics Classification: 00. (GENERAL)
Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:

No messages.

Interact
rate | post | correct | update request | add derivation | add example | add (any)