Fonts & Character Sets ⇒ Using "txfonts" without changing the default math font
Using "txfonts" without changing the default math font
I've been a LaTeX user all of my graduate life, which is going on six years now. I'm a fierce evangelist for using it in the humanities disciplines.
I like the look of the Computer Modern default font in both the regular text and in the math environments. Recently, I've been needing to use "txfonts" since it has two commands I'm frequently using (viz., "\strictif" and "\boxright"). I've noticed that when I include the "txfonts" in the preamble, it changes the document's font to Times. I know how to change the main part of the document back to CM from Times, but I cannot quite seem to do it in the math environments.
The reason why I want to change it from Times to CM is purely aesthetic. For example, using the "txfonts" package makes the existential (i.e., "\exists") and universal (i.e., "\forall") quantifiers a touch darker than when I omit the package.
Any suggestions about either (i) how to use "\strictif" and "\boxright" without "txfonts" or (ii) how to use "txfonts" without having Times as the font in the math environment.
Oh, and my skills level is probably beyond basic, but I'm not writing any fun packages in my spare time.
Any suggestions would be helpful.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Using "txfonts" without changing the default math font
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{txfonts}
\usepackage{lmodern}
\usepackage{blindtext}
\begin{document}
\blindtext
\[
\strictif\quad\boxright
\]
\blindtext
\end{document}Best regards
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Using "txfonts" without changing the default math font
I'll quote the relevant part:
I've done this, and it works ..though Thorsten's suggestion seems even simpler!... "strictif" for the fish-hook sign for strict implication, and "boxright" for Lewis's symbol for the counterfactual. These symbols are part of the txfonts and pxfonts packages, which are intended for use with the Times Roman and Palatino fonts, respectively. But (thanks to Richard Zach for this), you can access them e.g. while still using Computer Modern by having the txfont package available and putting this in the preamble:
- \DeclareSymbolFont{symbolsC}{U}{txsyc}{m}{n}
- \DeclareMathSymbol{\strictif}{\mathrel}{symbolsC}{74}
- \DeclareMathSymbol{\boxright}{\mathrel}{symbolsC}{128}