After a lot of searching, I finally found the .pdf's for the elusive Griffiths script r character used in his ubiquitous undergraduate electrodynamics book. I made a simple package that allows me to use the figures as math characters:  \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{scriptr}[2014/06/18 Griffiths' Script r Character] \RequirePackage{graphicx}  \def\rcurs{{\mbox{$\resizebox{.101in}{.08in}{\includegraphics{C:/Program Files/MiKTeX 2.9/tex/latex/scriptr/ScriptR.pdf}}$}}} \def\brcurs{{\mbox{$\resizebox{.104in}{.08in}{\includegraphics{C:/Program Files/MiKTeX 2.9/tex/latex/scriptr/BoldR.pdf}}$}}} \def\hrcurs{{\mbox{$\hat \brcurs$}}}   There are two issues with it that I'd like to fix.   I would like to make it so that the character automatically adjusts its size in the main body of a document depending on the size of the font. For example, in 12pt font it looks like this:  In this case it looks as though it fits in perfectly with the rest of the text. However, in a smaller font size such as 10pt, it looks a little too big compared to its adjacent characters. In fact, it almost looks like capital letter:  A similar problem persists whenever working with the character in math mode. When used with \frac, the character looks fine:  But when used with \tfrac, the character looks far too big compared to what's in the numerator:    What's the best way for me to make it behave more like an actual character in math mode?
93835
I want to use a custom symbol in my document that is treated like any other letter or math symbol by LaTeX. I do not want to  in order to create a new one but rather create one from scratch.  Is there a way to just create the symbol using, say, Inkscape and tell LaTeX to print that when I call a specific macro? There is of course the possibility of using \includegraphics[height=1em], but I imagine that that is not a very effective approach. Can I let LaTeX use my symbol like any other math symbol?  Do I have to  (consisting of only one character) or is it possible to this in a simpler manner?
22578
Browsing through a copy of Counterexamples in Analysis (Gelbaum  &amp; Olmsted), I'm quite enjoying the typeface used for 'script' letters (see links to examples below); visually it's somewhere between what I'd now call calligraphic and fraktur, and semantically it's used where now we'd use mathcal, mathfrak or mathbb.  I was therefore procrastinatiously looking for a LaTeX-usable font to include these characters, but couldn't seem to find any. I'm certain they're not unique to this text or publisher, so figured my lack of success was probably more to do with searching with the wrong keywords. If anyone has any ideas I'd be grateful.
47149
I'm working on my thesis, and I've realized that, any time I try to use \( \)-type inline delimiters in captions, that pdflatex breaks. While I can weasel out of actually \needing\ math in my captions, it's very inconvenient. I'm pretty perplexed.  Here's a (relatively) minimal example that breaks for me:  \documentclass{uafthesis}  \usepackage{amsmath} \usepackage{graphicx} % Graphics stuff  \begin{document}  \listoffigures  \begin{figure}[h] \centering \includegraphics[width=0.3\textwidth]{angle.png} \caption{\(\theta \)} \end{figure}   \end{document}   Here's a sample of the output:     ! LaTeX Error: Bad math environment delimiter.      See the LaTeX manual or LaTeX Companion for explanation.   Type  H   for immediate help.    ...                                                    l.1 ...k or  to continue without it.}}}{2}      ?    ! Extra }, or forgotten $.    ...r  to continue without it.}}      l.1 ...k or  to continue without it.}}}{2}      ?    Some things:   uafthesis is the unofficial official document class for my university. It has been written mostly by physics grad students by hacking at other document classes. My fork is . This only happens if I include amsmath. The minimal example and the resulting log file are gisted .   I'm defending tomorrow, and I have to turn in my thesis pretty soon, so hopefully we can figure this out within a day or so! If not, I understand, and thanks anyway.
36794
Is it possible to tell (La)TeX to adjust the kerning of a specific character combination?  For example, suppose I want !! to be typeset as !\kern 1.2pt!, just like ff is automatically turned into a ligature, or -- is converted to an en-dash.  I know I could create a command for this combination&mdash;I am asking for a way to just type !! and have it use my desired kerning.
72728
% What to do here   \begin{document}   This is good integration.   $$\displaystyle \int x dx = \frac{x^2}{2}$$  \end{document}    I don't know much about LaTeX so I am going to need some spoon feeding.   I want text to appear in normal font. But math to appear in AMSEuler Font.  I don't want to make any changes inside the document.
118876
I wanted to make a command that outputs a number in math mode. This is how my file looks like:  \documentclass{scrartcl}  %\usepackage{epsdice} %\newcommand{dice}[1]{\epsdice{#1}}  \newcommand{dice}[1]{\ensuremath{#1}}  \begin{document} Lorem ipsum... \end{document}   But when I compile this with XeTeX, I always get this error:  ! LaTeX Error: Missing \begin{document}.  See the LaTeX manual or LaTeX Companion for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.13 \newcommand{dice}[1]{\ensuremath{#1}}   I have not that much experience with TeX, I think the solution is quite easy.
21691
In a LaTeX article, the math characters are more "curvy" than the text characters:  \documentclass[12pt]{article} \begin{document}  $x^2 + y^2 = z^2$ \end{document}     In a beamer presentation, the math characters do not have the same curves:  \documentclass{beamer} \begin{document} \begin{frame}  $x^2 + y^2 = z^2$ \end{frame} \end{document}     Question  How can I get the beamer math to look just like the article math?  I would prefer if the solution was a single line (that I could place at the top of my LaTeX file) as opposed to something that needs to appear next to every piece of math.
90613
During a Pages update which was pushed out a few months ago, Pages obtained the ability to write equations using LaTeX or MathML commands. According to an Apple Support article, the size and color of the equation can be changed ():  The equation appears at the insertion point in your document (or before the selected text). The equation is an inline object, the same size and color as the surrounding text. If you change the size or color of the surrounding text, the size and color of the equation’s font also change.  This does not mention anything about the font used for the equation itself, which seems to be something similar to a Times New Roman font. Is there any way to change the font used, preferably to something like Latin Modern Math? I was considering the possibility of replacing the font file Pages uses with a downloaded Latin Modern Math font file, but I'm not sure what to replace. Could I replace Times New Roman in /System/Library/Fonts/ or something like that?
100699
Hi I've created figures with standalone and pgfplot package. The figures output size are different to one another but more importantly the font size are different. I would like all figures to be of same output size and font size. Should this be controlled in the individual figure files or the main.tex file? My text file of data can be found here   First figure file ...      \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \providecommand{\plotdataDir}{plotdata}     \begin{tikzpicture}     \begin{loglogaxis}[xlabel={$Aspect\:Ratio$},     ylabel={$\mu_c$},ymajorgrids,xmax=1e7,     ytick={0.1,1,10,100,1e3,1e4,1e5,1e6},ymax=1e7,ytick pos=left,xtick pos=left]     % G14     \addplot[blue,thick] table[x=AspectR,y=G14] {\plotdataDir/effectivemu.txt}         node[fill=white,pos=0.85,font=\tiny]{$1,250,000$};     % G15     \addplot[blue,thick] table[x=AspectR,y=G15] {\plotdataDir/effectivemu.txt}         node[fill=white,pos=0.52,font=\tiny]{$\mu_r=\infty$};     \end{loglogaxis}     \end{tikzpicture}     \end{document}     Second figure file ...      \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \providecommand{\plotdataDir}{plotdata}     \begin{tikzpicture}     \pgfplotsset{set layers}     \begin{semilogxaxis}[scale only axis,     xlabel={$turns \times I \left(n \cdot A\right)$},     ylabel={$B_z \left(T\right)$},xmin=1,ymin=0,xmax=100000,     xtick pos=left,     ytick pos=left,xmajorgrids,legend entries={$Supermendur         \:2V$,$Metallic\:Glass$},legend pos=north west]     \addplot[blue,ultra thick] table[x=nxI,y=Bfield1] {\plotdataDir/ellipbmoment.txt}         node[fill=white, fill opacity=0.7, text opacity=1,anchor=south east,font=\tiny]        {$\mu_r=80,000$};     \end{semilogxaxis}     \end{tikzpicture}     \end{document}     And the main document ...      \documentclass{article}     \usepackage{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}      \begin{document}      \providecommand{\plotdataDir}{tikdir/plotdata}     \begin{figure}[here]     \centering     \includestandalone{tikdir/effectivemu}     \caption{test}     \end{figure}      \providecommand{\plotdataDir}{tikdir/fig1}     \begin{figure}[here]     \centering     \includestandalone{tikdir/fig2}     \caption{test}     \end{figure}      \end{document}   If the main document.tex file is run as above fig1 and fig2 are different sizes. I am aware I can control the width and height of image by using \includestandalone[width=\textwidth] but doesn't solve the font size differences between the plots. You can see I adjusted the font size for nodes as \tiny but \tiny is different for both plot. Should this be adjusted globally if so how?  Ideally the preferred structure I would like is of fig2. It seems fig1 has smaller width than fig2 thereby stretching the font size.
24023
Restated Problem and a Solution  The use of a times font using the package txfonts will cause tables to be improperly displayed (see below for an image) if a character such as ę,ą or a different character with an ogonek is used.   This has something to do with the procedure involved not being local, that is, having unwanted side effects elsewhere.   An effective way of keeping whatever is done local is by enclosing it in brackets {ę}. This can be generally invoked for any mention of the character in question by mapping ę to {ę}, a to {ą} and so on in the preamble by the following:  \DeclareUnicodeCharacter {281}{{ę}} % 281 is the decimal utf-8 code of ę ...   This will solve the problem for the whole document  A more general solution still that fixes the error introduced in the source file of txfonts is described below under the heading WORKAROUND. However, if you do not want to fiddle with the way the package is called (possibly because it is called in a stylesheet you do not want to change) redefining the characters is a good solution  Initial question  I am typesetting a multilingual document with pdflatex (MikTeX, all packages up to date). I need to use Times font, and, for the time being, I cannot switch to LuaLatex or XeLatex since I am in the final phase of typesetting a book with a class provided by my publisher and I would need to adjust my code in order to use these above.   Using Polish characters with txfonts causes the tables to crash:   \documentclass{article}  \usepackage{txfonts} %\usepackage{mathptmx} \usepackage[polish, english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc}        \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}} \newcommand{\pl}{\selectlanguage{polish}\fontencoding{T1}} \begin{document} \textbf{A minimal example using a times font} As soon as I enter the Polish character \pl ę  \ee the tables crash  (the lines of the table get printed onto each other). \begin{table}\begin{center}\begin{tabular}{|l||l|l|} \hline type&amp;n    &amp;rel        \\ \hline \hline One line in the table &amp;260&amp; many  \\ Another line in the table      &amp;792&amp;49  \\ A third line in the table       &amp;288&amp;1  \\ \hline \end{tabular}\end{center}\caption{A test table.}\end{table} \end{document}   The alternative package mathptmx does not cause this problem; however, it does not provide the Greek characters I need. This is demonstrated in the following minimal example:  \documentclass{article}  %\usepackage{mathptmx} \usepackage{txfontsb} \usepackage[polutonikogreek,polish, english]{babel} \usepackage[utf8x]{inputenc} \usepackage[LGR,T1]{fontenc}        \newcommand{\ee}{\selectlanguage{english}\fontencoding{T1}} \newcommand{\grrk}{\selectlanguage{polutonikogreek}\fontencoding{LGR}} \begin{document} \textbf{A minimal example using a times font} I need to  print polytonic Greek (and other special characters) using a  times font (e.g. \grrk ἐᾶν \textbf{ἐᾶν})! \ee   I use the \emph{txfonts} (or   \emph{txfontsb}) package, the alternative \emph{mathptmx} cannot find the metric files (``Couldn't find `grtm.cfg''').  \end{document}   How can I use txfonts and still prevent the tables from crashing? I have also tried out txfontsb!  Update: I see now the has nothing to do with Polish, it's the diacritic in ę (the ogonek) that causes the problem. The same problem appears in the following code with an ogonek on an m:       \documentclass{article}      \usepackage{txfonts}     \usepackage[T1]{fontenc}            \begin{document}     text with ogonek:        \k{m}       \begin{table}\begin{center}\begin{tabular}{|l||l|l|}     \hline     type&amp;n    &amp;rel        \\     \hline     \hline     One line in the table &amp;260&amp; many  \\     Another line &amp;792&amp;49  \\     A third line in the table       &amp;288&amp;1  \\     \hline     \end{tabular}\end{center}\caption{A test table.}\end{table}     \end{document}   If \k{m} is enclosed in brackets {\k{m}} the tables work fine. So it has something to do with  locality and the way txfonts apply the ogonek.
28434
Using pdflatex, the command  $e^{a\overbrace{+b+c}}$   results in a bigger size font of the part +b+c under the brace. If I do:  $e^{a\overbrace{\scriptstyle +b+c}}$   the size of +b+c is fixed but the size of the brace is still wrong: the brace has the same size than before but, since the interior font is now smaller, white spaces appear.  Can we fix this?  NOTE: This question can be considered a duplicated of . However, the solutions in that question do not tackle the brace size problem. I don't have enough repuation to add this as a comment there and I don't think it is a good idea to add an answer that is rather a question.  NOTE2: Using mathtools does not change the problem.
27151
When you read a formula aloud you say "r and r-star are related by this formula". If you write this formula down you normally write an r with a six-handed star, which would actually be an asterisk and not star (with 5 sharp hands) because it's easier to draw by hand.  But what to do when typing this formula in LaTeX? Should I set it as I pronounce it?  r^\star = a r   Or as I write it by hand?  r^\ast = a r   And will \ast always do the same as *?  r^\ast == r^* %???   Is one (\star or \ast) simply wrong (typographically or semantically) or is it just a matter of personal preference?
107178
How would I include a figure from python in LaTeX, in order to use the same font in the text and to adjut the size.  If you can include the code that would be great.   Sorry, if my question is a bit simple.  The last two lines   mpl.use("pgf") mpl.rcParams.update(pgf_with_latex)   Are they ment to be in python code?   If so, what package need to be used with?
52680
I've checked the  that can be used through beamer class. I've successfully used most of the fonts, but when I tried to include the Bradhley Hand font, it did not work (it shows ordinary characters)?! How can I use it?  For example, when I use the following :  \documentclass[serif]{beamer}  \usepackage{mathpazo}  \renewcommand{\rmdefault}{ibh}  \begin{document} \begin{frame} $\frac{ \sqrt{ \mu(i)^{ \frac{3}{2}} (i^{2} -1) } } { \sqrt[3]{\rho(i) - 2} + \sqrt[3]{\rho(i) - 1} } $ \end{frame} \end{document}   it gives:
66071
Consider the following MWE.  \documentclass[fontsize=12pt]{scrbook} \usepackage[T1]{fontenc} \usepackage{libertine} \usepackage[libertine]{newtxmath}  \begin{document}     \begin{align*}         v\xrightarrow{e}w &amp;\quad v\overset{e}\rightarrow w \\         \scriptstyle v\xrightarrow{e}w &amp;\quad \scriptstyle v\overset{e}\rightarrow w \\         \scriptscriptstyle v\xrightarrow{e}w &amp;\quad \scriptscriptstyle v\overset{e}\rightarrow w     \end{align*} \end{document}   The result looks like this:    While \rightarrow is changing in size when using \scriptstyle or \scriptscriptstyle, \xrightarrow is not and produces arrows of wrong size and hence height, as well as too little spacing.  Is there a way to fix \xrightarrow?
110135
I'm a complete newbie to Latex, and I am trying to use it for creating small pdf images with equations. My requirements are:   Aligned equations Clear font (bold and italic) Minimal sized image in PDF format Searchable in PDF format   This version finally creates a small PDF without margins, but the problem I run into is with searching. For some fonts, I can't search for comma (in case I want to find "x,y". In some versions, the first letter of a word isn't searchable with the rest of the word, so "Sample" is not searchable. In some fonts, I can't search for a word ending in ff, the second f is not searchable. Is there an easy solution to this?  To create the file:  pdflatex --file-line-error --interaction=nonstopmode testcode.tex   Thank you so much!  \documentclass{amsart} \usepackage{txfonts} \usepackage[T1]{fontenc} \usepackage[margin=0pt]{geometry} \usepackage[active,tightpage]{preview} \usepackage{varwidth} \begin{document} \begin{preview} \begin{varwidth}{\linewidth} \begin{equation} \nonumber \begin{aligned} &amp;Example\_VAL_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL_{x,y,i} * VAL_i \\ &amp;Example\_VAL2_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL2_{x,y,i} * VAL_i \end{aligned} \end{equation} \end{varwidth} \end{preview} \end{document}   Latest version after help from Ulrike, and trying to simplify code writing for myself:  \documentclass[varwidth=\maxdimen,border=2pt]{standalone} \usepackage{luatex85} \usepackage{amsmath} \usepackage{unicode-math} \usepackage[italic]{mathastext} \setmainfont{TeX Gyre Termes} %Times clone \setmathfont{TeX Gyre Termes Math} %accompagning math.  \begin{document} \[ \nonumber\begin{aligned}         &amp;Example\_VAL_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL_{x,y,i} * VAL_{i}         \\         &amp;Example\_VAL2_{x,y} &amp;&amp;= \sum\nolimits_{i=0}^{MARK\_n}VAL2_{x,y,i} * VAL_{i}     \end{aligned} \] \end{document}   Curious how to get a slanted more normal font in the equation - without embedding myvar throughout.
108674
I'm looking for a calligraphic / script letter L with a little loop on the top.  \mathcal{L} from amsfonts doesn't have the little loop:    \mathscr{L} from mathrsfs has a loop, but it is too slanted for my taste:    I'm looking for a version where the vertical line is very straight, and there is a (small) loop on the top. Can anyone recommend a package or font?