<?xml version="1.0" encoding="UTF-8"?>

<record version="3" id="1017">
 <title>test table formatting</title>
 <name>TestTableFormatting</name>
 <created>2025-06-03 05:24:11</created>
 <modified>2026-09-06 16:46:39</modified>
 <type>Definition</type>
 <creator id="1" name="bloftin"/>
 <modifier id="1" name="bloftin"/>
 <comment>test render fail</comment>
 <author id="1" name="bloftin"/>
 <classification>
	<category scheme="pacs" code="00."/>
 </classification>
 <preamble>% this is the default PhysicsLibrary preamble.  as your knowledge
% of TeX increases, you will probably want to edit this, but
% it should be fine as is for beginners.

% almost certainly you want these
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}

% used for TeXing text within eps files
%\usepackage{psfrag}
% need this for including graphics (\includegraphics)
%\usepackage{graphicx}
% for neatly defining theorems and propositions
%\usepackage{amsthm}
% making logically defined graphics
%\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here</preamble>
 <content>% ============================================================
% PhysicsLibrary Table Rendering Test Suite
% Object: TestTableFormatting
%
% PREAMBLE ADDITIONS FOR THIS VERSION:
%
% \usepackage{array}
% \usepackage[table]{xcolor}
% \usepackage{hyperref}
%
% Optional hyperlink styling:
%
% \hypersetup{
%   colorlinks=true,
%   linkcolor=blue,
%   urlcolor=blue
% }
%
% The examples below deliberately increase in complexity.
% If rendering breaks, the first failing example should help
% identify which LaTeX feature is responsible.
% ============================================================

\section*{LaTeX Table Rendering Examples}

This entry is both a collection of useful LaTeX table examples and a
rendering test suite for the Physics Library publication pipeline.

The examples are intentionally arranged from simple to more complicated.
Each example introduces only a small number of new features so that
rendering problems can be isolated more easily.

\subsection*{Rendering Test Ladder}

\begin{center}
\begin{tabular}{|c|l|l|}
\hline
\textbf{Level} &amp; \textbf{Feature} &amp; \textbf{Primary Test} \
\hline
1 &amp; Basic table &amp; column alignment \
\hline
2 &amp; Grid lines &amp; vertical and horizontal rules \
\hline
3 &amp; Mathematical content &amp; inline mathematics in cells \
\hline
4 &amp; Paragraph columns &amp; automatic text wrapping \
\hline
5 &amp; Merged columns &amp; \texttt{multicolumn} \
\hline
6 &amp; Spacing &amp; row height and column padding \
\hline
7 &amp; Text color &amp; \texttt{xcolor} support \
\hline
8 &amp; Cell and row color &amp; colored table backgrounds \
\hline
9 &amp; Alternating rows &amp; automatic row coloring \
\hline
10 &amp; Hyperlinks &amp; links inside table cells \
\hline
11 &amp; Combined example &amp; multiple features together \
\hline
\end{tabular}
\end{center}

\subsection*{1. Basic Column Alignment}

The simplest useful table contains no rules at all.  The column
specification

$$
\texttt{\{lcr\}}
$$

means left aligned, centered, and right aligned.

\begin{center}
\begin{tabular}{lcr}
Left &amp; Center &amp; Right \
Apple &amp; 12 &amp; $1.25 \
Orange &amp; 7 &amp; $2.50 \
Banana &amp; 103 &amp; $0.75
\end{tabular}
\end{center}

This example tests only the basic \texttt{tabular} environment and
column alignment.

\subsection*{2. Full Grid Table}

Vertical bars in the column specification produce vertical rules, while
\texttt{\textbackslash hline} produces horizontal rules.

\begin{center}
\begin{tabular}{|c|c|c|}
\hline
\textbf{ID} &amp; \textbf{Name} &amp; \textbf{Score} \
\hline
1 &amp; Alice &amp; 85 \
\hline
2 &amp; Bob &amp; 92 \
\hline
3 &amp; Carol &amp; 78 \
\hline
\end{tabular}
\end{center}

This is intentionally similar to the original Physics Library rendering
test and serves as a known-good baseline.

\subsection*{3. Horizontal Rules Without Vertical Rules}

Many technical and scientific tables are easier to read without a full
grid.

\begin{center}
\begin{tabular}{lcr}
\hline
\textbf{City} &amp; \textbf{Population} &amp; \textbf{Area (km$^2$)} \
\hline
New York &amp; 8,336,817 &amp; 783.8 \
Los Angeles &amp; 3,979,576 &amp; 1,302.2 \
Chicago &amp; 2,693,976 &amp; 606.1 \
\hline
\end{tabular}
\end{center}

This tests ordinary rules while avoiding any additional table packages.

\subsection*{4. Mathematics Inside Table Cells}

Tables used in Physics Library articles frequently contain mathematical
notation.  Mathematics can be placed directly inside individual cells.

\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\textbf{Quantity} &amp; \textbf{Equation} &amp; \textbf{SI Unit} \
\hline
Velocity &amp; $v=\dfrac{dx}{dt}$ &amp; $\mathrm{m,s^{-1}}$ \
\hline
Acceleration &amp; $a=\dfrac{d^2x}{dt^2}$ &amp; $\mathrm{m,s^{-2}}$ \
\hline
Force &amp; $F=ma$ &amp; $\mathrm{N}$ \
\hline
Energy &amp; $E=\dfrac{1}{2}mv^2$ &amp; $\mathrm{J}$ \
\hline
Momentum &amp; $p=mv$ &amp; $\mathrm{kg,m,s^{-1}}$ \
\hline
\end{tabular}
\end{center}

This table tests inline mathematics, fractions, superscripts, subscripts,
roman mathematical text, and spacing commands inside table cells.

\subsection*{5. Fixed-Width Paragraph Columns}

The \texttt{p{}} column type allows text to wrap automatically.

\begin{center}
\begin{tabular}{|l|p{8cm}|}
\hline
\textbf{Feature} &amp; \textbf{Description} \
\hline
Tabular &amp;
The standard LaTeX environment for arranging information into rows and
columns. \
\hline
Paragraph column &amp;
A column declared with \texttt{p{width}} automatically wraps long text
rather than allowing the table to grow indefinitely in the horizontal
direction. \
\hline
Scientific use &amp;
Paragraph columns are useful when a table contains equations,
definitions, experimental notes, or explanatory text. \
\hline
\end{tabular}
\end{center}

This is an important HTML-rendering test because fixed-width LaTeX
columns may be represented differently by PDF and HTML renderers.

\subsection*{6. Merged Column Headings}

The standard \texttt{multicolumn} command can create headings that span
several columns.

\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\multicolumn{3}{|c|}{\textbf{Student Grades}} \
\hline
\textbf{Student} &amp; \textbf{Physics} &amp; \textbf{Mathematics} \
\hline
David &amp; A &amp; A- \
\hline
Emma &amp; B+ &amp; A \
\hline
Maria &amp; A- &amp; B+ \
\hline
\end{tabular}
\end{center}

A second example demonstrates several grouped headings.

\begin{center}
\begin{tabular}{|l|cc|cc|}
\hline
&amp;
\multicolumn{2}{c|}{\textbf{Position}} &amp;
\multicolumn{2}{c|}{\textbf{Velocity}} \
\hline
\textbf{Time} &amp;
$x$ &amp; $y$ &amp;
$v_x$ &amp; $v_y$ \
\hline
0 s &amp; 0 &amp; 0 &amp; 10 &amp; 20 \
1 s &amp; 10 &amp; 15.1 &amp; 10 &amp; 10.2 \
2 s &amp; 20 &amp; 20.4 &amp; 10 &amp; 0.4 \
\hline
\end{tabular}
\end{center}

\subsection*{7. Controlling Table Spacing}

LaTeX allows row height and horizontal cell padding to be adjusted.

The following changes are enclosed in braces so that they affect only
this table.

\begin{center}
{
\renewcommand{\arraystretch}{1.6}
\setlength{\tabcolsep}{12pt}

\begin{tabular}{|c|c|c|}
\hline
\textbf{Parameter} &amp; \textbf{Symbol} &amp; \textbf{Value} \
\hline
Mass &amp; $m$ &amp; $2.5\ \mathrm{kg}$ \
\hline
Velocity &amp; $v$ &amp; $12.0\ \mathrm{m/s}$ \
\hline
Acceleration &amp; $a$ &amp; $9.81\ \mathrm{m/s^2}$ \
\hline
\end{tabular}
}
\end{center}

This example checks whether spacing changes survive the conversion to
the web representation.

\subsection*{8. Colored Text}

The following examples require the \texttt{xcolor} package.

\begin{center}
\begin{tabular}{|l|c|l|}
\hline
\textbf{Status} &amp; \textbf{Value} &amp; \textbf{Meaning} \
\hline
\textcolor{green!50!black}{Nominal} &amp; 1.00 &amp; Normal operation \
\hline
\textcolor{orange!90!black}{Warning} &amp; 1.25 &amp; Check system \
\hline
\textcolor{red}{Critical} &amp; 1.75 &amp; Immediate attention \
\hline
\textcolor{blue}{Information} &amp; 0.50 &amp; Informational state \
\hline
\end{tabular}
\end{center}

This isolates text color from background color.

\subsection*{9. Colored Cells and Rows}

Background colors can be applied to complete rows or individual cells.

\begin{center}
\begin{tabular}{|l|c|c|}
\hline
\rowcolor{blue!20}
\textbf{Sensor} &amp; \textbf{Value} &amp; \textbf{Status} \
\hline
GPS &amp; 12 &amp; \cellcolor{green!25}Good \
\hline
IMU &amp; 5 &amp; \cellcolor{yellow!35}Check \
\hline
Barometer &amp; 0 &amp; \cellcolor{red!25}Offline \
\hline
\end{tabular}
\end{center}

This example deliberately tests both \texttt{rowcolor} and
\texttt{cellcolor}.

\subsection*{10. Alternating Row Colors}

Alternating colors can improve readability in longer tables.

\begin{center}
{
\rowcolors{2}{gray!15}{white}

\begin{tabular}{|c|l|c|}
\hline
\rowcolor{blue!25}
\textbf{Run} &amp; \textbf{Test} &amp; \textbf{Result} \
\hline
1 &amp; Basic rendering &amp; Pass \
2 &amp; Mathematics &amp; Pass \
3 &amp; Column wrapping &amp; Pass \
4 &amp; Color rendering &amp; Pass \
5 &amp; Hyperlinks &amp; Pending \
6 &amp; Combined test &amp; Pending \
\hline
\end{tabular}
}
\end{center}

This provides a useful test of whether alternating row styles are
preserved by the HTML conversion pipeline.

\subsection*{11. Hyperlinks Inside Table Cells}

The \texttt{hyperref} package allows ordinary web links to be embedded
inside table cells.

\begin{center}
\begin{tabular}{|l|l|}
\hline
\textbf{Resource} &amp; \textbf{Link} \
\hline
Physics Library &amp;
\href{https://physicslibrary.org/}{PhysicsLibrary.org} \
\hline
Physics Library Encyclopedia &amp;
\href{https://physicslibrary.org/encyclopedia/}{Encyclopedia} \
\hline
LaTeX Project &amp;
\href{https://www.latex-project.org/}{LaTeX Project} \
\hline
\end{tabular}
\end{center}

A raw URL can also be tested:

\begin{center}
\begin{tabular}{|l|p{9cm}|}
\hline
\textbf{Type} &amp; \textbf{Example} \
\hline
Clickable text &amp;
\href{https://physicslibrary.org/}{Visit Physics Library} \
\hline
Displayed URL &amp;
\url{https://physicslibrary.org/} \
\hline
\end{tabular}
\end{center}

This example tests whether links remain active and correctly styled in
the generated HTML output.

\subsection*{12. Local References to Tables}

A table can also be placed inside the floating \texttt{table}
environment and assigned a label.

\begin{table}[h]
\centering
\begin{tabular}{|l|c|}
\hline
\textbf{Planet} &amp; \textbf{Surface Gravity (m/s$^2$)} \
\hline
Mercury &amp; 3.70 \
Venus &amp; 8.87 \
Earth &amp; 9.81 \
Mars &amp; 3.71 \
\hline
\end{tabular}
\caption{Example planetary surface gravity values.}
\label{tab:planet-gravity}
\end{table}

Table~\ref{tab:planet-gravity} tests the combination of a table,
caption, label, and internal cross-reference.

The precise placement of a floating table may differ between PDF and
HTML output.  That difference is acceptable as long as the table,
caption, and reference remain logically connected.

\subsection*{13. Combined Renderer Stress Test}

The final table combines many of the features introduced above.

\begin{center}
{
\renewcommand{\arraystretch}{1.4}

\begin{tabular}{|l|c|c|p{5cm}|}
\hline
\rowcolor{blue!25}
\multicolumn{4}{|c|}{\textbf{Physics Library Rendering Status}} \
\hline
\rowcolor{gray!20}
\textbf{Feature} &amp;
\textbf{Math} &amp;
\textbf{Status} &amp;
\textbf{Notes} \
\hline

Basic table &amp;
$F=ma$ &amp;
\cellcolor{green!25}\textcolor{green!40!black}{Pass} &amp;
Standard rows and columns. \
\hline

Math rendering &amp;
$\displaystyle E=\frac{1}{2}mv^2$ &amp;
\cellcolor{green!25}\textcolor{green!40!black}{Pass} &amp;
Fractions, superscripts, and mathematical symbols. \
\hline

Background color &amp;
$\lambda=\dfrac{c}{f}$ &amp;
\cellcolor{yellow!30}Test &amp;
Tests colored cells and row backgrounds. \
\hline

Hyperlink &amp;
$k=\dfrac{2\pi}{\lambda}$ &amp;
\cellcolor{yellow!30}Test &amp;
\href{https://physicslibrary.org/}{Open Physics Library}. \
\hline

Wrapped text &amp;
$\Delta\phi=k\Delta r$ &amp;
\cellcolor{yellow!30}Test &amp;
This intentionally contains a longer explanation so that the renderer
must wrap text inside a fixed-width paragraph column. \
\hline

\end{tabular}
}
\end{center}

\section*{Renderer Interpretation}

When this page is used for pipeline testing, the preferred debugging
procedure is to work downward through the examples.

If Examples 1--7 render correctly but Example 8 fails, investigate
\texttt{xcolor} support.

If text colors work but Example 9 fails, investigate table-specific
color handling such as \texttt{rowcolor} or \texttt{cellcolor}.

If color examples work but Example 11 fails, investigate
\texttt{hyperref} and HTML-link conversion.

If all isolated examples work but Example 13 fails, investigate
interactions between packages or generated CSS rather than the
individual LaTeX commands.

\section*{Future Rendering Tests}

The next revisions of this entry can progressively add tests for:

\begin{itemize}
\item \texttt{booktabs}: \texttt{toprule}, \texttt{midrule}, and
\texttt{bottomrule};
\item \texttt{multirow}: vertically merged cells;
\item \texttt{tabularx}: automatic-width columns;
\item \texttt{longtable}: tables that span multiple pages;
\item nested tables;
\item tables inside lists;
\item tables inside theorem environments;
\item footnotes inside tables;
\item very long equations inside cells;
\item Unicode characters;
\item colored hyperlinks;
\item links inside colored cells;
\item custom RGB and HTML colors;
\item mathematical arrays and matrices embedded inside cells;
\item rotated text;
\item scientific notation and significant figures;
\item images inside table cells;
\item captions containing mathematics;
\item labels and cross-references;
\item tables wider than the normal text area;
\item intentionally malformed or extreme cases for graceful-failure
testing.
\end{itemize}

The objective is not merely to demonstrate attractive tables.  The entry
should serve as a reproducible compatibility suite showing exactly which
LaTeX table features are supported by the Physics Library rendering
pipeline.</content>
</record>
