Hi All,
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.
Fonts & Character Sets ⇒ Using "txfonts" without changing the default math font
NEW: TikZ book now 40% off at Amazon.com for a short time.
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Using "txfonts" without changing the default math font
You could use a trick. Load at first the txfonts package to define the symbols you need. Afterwards load the lmodern package to enable the Latin Modern fonts for the bread-and-butter type.
This leaves you with the familiar type face but simultaneously lets you use the other symbols.
Best regards
Thorsten
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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Using "txfonts" without changing the default math font
Actually, there's an entry in the LaTeX for logicians page on just this problem.
I'll quote the relevant part:
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}