Tag Info

New answers tagged

1

Since no example is given, I just loaded the mathptmx package for Times font and redefined the apparent class default \sfdefault to be \rmdefault. \documentclass{abntex2} \usepackage{blindtext} \usepackage{mathptmx} \renewcommand{\sfdefault}{\rmdefault} % No serif fonts, use roman (times) \begin{document} \tableofcontents \section{First section} ...


0

Here is something that is rather a comment, which I am though not allowed to post as I have no reputation points. I am writing as a proxy to the developers, who take the following position in regard to the suggestion that the problem discussed is a bug in TeX Gyre Termes (quoting): TeX Gyre Termes is an extension and substitution for the Times font. ...


4

You need to make the interpreter of the text as 'latex': xlabel('\textbf{Example $a^2$}','Interpreter','latex'); % for x axis's text ylabel('\textbf{Example $b^2$}','Interpreter','latex'); % for y axis's text title('Example','Interpreter','latex'); % for title's text h=legend('show'); % for legend's text, assuming you have given the strings for legend ...


5

The file article.cls contains: \newcommand\section{\@startsection {section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\normalfont\Large\bfseries}} Therefore the font is \normalfont\Large\bfseries \normalfont is defined in ...


2

If you want to use different fonts within a document, then you need to tell latex to switch to another font when you want this to happen, see How do I use a particular font for a small section of text in my document? \documentclass{article} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \begin{document} \noindent Какой-то осмысленный текст1.\\ % ...


3

I think that does what you want: \documentclass[10pt,a5paper,draft]{book} \usepackage[T2A]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[russian, english]{babel} \begin{document} \rmfamily Какой-то осмысленный текст1. \sffamily Какой-то осмысленный текст2. \ttfamily Какой-то осмысленный текст3. \end{document} It produces


1

You can use the lh fonts by adding \usepackage{lh-lcy}, but you also have to mark the places where Russian is to be used. \documentclass[10pt,a5paper,draft]{book} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[english,russian]{babel} \usepackage{lh-lcy} \begin{document} Какой-то осмысленный текст1. Какой-то осмысленный текст2. ...


12

LaTeX already has the infrastructure to do it: \documentclass{memoir} \usepackage{lmodern} \DeclareTextFontCommand{\textbf}{\sffamily\bfseries} \DeclareTextFontCommand{\textit}{\sffamily\slshape} \begin{document} Now is \textbf{the time} for \textit{all good} men... \end{document} Note that the default definition of \textbf is ...


6

Redefining \textbf and \textit is probably a Bad Idea. Not only will this lead to very unexpected behavior if anyone else tries to compile your document, but what if want to use them with their original meanings at some point? Better to use your editor's find-and-replace functions to replace them with some new definition; say: ...


5

Well, to really learn about it, you should probably turn to a good TeX reference; but the basics are pretty simple. \font is the plain TeX way to change fonts in a document. You say \font to tell TeX that you want to declare a font, then you give TeX a control sequence by which you will refer to the font, then you say =filename so that TeX knows which font ...


2

Unfortunately Tobias' approach didn't work for me when trying to embed fonts in my images for use with pdfTeX. The following command line, based on an answer from StackOverflow did work for me: gs -dCompatibilityLevel=1.4 \ -dPDFSETTINGS=/screen \ -dCompressFonts=true \ -dSubsetFonts=true \ -dNOPAUSE \ -dBATCH \ -sDEVICE=pdfwrite \ ...


13

It's a bad bug indeed in the metrics for TeX Gyre Termes. Note that the same happens with the OpenType version. And also with newtxtext (that uses a different clone of Times New Roman) You can at least obviate to the problem by redefining \labelitemii: \documentclass{article} \usepackage{tgtermes} \renewcommand{\labelenumii}{(\theenumii\/)} % add the ...


8

There are in fact very few standards for such things. There is ISO 80000-2 which is an ISO standard "Quantities and units — Part 2: Mathematical signs and symbols to be used in the natural sciences and technology" this is the standard referenced by the rather unfortunately named isomath package and mathstyle=iso option to unicode-math. (I say unfortunate as ...


2

In addition to suitable licensing, the files have to have non-conflicting names. The files are currently named in ways which conflict with existing components of TeX Live. They would need to be renamed to avoid this. Note that there is no guarantee the package will be included if it meets the minimum criteria.


7

As boring as it may sound, I think you should just send an email to the TeX Live list (tex-live@tug.org, see the list’s page for more information) to make sure the developers are aware of the fonts and are going to include it in TeX Live. And you should definitely make sure that the fonts are available under some reasonable licence. If you don’t have any ...


2

To prepare a package for upload to TeXLive, you should look at the following page and the links on it: Uploading to CTAN TeXLive, as I understand it, gets its packages from CTAN, provided that it has an appropriate license. This also means your package will be available to distributions other than TeXLive.


11

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}. ...


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}


1

Use sfmath package here. \documentclass{article} \renewcommand{\familydefault}{\sfdefault} \usepackage{sfmath} \begin{document} 10$^5$ and CO$_2$. \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 ...


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

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 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{% ...


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.


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 ...


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} ...


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)) ...


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} ...


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} ...


6

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{} ...


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: ...


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 ...


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.


0

I just found that the command \familydefault would return "cmr" so I understand that the font type used is Computer Modern Roman.


0

For cyrillic fonts, convert LH-fonts to Type1 with mftrace + fontforge UPDATE: Well, LH-fonts are not really what I'm looking for: although the encodings of these fonts match the encodings of corresponding CM-fonts in lower-half of the table, the metrics are slightly different. Finally, I was able to find exactly the fonts which I need: these cyrillic ...


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. ...


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]{% ...


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

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)}$$ ...


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 ...


0

Created C:\Local TeX Files. Put zipped fonts distribution in this directory and unzipped there. Click Start → Programs → MiKTeX 2.9 → Maintenance → Settings to open the MiKTeX Options window, Click on the Roots tab. The Roots page shows the list of currently registered root directories. Click Add. In the following dialog box , browse to C:\Local TeX Files ...


5

Based on my SX logo, which uses the \S sectioning glyph as my initials. \documentclass{article} \usepackage{graphicx} \usepackage{stackengine} \begin{document} \Huge\scalebox{3.8}{\S}\kern-.5ex\bfseries\LARGE\setstackgap{L}{1.35\baselineskip}% \Centerstack[l]{te\kern2pt\tclap[5pt]{v}\kern2pt{}en egl\tclap[12pt]{t}e\bclap[10pt]{s}} \end{document} Here is ...


10

You can write your name creatively as I do mine: \documentclass{article} \usepackage{amsmath,amssymb} \newsavebox{\mynamebox} \savebox{\mynamebox}{%% $\Lambda\mspace{-13mu}-\mspace{-5mu}%% \cdot\mspace{-0.25mu}%% \xi\mspace{-1mu}^{\parallel}\mspace{-3mu}%% \epsilon^{\mspace{-2mu}\dagger\mspace{-5mu}\dagger}$}%% ...


0

As @Will_Robertson pointed out, I had an old version of fontspec installed. I actually had multiple versions of fontspec installed in different folders in miktex. Miktex was finding the older version and using it. Once I deleted the old version, it started working.


8

this requires xelatex \documentclass{article} \XeTeXinterchartokenstate = 1 \XeTeXcharclass`L=4 \XeTeXcharclass`A=4 \XeTeXcharclass`T=4 \XeTeXcharclass`E=4 \XeTeXcharclass`X=4 \XeTeXinterchartoks 255 4{\z} \def\z#1{{\XeTeXinterchartokenstate = 0\lowercase{\,#1}}} \lccode`L=`D \lccode`T=`V \lccode`E=`I \lccode`X=`D \begin{document} \LaTeX ...


7

Best way to find out how the \TeX logo works is to look at \meaning\TeX. Since \LaTeX is protected, you need to use \expandafter\meaning\csname LaTeX \endcsname. texdef is a tool you can use on the command line to quickly look these things up: texdef -t latex TeX LaTeX [... more macros ...]. Among other font-selection commands, the logos use \kern and ...


7

This is expected, because the period has type \mathord, so it doesn't change with \mathXY commands. However, it's easily fixed. \DeclareMathSymbol{.}{\mathalpha}{operators}{`.} For the comma it's not as easy, because we can't assign the comma the \mathalpha type, since it should be punctuation. It's easier to use sansmath, that also makes sans serif many ...


2

spanish from babel, defines a particular macro to alter the output of a decimal point (i.e., you input, as always, a dot ., and you change the output with this macro). \usepackage[spanish]{babel} \spanishdecimal{\textsf{,}} Personally, I like the dot itself, so \spanishdecimal{.} would do for me (there are other concrete macros for the dot or the comma, ...


1

The CMBright fonts are available in OpenType format as part of the cm-unicode project. Granted that your file is UTF-8 encoded, you should get comparable results by doing \documentclass{scrartcl} \usepackage{ifluatex} \ifluatex \usepackage{fontspec} \setmainfont{XCharter} \setsansfont{CMU Bright}[ Scale=MatchUppercase ] \setmonofont{Ubuntu ...



Top 50 recent answers are included