21

With detexify, I can draw a symbol and find code to reproduce it in LaTeX.

Suppose that I already have the symbol . I could mimic its shape by drawing it by hand into detexify, and if I draw it well it would probably find what I'm looking for. But it's a bit of a roundabout way. Is there a service like detexify that looks for LaTeX code to recreate symbols, not based on a drawing but based on the actual unicode character?

David Carlisle
  • 757,742
gerrit
  • 5,165
  • 1
    if you know the unicode, i think there are other ways of finding out how to access it with latex. (don't have details; have to explore, but that's the direction to take.) – barbara beeton Dec 10 '15 at 17:17
  • 1
    Don't forget that you can copy-and-paste directly that character in your .tex document if you use XeTex or LuaTex, cf. http://tex.stackexchange.com/q/34604/34551 To answer your question, you can also rely on off-line service as a good old pdf cheatsheet. – Clément Dec 10 '15 at 19:26
  • Detexify apparently mines cryptocurrency, just FYI: http://tug.org/mail-archives/texhax/2011-June/017593.html – hola Jul 21 '20 at 17:21

5 Answers5

34

https://w3c.github.io/xml-entities/unicode-names.html

has the Unicode name of all the characters in Unicode 8, and I just extended it to give the entity names as used in HTML (and MathML and ISO entity sets) and also TeX names where known. The TeX names include the (matching) names used by the stix package (making the stix fonts available to classic tex) and the unicode-math package (for xetex/luatex).

For the characters mentioned so far in the comments on this page, it produces

enter image description here

David Carlisle
  • 757,742
14

i've been working since the mid-1990s on the stix project, whose goal was to add math and technical symbols to unicode. (several thousand added, largely effective with unicode 4.0, and still growing very slowly.)

a chronology of this project, with data tables showing unicodes and (tex) command names, can be found at http://www.ams.org/STIX/ ; it is not up to date, problems having arisen, mainly with respect to the pua (unicode private use area), and agreed upon but not implemented changes to names associated with some of the math alphanumerics. however, i believe the names in the table were used in implementation of the xits font, and they will certainly be used for the stix fonts.

obviously, as new symbols keep being devised, not every symbol has a unicode. however, the unicode technical committee is amenable to additions, provided a request can be documented by evidence in an article or book from a "recognized" publisher; such evidence would best include an example in context, preferably with the context indicating meaning and intended usage.

as it pertains to this question, the table described here is in unicode order. there is a lot of extra "baggage" in the table, but it should be possible to recognize a unicode and the associated command name without difficulty. (if any errors are spotted, please send word to the address shown in my profile.)

i know of a couple other resources, developed with reference to mathml, but i don't have the links conveniently to hand. i will update this when i find thm.

12

I have a webpage where you can do this, but it current only has 1985 Unicode characters mapped. (Some of them have more than one mapping where there are multiple ways of achieving the command, so there are actually currently 3041 mappings in the database.) I add more whenever I get the time (which isn't very often).

You can paste the Unicode character into the box labelled "UTF-8 Character" like this:

image of web page

Alternatively you can enter the hexadecimal code in the box labelled "Hex Code". You can also search over all in a particular block or LaTeX package or by matching the LaTeX command name or by matching the Unicode description.

In the case of the forall symbol, it only has one match:

codepoint 00200 Unicode Symbol ∀ LaTeX Command \forall Packages none mode math Description for all Block mathematical operators

Some of the characters have more than one match. For example, the complement character ∁ has five matches:

image of result with five rows

So there's a choice of packages in case you have any preference.

Not all Unicode characters have corresponding LaTeX commands, so some of the matches simply fake the symbol, with varying degrees of success, such as the care of "care of" symbol ℅:

image of results table with two rows

The second match doesn't produce a particular good result (which can be seen in the corresponding sample image) but it's simpler to produce than the first match.

Nicola Talbot
  • 41,153
3

I just found this webpage. May you try it, I found some examples I tried with the help of this site.

SeRe
  • 566
  • That solution implies that you have the unicode code of the symbol. You can retrieve such information from http://www.fileformat.info/info/unicode/char/search.htm , but there must be something more handy somewhere. – Clément Dec 10 '15 at 17:31
  • It doesn't seem to work terribly well: for example, is U+27E8 MATHEMATICAL LEFT ANGLE BRACKET, but the Unicode-Latex converter does not find it as either < or \langle. – gerrit Dec 10 '15 at 17:41
  • while this did return plausible latex commands for the several unicode values i submitted, all the command names differed from those used for the stix (and presumably xits) fonts. see separate answer. – barbara beeton Dec 10 '15 at 17:45
2

I've just added this functionality to the text search of write-math.com.

See for (link):

enter image description here

Martin Thoma
  • 18,799