7

I would like to reproduce the following symbol:

A curvy L

The fonts embedded according to my pdf readerWrite Math

But that is related to the OCR technique and does probably not reflect the font actually used.

What the font suggestion 1 What the font suggestions 2

Does someone have an idea? Do I miss something?

EDIT: in context, The symbol in context

EDIT 2: when I copy / paste that symbol from my pdf viewer, it yields a 2, could that be a 2? It really looks like an L!

That also is probably related to some error of the OCR.

  • 1
    Looks similar (but not exact, I don't think) to MTPro2. – Paul Gessler Jun 26 '14 at 15:53
  • What does the symbol mean - what is it used for? – Sverre Jun 26 '14 at 15:57
  • I edited the question to give a "context". That is the interesting part: it is used by Cook to describe "Cobham's class", something better known nowadays to be the class of functions solvable in polynomial time, i.e. P! – Clément Jun 26 '14 at 15:59
  • 2
    on a side note, the documentation to package mathalfa has a nice list of fonts; your symbol looks like the L's in Mathtime Pro 2 script (as @PaulGessler mentioned) or Mathpi. – phfaist Jun 26 '14 at 16:11
  • @phfaist : thanks for pointing out that (magnificent) resource! – Clément Jun 26 '14 at 17:27
5

The glyph in question appears to be very similar to the uppercase L provided in the "curly" math font of the MathTime Professional 2 complete font set (commercial fonts).

enter image description here

It can be used in three ways:

Method 1: change all math fonts to MTPro2

\documentclass{article}
\usepackage[mtpccal]{mtpro2}

\begin{document}
A set of strings is in the class $\mathcal{L}_{*}$ if and only if 
$A$ is \dots within time $P(n)$, for some polynomial $P(n)$.
\end{document}

The package option mtpccal assigns the "curly" script variant to \mathcal. Depending on the font selections in your document, the other MTPro2 fonts may or may not be good matches with the body text (for example, it is a bad match with Computer Modern, as shown here). This also prevents use of the "standard" calligraphic fonts, if needed.

enter image description here

Method 2: declare an additional symbol font (preserves existing settings for all other math)

\documentclass{article}
\DeclareSymbolFont{curly}{U}{mt2ms}{m}{n}
\DeclareSymbolFontAlphabet{\mathcurly}{curly}

\begin{document}
A set of strings is in the class $\mathcurly{L}_{*}$ if and only if 
$A$ is \dots within time $P(n)$, for some polynomial $P(n)$.
\end{document}

This is more flexible than Method 1. You can make your own choices about math fonts and use the curly font only as needed. The disadvantage is that another full alphabet is used, which may or may not be an issue depending on the complexity of your document.

enter image description here

Method 3: import this single symbol from MTPro2 only

Using the methodology from Importing a Single Symbol From a Different Font and borrowing the relevant code from mtpro2.sty and umt2ms.fd, this method brings in only the "L" from the MathTime Curly math font. It gives the same output as Method 2, but an additional alphabet is not used.

\documentclass{article}
\DeclareFontFamily{U}{mt2ms}{\skewchar\font42}
\DeclareFontShape{U}{mt2ms}{m}{n}{<-7>mt2mcf<7-9>mt2mcs<9->mt2mct}{}
\DeclareSymbolFont{MTPcurly}{U}{mt2ms}{m}{n}
\DeclareMathSymbol{\cobhamclass}{0}{MTPcurly}{'114}

\begin{document}
A set of strings is in the class $\cobhamclass_{*}$ if and only if 
$A$ is \dots within time $P(n)$, for some polynomial $P(n)$.
\end{document}

enter image description here

  • 1
    This is more complete that what I could dream of. – Clément Jul 7 '14 at 14:51
6

TeX Gyre Pagella Math (derived from Palatino) has a symbol that is close:

% lualatex or xelatex
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}
\begin{document}
\[
  \mathcal{L}
\]
\end{document}

Result

The character is defined in Unicode as U+2112 (SCRIPT CAPITAL L).

Upright version

Indeed the character is slanted. The following example uses LuaLaTeX to apply a "negative" slanting to the left to get the upright symbol:

% lualatex
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{texgyrepagella-math.otf}

\makeatletter
\newcommand*{\upcalL}{%
  {%
    \mathpalette\@upcalL{}%
  }%
}
\newcommand*{\@upcalL}[2]{%
  % #1: math style
  % #2: unused
  \sbox0{$#1\mathcal{L}\m@th$}%
  \hbox{%
    \pdfsave
    \pdfsetmatrix{1 0 -.1667 1}%
    \rlap{%
      $#1\mathcal{L}\m@th$%
    }%
    \pdfrestore
    \kern\wd0 %
  }%
}
\makeatother

\begin{document}
\[
  \mathcal{L} \rightarrow \upcalL_{\upcalL_\upcalL}
\]
\[
  \setlength{\fboxsep}{0pt}
  \setlength{\fboxrule}{0.1pt}
  \fbox{$\mathcal{L}$}
  \;
  \fbox{$\upcalL$}
\]
\end{document}

Result with upright L

  • It looks quite slanted compared to the original one. – Clément Jun 26 '14 at 17:39
  • This is quite clever too, but has two drawback: I do not use lualatex (although this can be a drawback of me), and it does not look alike at all in context, see this image and compare to that one. – Clément Jun 27 '14 at 18:23
3

Here, I build my own, by taking the \pounds from the CM font and overlaying the crossbar with white rules. EDITED to handle different text and math sizes.

\documentclass[12pt]{article}
\usepackage{xcolor,stackengine}
\def\cobham{\ifmmode%
    \mathchoice{\xcobham}{\xcobham}{\scriptsize\xcobham}{\tiny\xcobham}%
  \else%
    \xcobham%
  \fi}
\newcommand\xcobham{%
\stackinset{l}{.315ex}{c}{}{\textcolor{white}{\rule{.3ex}{.15ex}}}{%
\stackinset{r}{.535ex}{c}{}{\textcolor{white}{\rule{.3ex}{.15ex}}}{\pounds}%
}}
\begin{document}
Glyphomology: \cobham $\cobham$ vs. \pounds

Text sizes: \footnotesize\cobham\scriptsize\cobham\tiny\cobham\normalsize 

Math sizes:$\cobham_{{\cobham}_{\cobham}}$
\end{document}

enter image description here

  • This is really clever and quite adaptive. However, depending on the zoom level, I can see the pound bar being "eaten" or a thin line appearing. See this image. – Clément Jun 27 '14 at 18:21
  • @Clément Screen rendering will often produce artifacts that are absent on paper printouts (there are many instances of that noted by questions on this site). And given that this solution involves overlaid glyphs, artifacts on screens would be difficult to avoid completely (though perhaps the horizontal inset distances could be refined). – Steven B. Segletes Jun 27 '14 at 18:32
  • @Clément Here is a definition that renders extremely good at 6400% magnification (though artifacts will appear at lesser mags). What it means is that it should print out nicely on paper: \newcommand\xcobham{\stackinset{c}{-.098ex}{c}{.0ex}{\textcolor{white}{\rule{.3ex}{.17ex}}\rule{.161ex}{.17ex}\textcolor{white}{\rule{.3ex}{.17ex}}}{\pounds}} – Steven B. Segletes Jun 27 '14 at 18:58
  • It still has some drawbacks: this solution is font-sensitive (have a look for instance to that symbol with the mathptmx package), and the obtained symbol (in Computer modern font at least) is much higher that the original one. Compare the original one with the solution you provide. – Clément Jul 3 '14 at 9:20
3

An alternative to Paul Gessler's methods.

Method 4: embed the single character as an eps file

\begin{filecontents*}{fich-l.eps}
gsave newpath
    696 139 moveto
     674 62 627 -16 539 -16 curveto
     487 -16 430 13 369 49 curveto
     336 4 256 -16 209 -16 curveto
     121 -16 64 34 64 87 curveto
     64 146 114 193 196 193 curveto
     236 193 284 171 309 155 curveto
     309 243 236 380 236 493 curveto
     236 601 311 702 444 702 curveto
     541 702 613 631 615 540 curveto
     617 489 598 427 539 378 curveto
     499 412 lineto
     547 455 552 502 552 534 curveto
     552 617 480 646 447 646 curveto
     351 646 323 554 323 496 curveto
     323 376 410 269 392 117 curveto
     440 85 484 45 533 45 curveto
     604 45 626 91 657 155 curveto
     696 139 lineto
    closepath
    301 96 moveto
     272 117 238 139 199 139 curveto
     156 139 114 121 114 84 curveto
     114 51 150 24 199 24 curveto
     245 24 288 45 301 96 curveto
    closepath
fill grestore
\end{filecontents*}

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[height=\fontcharht\font`X]{fich-l.eps}$_*$
\end{document}


For the record:

I extract this symbol from the MathTime Professional II Brochure, thanks to FontForge. The name of this 'Math Curly' font-face is TOZPZL+MT2MCT, and I produced a sfd file containing a part of it.

Then, I used a script found on Typophile : create a file named expglyphs.pe and put in it

%Open($1)
%SelectWorthOutputting()
%Export("eps")

Then, simply call fontforge -lang=ff -script expglyphs.pe <fontfile>

That will produce one eps file per glyph, and you just have to keep the one you're interested in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.