TUGboat 45:1 (2024)
The Communications of the TeX Users Group

Title: Is a given input a valid TeX ⟨dimen⟩?

Summary: plain TeX conditional-like macro to test for a syntactic ⟨dimen⟩.

Full text of article: available to TUG members (join TUG); will be publicly available after the next issue is published.

Author: Udo Wermuth

Publication: TUGboat volume 45, number 1 (2024), pages 109-112

DOI (this page): 10.47397/tb/45-1/tb139wermuth-isdim
(previous doi - next doi)

Category: Macros

Difficulty: Advanced

Abstract: This article discusses the question of how one can determine if a given string of characters represents a valid dimension for TeX. A macro that looks and behaves like a Boolean conditional is implemented to answer the question.

References:

  1. Donald E. Knuth, The TeXbook, Volume A of Computers & Typesetting, Boston, Massachusetts: Addison-Wesley, 1984.
  2. Donald E. Knuth, TeX: The Program, Volume B of Computers & Typesetting, Boston, Massachusetts: Addison-Wesley, 1986.
  3. Udo Wermuth, Is a given input a valid TeX ⟨number⟩?, TUGboat 45:1 (2024), 106–109. tug.org/TUGboat/tb45-1/tb138wermuth-isint.pdf

TUGboat 45:1, 2024 (issue 139)   [generated 2024-05-04]
TUG home page; webmaster; facebook; twitter; mastodon;   (via DuckDuckGo)