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
Manual Linking Controls and LaTeX Examples

Manual Linking Controls and LaTeX Examples


1 Manual Linking Controls and LaTeX Examples

PhysicsLibrary automatically links encyclopedia terms when it can resolve them unambiguously. Manual linking controls let authors guide that process when the automatic linker needs help, when a phrase should not be linked, or when a link should point to a specific object, file, or external source.

This document is both a short user manual and a reference page of examples. It is intended for authors writing encyclopedia entries, collaboration documents, and site documentation.

2 Automatic links

When an article mentions a known concept such as vector, matrix, quaternion, or Euler angle, PhysicsLibrary may automatically link that phrase to an encyclopedia entry.

For example, this sentence intentionally mentions a vector, a matrix, and a quaternion.

Automatic links are useful, but authors sometimes need more control. The manual commands below are used for that.

3 Link to an encyclopedia entry by canonical name

Use \PMlinkname when the visible link text should differ from the target entry name.

\href{https://physicslibrary.org/encyclopedia/DirectionCosineMatrix.html}{direction cosine matrix}
\href{https://physicslibrary.org/encyclopedia/Quaternion.html}{quaternion representation}
\href{https://physicslibrary.org/encyclopedia/Euler321Sequence.html}{Euler 3-2-1 sequence}

Rendered example:

The attitude can be represented by a direction cosine matrix, a quaternion, or an Euler 3-2-1 sequence.

This is useful when the text should read naturally but the target object has a different canonical name.

4 Link to an encyclopedia entry by object id

Use \PMlinkid when the target object id is known and should be used directly.

\href{https://physicslibrary.org/encyclopedia/108.html}{this specific object}

Rendered example:

Here is a direct id-based link to object 108.

Name-based links are usually easier to read and maintain. Id-based links are useful when several entries have similar names or when an object has been renamed.

5 Link to an external page

Use \PMlinkexternal for external references.

\href{https://arxiv.org/}{arXiv}
\href{https://ntrs.nasa.gov/}{NASA Technical Reports Server}
\href{https://archive.org/}{Internet Archive scan}

Rendered example:

Useful external physics and mathematics resources include arXiv, NASA Technical Reports Server, and Internet Archive.

The first argument is the visible link text. The second argument is the URL.

6 Link to an attached file

Use \PMlinktofile when an entry or collaboration document has an uploaded file in its filebox.

\href{https://aux.physicslibrary.org/files/collab/21/figure.tex}{download the source figure}
\href{https://aux.physicslibrary.org/files/collab/21/figure.png}{view the rendered image}
\href{https://aux.physicslibrary.org/files/collab/21/notes.pdf}{download the supporting note}

Example sentence:

The source for this figure can be attached as figure.tex and linked with \href{https://aux.physicslibrary.org/files/collab/21/figure.tex}{source}.

File links depend on the file actually being uploaded to the object filebox.

7 Prevent automatic linking for one word or phrase

Use \PMlinkescapeword or \PMlinkescapephrase when an automatic link would be distracting or wrong.



After declaring the escape, the word or phrase can be used in ordinary prose without being automatically linked.

For example, in an article about planetary motion, the word ring might refer to a physical ring rather than the algebraic structure.

Saturn’s ring system is not the same topic as a mathematical ring.

Use phrase escaping when the complete phrase should be protected:

The phrase normal form can have different meanings in different subjects.

8 Escape a block of text

Use \PMlinkescapetext when a longer phrase, quotation, or example should not be cross-linked.

This entire block is left alone by the automatic linker.

Rendered example:

This sentence mentions vector and matrix, but it should not be automatically cross-linked.

This is useful in code examples, historical quotations, or passages where the author wants exact text without automatic links.

9 Manual links with mathematics nearby

Manual link commands work best when the visible text is ordinary text. If a mathematical symbol needs to appear next to the linked word, put the math outside the manual link command.

Prefer this style:

$\sigma$-derivation

Instead of putting the entire math expression inside the link command.

Rendered example:

A σ-derivation is a derivation twisted by an endomorphism.

10 Related metadata

The encyclopedia edit form also has metadata fields that affect navigation and discovery.

10.1 Synonyms

Synonyms are alternate names for the same object.

Examples:

yaw pitch roll
Tait Bryan angles
Euler 321 angles

10.2 Defines

Defines should list concepts that the article introduces or formally defines.

Examples:

passive coordinate transformation
\href{https://physicslibrary.org/encyclopedia/DirectionCosineMatrix.html}{direction cosine matrix} unit quaternion

10.3 Related

Related entries are nearby topics that readers may want next.

Examples:

Quaternion
DirectionCosineMatrix
EulerAngles

Related entries should usually use canonical object names.

11 LaTeX examples for authors

PhysicsLibrary supports ordinary LaTeX mathematics. The default HTML renderer is make4ht, which supports a broader modern LaTeX subset than legacy latex2html.

11.1 Inline and display math

Inline math:

The vector $v$ has \href{https://physicslibrary.org/encyclopedia/NormInducedByInnerProduct.html}{norm} $\|v\|$.

Rendered:

The vector v has norm ∥v∥.

Display math:

\[
\|v\| = \sqrt{v_1^2 + v_2^2 + v_3^2}.
\]

Rendered:

     ∘ -2---2---2- ∥v∥ =  v1 + v2 + v3.

11.2 Numbered equations

\begin{equation}
E = mc^2.
\end{equation}

Rendered:

      2 E = mc .
(1)

11.3 Custom equation tags

\[
a=b
\tag{T1}
\]

\begin{equation}
c=d
\tag{T2}
\end{equation}

Rendered:

a = b                           (T1 )
c = d
(T2)

Note: make4ht handles these tags. Legacy HTML with images may not preserve every AMS tag form.

11.4 Aligned equations

\begin{align}
F &= ma, \\
p &= mv, \\
E &= \frac{1}{2}mv^2.
\end{align}

Rendered:

F = ma, (2)
p = mv, (3)
E = 1 2mv2. (4)

11.5 Cases

f(x)=
\begin{cases}
x^2, & x \ge 0,\\
-x, & x < 0.
\end{cases}

Rendered:

      { 2 f(x ) = x ,  x ≥ 0,        − x, x < 0.

11.6 Matrices

R_z(\psi)=
\begin{pmatrix}
\cos\psi & -\sin\psi & 0\\
\sin\psi & \cos\psi & 0\\
0 & 0 & 1
\end{pmatrix}.

Rendered:

        ( cos ψ  − sinψ  0) R  (ψ ) = ( sinψ   cosψ   0) .   z        0      0    1

11.7 AMS extensible arrows

A_0 \xrightarrow[\text{Axis } i]{\alpha} A_1

Rendered:

     α A0 −−A−xi−→s i A1

11.8 A small theorem-style example

proposition. If q is a unit quaternion, then q−1 = q.

Proof. For a quaternion q, the norm satisfies

q¯q = ∥q∥2.

If ∥q∥ = 1, then qq = 1, so q is the inverse of q.

12 Practical advice

Use automatic linking for ordinary prose. Use manual links when the target must be exact. Use escape commands when the automatic linker chooses an unwanted term.

For new HTML output, prefer the default HTML renderer. Use legacy HTML with images only when comparing historical output or diagnosing old rendering issues.

View style:

The owner of this object is bloftin. See also the author list (1) .

This is version 2 of "Manual Linking Controls and LaTeX Examples".
Created on 2026-09-01 03:29:29 , last modified on 2026-09-01 04:04:18 .
Accessed 40 times total.

Discussion
Style: Expand: Order:

No messages.

Interact
post