Text FormattingHyphentation for T8-1

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
pucutuxa

Hyphentation for T8-1

Post by pucutuxa »

Hi,
I am writing my Bachelorthesis and I have to write T8-1 till T8-4 many times. I want that it is no hyphenation in it.

Code: Select all

\hyphentation{T8-1}
\hyphentation{T8\-1}
\hyphentation{T8"~1}
All of that says "Not a letter!"
How do I change that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Bartman
Posts: 369
Joined: Fri Jan 03, 2020 2:39 pm

Hyphentation for T8-1

Post by Bartman »

The command \hyphenation has only one t and doesn't take numbers.

Code: Select all

\documentclass{article}
\usepackage[ngerman,english]{babel}
\usepackage{parskip}

% Enables the use of ngermans language shorthands 
% in a document with english as the main language.
\useshorthands{"}
\addto\extrasenglish{\languageshorthands{ngerman}}
     
\begin{document}
\hsize=5mm
\mbox{T8-1}\par
T8"~1\par
T8-1
\end{document}
Post Reply