# Tag Info

10

Package xcolor can extract the color definition in a macro: \extractcolorspec{<color>}{<macro>}. This can be used to define a test to compare the current color . with red: \documentclass[a4paper,12pt]{article} \usepackage[T1]{fontenc} \usepackage[svgnames]{xcolor} \usepackage[scaled=0.84]{beramono} \makeatletter \newcommand{\MyChange}[1]{% ...

9

In my view, it's abusing the math environment to use it only to make superscript and subscript numbers in a context that is not math. So I would use \textsuperscript and \textsubscript instead. \documentclass{article} \usepackage{fixltx2e} \renewcommand{\familydefault}{\sfdefault} \begin{document} 10\textsuperscript{5} and CO\textsubscript{2}. ...

6

You can often find the fonts you want by searching on detexify Try \documentclass{article} \usepackage{textcomp} \begin{document} \textdollaroldstyle \end{document} That may seem like a lot to write out, so in your preamble you can put \let\dollar\textdollaroldstyle and then you can write \dollar3.50 in you document and get the proper symbol.

5

If you move \usepackage[T1]{fontenc} to before \usepackage[spanish]{babel} you get something that looks sort of correct, is this what you want? MWE: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[spanish]{babel} \usepackage[utf8]{inputenc} \usepackage{gfsartemisia-euler} \usepackage{amsmath} \begin{document} $$\lim_{t\to a}{f(t)}$$ ...

5

You can use the fact that a color's definition is kept in the macro \csname\string\color@<colorname>\endcsname and you can inspect the current color with . for <colorname>, as explained in http://tex.stackexchange.com/a/36163/4427 \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...

5

1st paragraph is normal slant handwriting, while the second is leftward slant handwriting. By convention, left-slant handwriting is not taught (and therefore it does not exist in pre-defined fonts), but a number of lefties and (as Mico notes) some righties adopt the style in their handwriting. Here, I implement a character iteration scheme, where \charop{} ...

5

A variant with package siunitx for numbers and units (with font detection) and mhchem for chemical formulas: \documentclass{article} \renewcommand{\familydefault}{\sfdefault} \usepackage[version=3]{mhchem} \usepackage{siunitx} \begin{document} \num{e5} and \ce{CO2}. \end{document}

5

Those are the fonts used in math mode. Using mathsf you can switch to a sans serif math font. On the other hand, there are packages like siunitx and chemformula that ease the input significantly. \documentclass{article} \renewcommand{\familydefault}{\sfdefault} \usepackage{siunitx} \usepackage{chemformula} \begin{document} 10$^5$ and CO$_2$.\par ...

4

The font used is Computer Modern, but when using that font in MS Word, you should get the font in .ttf or .otf format with proper Unicode coding. There is a Unicode version of Computer Modern with those formats that you can download here.

4

Try this: \documentclass{beamer} \usefonttheme[onlymath]{serif} \begin{document} \begin{frame} Here goes the text $x + y = Z$ \end{frame} \end{document}

3

Define a new symbol font using the font of newtxmath and tell TeX to take \gamma from it. \documentclass{article} \usepackage[T1]{fontenc} \usepackage{tgtermes} \usepackage{amsmath,amsfonts} \usepackage[zswash,lite]{mtpro2} \usepackage{bm} \DeclareSymbolFont{newtxletters}{OML}{ntxmi}{m}{it} \SetSymbolFont{newtxletters}{bold}{OML}{ntxmi}{b}{it} ...

3

My first thought is the same as Sigur's, to rotate a symbol from the FontAwesome font. \documentclass{article} \usepackage{fontspec} \setmainfont{Linux Libertine O} \newfontfamily\fawesome{FontAwesome} \usepackage{graphicx} \newcommand{\beep}{{\fawesome\raisebox{.75ex}{\rotatebox[origin=bl]{320}{\char"F09E}}}} \begin{document} Will the symbol ...

2

If you just need some circular waves, you may want to use expanding waves here: % arara: pdflatex \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} \tikzset{radiation/.style={decorate,decoration={expanding waves,segment length=3pt},thick}} \begin{document} Beep: ...

2

Styling of document elements should preferably be done in a consistent manner. As such and rightly so, algorithm2e's \SetAlFnt is issued at the start of the algorithm environment. That's why, when you call \SetAlFnt halfway through the algorithm... or even immediately after \begin{algorithm}, it's too late to change the algorithm fonts. ...

2

Spanish babel offers a switch to have accented or unnacented operators (lim/lím, max/máx, min/mín, inf/ínf, mod/mód, etc.). It seems to work with the switch \unaccentedoperators In any case, I would wait for another answer because this just removes the addition made by babel leaving the original unaccented operators. There seems to be a problem with the ...

2

Besides the hints reg. how to ask questions, here a possible solution: \documentclass[a4paper,10pt]{article} \usepackage[T1]{fontenc} \usepackage{listings} \lstset{% basicstyle = \fontfamily{pcr}\fontsize{10pt}{12pt}\selectfont , numberstyle = \small , numbersep = 10pt , frame = single , language = PHP } \begin{document} ...

2

If you want a Fraktur or Semi-Fraktur dollar sign, see the Rotunda capital S: However, I have not been able to find a matching font file. Take a look at the dollar sign in http://www.abstractfonts.com/font/14113/charmap?frameless=1&rndint=4637722&brief=1. This is only one typeface in http://www.abstractfonts.com/category/31/Calligraphy. Several ...

1

Use sfmath package here. \documentclass{article} \renewcommand{\familydefault}{\sfdefault} \usepackage{sfmath} \begin{document} 10$^5$ and CO$_2$. \end{document}

1

This is a bug in otfinst.py which can't handle subversion numbers > 99 properly. A quick and dirty fix would be to disable version checking by commenting out lines 269 to 271 in otfinst.py: # if float(m.group(1)) < 2.38: # sys.stderr.write("Your otfinfo version is currently %s.\nPlease upgrade your otfinfo version to at least 2.38.\n" % m.group(1)) ...

1

I was always taught that the dollar sign was originally created as a superposition of "U" and "S", a uniquely American symbol. Thus, for a really old version of the symbol, I build it here from scratch. Here, I show the serif and sans versions of the "S". \documentclass{article} \usepackage{stackengine,graphicx} \def\origdollar{% ...

1

You can change the surrounding text font size to 14pt by normal means. And to maintain the math font size to 12pt you could use the \DeclareMathSizes in your preamble. The syntax is: \DeclareMathSizes{display size}{text size}{script size}{scriptscript size} So, for instance, you could set: \DeclareMathSizes{14pt}{12pt}{10pt}{8pt} Or make all math sizes ...

1

I believe that the right way to use a sans serif font for operators with the unicode-math package is the following: \documentclass{article} \usepackage{unicode-math} \ExplSyntaxOn \makeatletter \renewcommand{\operator@font}{\um_switchto_mathsf:} \makeatother \ExplSyntaxOff \begin{document} $\sin{x}$ \end{document} This will not work unless you use ...

1

Sorry my code is a terrible mess, I just typed this out quickly, but here's how to do it: % !TEX TS-program = xelatex \documentclass{article} \usepackage{lmodern} \usepackage{fontspec} \newfontfamily{\garamond}{EB Garamond} \newfontfamily{\libertine}{Linux Libertine O} \newfontfamily{\fancycap}{EB Garamond Initials} \usepackage{lettrine} ...

Only top voted, non community-wiki answers of a minimum length are eligible