Math & ScienceHow to use utf8 characters in math mode ?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to use utf8 characters in math mode ?

Post by Cham »

I'm trying to add some special characters as funky symbols in math mode. I'm using PDFLaTeX with the following commands in my preamble :

Code: Select all

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
Is there a way to use utf8 characters ? currently, it's not working.

Recommended reading 2024:

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

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to use utf8 characters in math mode ?

Post by Johannes_B »

You know that minimal examples are important, i know you know it.

Yes, it is possible. But maybe the definition for this symbol is missing, or it is missing from the font or ...

Please, give us some more information.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

How to use utf8 characters in math mode ?

Post by Cham »

Actually, I'm trying to use any kind of "funky" symbols for a physics exam. I don't have any specific symbol to use right now, and was looking for some kind of dingbats, from OS X (in utf8).

the pifont package works great, but that's not the kind of "funky" symbols I would like to use. I was looking for something like "anger" smilies or something like that.

This is just for the exam header (things that the students should do properly, or else they'll lose some points).

EDIT : Yes, I know that you know that I know that I should use a MWE ( ;) ), but I think it's a bit premature yet.
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Re: How to use utf8 characters in math mode ?

Post by Cham »

I'm looking for something like what is shown on the first picture of that page :

http://francisfery.canalblog.com/archiv ... 27214.html
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to use utf8 characters in math mode ?

Post by Johannes_B »

You started with it's not working, so you have tried something. We could have started there.
You did mention smileys, you can look at Smileys in LaTeX for some hints.

Picking out some symbols into a test document and checking randomly if i get errors ... on a sunday, i have better stuff to do ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

How to use utf8 characters in math mode ?

Post by cgnieder »

Cham wrote:

Code: Select all

\usepackage[utf8]{inputenc}
[...]
Is there a way to use utf8 characters ? currently, it's not working.
Yes and you're using the right package for the purpose already. But inputenc only defines a small subset of all the unicode characters. When you say it's not working that's a very vague statement. In order to help we need to know which character it is you're trying to insert. (That is, a Infominimal working example including the character in question would be ideal to have a starting point for help)

(Of course Johannes said all that already…)
site moderator & package author
Post Reply