Fonts & Character Sets ⇒ top half of an integral sign
top half of an integral sign
The relevant lines are ...
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\usepackage{textcomp}
\DeclareUnicodeCharacter{"2320}{\integraltp}
\DeclareUnicodeCharacter{"2321}{\integralbt}
and then later
148 & 94 & \"{o} & 180 & B4 & \textSFix & 212 & D4 & \textSFl & 244 & F4 & \integraltp \\
where I try to use the character (and get the error message).
I'm new to Latex and clearly there's something I don't understand going on here - if anyone would like to chip in with a suggestion as to how I might sort this out, that would be great.
cheers
-manwyddan
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
top half of an integral sign
Code: Select all
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\clip (0,0) rectangle (1,1);
\draw (0,0) node {\Huge$\int$};
\end{tikzpicture}
\end{document}
An alternative, however, would be to switch to XeLaTeX and use a Unicode math font with the fontspec/unicode-math packages. That actually would be fairly easy.
Code: Select all
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\newcommand{\integraltp}{{\fontspec{XITS Math}\char"2320}}
\newcommand{\integralbt}{{\fontspec{XITS Math}\char"2321}}
\begin{document}
\integraltp
\integralbt
\end{document}
Code: Select all
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{unicode-math}
\defaultfontfeatures{Mapping=tex-text}
\setmathfont{XITS Math}
\begin{document}
$\inttop$
$\intbottom$
\end{document}
Re: top half of an integral sign
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
top half of an integral sign
Then please mark the topic accordingly as written in Section 3 of the Board Rules (to be read before posting).manwyddan wrote:[…] I'm using tikz for a number of figures in the book so it works well.
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10