New answers tagged

0

Depending on your use case, perhaps you should be using a fixed width font for hexadecimal numbers, e.g. \texttt. In the table context you can use the features from the standard array package to add formatting to the corresponding column: \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{c>{\ttfamily}c} \hline $...


0

Although @egreg gave one method, \setmathrm, it is also possible to change the operator font to something other than mathrm. In unicode-math, this is the \operatorfont command, for example \operatorfont\mathsfup In classic LaTeX, you can redefine the \operator@font command to a different font than \mathrm. Remember to \makeatletter before using a command ...


0

after having had used STIX2 which looks good but a little too heavy/bold for my taste, I had a dream yesterday night. It was the solution. By using a hack with manual kerning and creation of the fj ligature and \extraligfj command and with LuaLaTeX on-the-fly text-replacement I have created a seamless solution. \ProvidesPackage{extralig} \usepackage{xcolor} \...


0

You can declare the character | to be an active character (so that it gets treated like a macro) and give it the same definition as your \sd, by adding these two lines: \catcode`|=\active \let|=\sd Modifying your example: \documentclass[letterpaper,12pt]{article} \usepackage{fontspec} \newfontfamily{\san}[Script=Devanagari,Mapping=velthuis-sanskrit]{...


0

Thanks guys for your answer. What I am looking for is to find exactly this font: I know that the header is "cmbx12". For the text below however, I cannot find out which style it is exactly. I've tried "cmr10", but it doesn't look like that. Thank you guys!


1

Going through tufte-common.def and tufte-book.cls I see that tufte uses the fancyhdr package. For frontmatter it uses \ifthenelse{\boolean{@tufte@twoside}}% {\fancyhead[LE,RO]{\thepage}}% {\fancyhead[RE,RO]{\thepage}}% while for mainmatter it uses \ifthenelse{\boolean{@tufte@twoside}}% {% two-side \renewcommand{\chaptermark}[1]{\markboth{##1}{}}% ...


0

The following has just worked for me on macOS. Downloading the dejavu package as a ZIP file from the package page: https://ctan.org/tex-archive/fonts/dejavu was the easiest way to fix this. In the ZIP file, there is a dejavu folder that contains *.ttf files. I have opened the /Applications/Font Book.app application, clicked + and pointed it to the dejavu/...


1

To preemptively fix the problems you’ll get if you try \setmainfont{texgyretermes-regular.otf}, here is the recommended way to load the font: \setmainfont{texgyretermes}[ UprightFont = *-regular , BoldFont = *-bold , ItalicFont = *-italic , BoldItalicFont = *-bolditalic , Extension = .otf , Scale = 1.0 ] This tells fontspec what filenames to ...


0

@DavidCarlisle and @Davislor answered the question in the comments. What eventually worked for me was completely updated the entire TeXLive Manager, reinstalling TeX Gyre Termes, and then, instead of using \setmainfont{TeX Gyre Termes}, I used \setmainfont{texgyretermes-regular.otf}. Thank you everyone for your help!!!


2

Just for fun, how to avoid changing the input with so many &: \documentclass{article} %\usepackage{xparse} % not necessary with LaTeX 2020-10-01 \usepackage{array,booktabs} \newcommand{\xor}{\oplus} \ExplSyntaxOn \NewDocumentCommand{\bytetable}{O{\textwidth}m} { \dutt_bytetable:nn { #1 } { #2 } } \int_new:N \l__dutt_bytetable_bytes_int \seq_new:N \...


5

Not too difficult if your editor supports replace all in selection. \documentclass{article} \def\xor{\oplus} \begin{document} \noindent\begin{tabular}{ |c| r*{15}{@{ }r}| } \hline $C_2$ & B5 & 6E & 2C & D4 & F3 & 12 & 57 & 3E & 8C & 8C & 1A & 77 & A3 & EE & C3 & 41 \\ $P'...


1

The template is publicly available and the sample .tex file starts with \documentclass[11pt,a4paper]{article} \usepackage[hyperref]{emnlp2020} \usepackage{times} \usepackage{latexsym} \renewcommand{\UrlFont}{\ttfamily\small} % This is not strictly necessary, and may be commented out, % but it will improve the layout of the manuscript, % and will typically ...


0

cmr means roman font, you should use cmb \font\authfont=cmb10 at 10pt \author{% \authfont% ... } As you are not providing full MWE, I just corrected the error in your code...


2

You call \setmathrm this way: \documentclass{article} \usepackage[quiet]{mathspec} \setmathrm{ScalaSans}[ Path = scalasans/, Extension = .otf, UprightFont = *-RegularLF, BoldFont = *-BoldLF, ItalicFont = *-RegularLFItalic ] \begin{document} \( \mathrm{Scala Sans }\...


2

The font definition file coming with esvect only defines font for fixed sizes, namely 5, 6, 7, 8, 9, 10, 10.95, 12, 14.4, 17.28, 20.74, 24.88, in the usual square root progression after 10. You can fix this by exploiting the fact that the fonts are available in Type1 format, so they can be scaled at will. \documentclass{article} \usepackage{unicode-math} \...


4

You can install it as a system font, and all applications, including LuaTeX and TeX Live, will be able to find it. On Linux, you can copy a font to (a subdirectory of) /usr/local/share/fonts/ to install for all users, or ~/.fonts/ to install for one user. (There might be other font paths that work on your distribution.) On Windows, installing for all users ...


0

First, check your .log file for warning messages about any fonts not being found. Next, make sure you’ve downloaded and installed the Culmus fonts, including DavidCLM-MediumItalic.otf. You might want to re-run fc-cache -f -s -v and luaotfload-tool -f -u -p -v to make sure they’re indexed. Finally, you might load the fonts by filename: \newfontfamily\...


1

Since this just got bumped back up to the front page, I’ll add for completeness: in fontspec, use \setmonofont.


0

\usepackage[scaled=0.8]{FiraMono} ( Put the above line in the preamble of your document, i.e. immediately after \documentclass. ) I use the typewriter font for program code. As such, it is important to clearly distinguish between 1 and l, the former being the digit one and the latter being the lower case letter L. I strongly advice against beramono because ...


2

\usepackage[scaled=0.8]{FiraMono} Put the above line in the preamble of your document, i.e. immediately after \documentclass. That's it! Concerning the related question of what font to choose, see my answer at Alternative monospace fonts. Reference: https://tug.org/FontCatalogue/typewriterfonts.html


1

The packages cmbright and josefin fight each other, because they both define \sfdefault and the former also defines \familydefault to be \sfdefault. I'm not really sure you want two different sans serif fonts for your document. Anyway, this should do. \documentclass{book} \usepackage{cmbright} \edef\familydefault{\familydefault} \usepackage{josefin} \...


2

\documentclass{article} \usepackage{josefin} \begin{document} \makeatletter \sffamily the family name is \f@family \makeatother \end{document}


0

Here is an EPS file with script ell created with ROOT6.22/02 https://www.dropbox.com/s/03n8y8xjtxkalvz/ell1.eps?dl=0. I find the simplest approach is to use a bulk editor to replace STIX with STIXX in the eps files before conversion. This helps to remove the conflict between the version of STIXGeneral-Italic in ROOT (Version 0.9) and that included in TeXLive ...


0

I just included a simple MWE build with xelatex to show some of the caption package options that I use often, (though not at the same time.) % !TeX TS-program = xelatex \documentclass[12pt,a4paper]{article} \usepackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Arial} \RequirePackage{booktabs} \RequirePackage{graphicx} \RequirePackage[% ...


1

In the following example, I used \Touche[principal={sin},second={sin\textsuperscript{\textminus 1}},alpha={H},name=PI] in order to get the right button. This is inspired by the definition of the buttons you can find on page 12 of the documentation. In order to change the text on the blue button from 2nde to 2dnf, I copied the definition of \Touche from ...


33

Indeed, \epsilon is already defined. In this case it's safe to do \renewcommand{\epsilon}{\varepsilon} I know that \let\epsilon\varepsilon would be slightly more efficient, but it's not for beginners. Note that in this way you have no way to recover the original \epsilon symbol, but that should not be a problem. In case you need the original, you need to ...


2

You have defined several times the same symbol font; each \DeclareSymbolFont declaration uses up a math family. I reorganized your preamble in sections, so it's easier to spot duplications. I also added notes about packages not to use. Finally, defining \R as \mbox{$\mathbb{R}$} is wrong: you'll get normal size also in subscripts, for instance. If the aim is ...


1

It’s all the \DeclareSymbolFont commands, on top of packages such as ammsymb. You only have 16 symbol alphabets in legacy TeX. One option is to switch to unicode-math, which removes this limit completely. You can also remove those redefinitions of symbol alphabets. You don’t appear to actually need them. Usually, if you’re using PDFTeX, you want to pick ...


3

This is a few years old, but I saw it when it landed back on the front page, and it deserves an answer. Actually, it deserves two, depending on which problem you want to solve: getting those accents in Garamond, or faking accented characters in a font that does not contain them. You update in the comments to say that you ended up using Linotype Garamond ...


1

It's not difficult to reproduce your output (with just the fix of \, in front of the differential): Here's the code: \documentclass{article} \usepackage{amsmath} \usepackage{mathabx} \begin{document} \[ \lim_{\delta t\to 0} K \int \prod_{j=1}^{n-1} (K\,dx_j) \] \end{document} As soon as I remove \usepackage{mathabx} I get Thus the answer is: don't use ...


3

You can make the chars active and give them a definition: \documentclass[12pt]{book} \usepackage{fontspec} \newfontfamily\ipafont{Doulos SIL} \DeclareTextFontCommand{\textipafont}{\ipafont} \usepackage{newunicodechar} \newunicodechar{ɛ}{\textipafont{ɛ}} \begin{document} abc ɛ \end{document} You can also define the font as a fallback (the color is only ...


3

You can use \newfontfamily with OpenType or TrueType fonts, not with “legacy” Metafont fonts. You need to declare the font in the “traditional” way. \documentclass{article} \usepackage{fontspec} \DeclareFontFamily{U}{mathb}{\hyphenchar\font45} \DeclareFontShape{U}{mathb}{m}{n}{ <-5.5> mathb5 <5.5-6.5> mathb6 <6.5-7.5> mathb7 <7....


2

You can define yourself the names (I guess that TU should add these). \documentclass{article} \usepackage{fontspec} \setmainfont{NewComputerModern} \newfontfamily{\ebgar}{EB Garamond} \newlength{\len} % this is not even in xunicode \DeclareTextSymbol{\textnbhyphen}{\UnicodeEncodingName}{"2011} % this is in xunicode \DeclareTextSymbol{\...


3

Using U+2013 as an example as they are all the same. – Just type the character directly. ^^^^2013 The ^^ notation (as in classic tex but extended to 4 or 6 ^) produces the character (as an input character) at the very earliest stage. So unlike following options can be used anywhere the character can be used eg \^^^^2013 is \– \char"2013 (or latex \...


1

Welcome to TeX.SE... You have to define the roman, italic, bold and bolditalic fonts, like (I used AdoneTextPro as example) as below: \setmainfont[Mapping=tex-text, Path = mention file path where you keep the fonts, UprightFont= AdobeTextPro-Regular.otf, BoldFont=AdobeTextPro-Bold.otf, ItalicFont=AdobeTextPro-It.otf, BoldItalicFont=AdobeTextPro-BoldIt.otf ]{...


0

\documentclass[a4paper, 12pt]{article} \usepackage{amsfonts, amssymb, amsmath, amsthm} \usepackage[no-math]{fontspec} \setmainfont{ModernMTStd-Extended.otf}[ FakeBold=2, Ligatures=TeX, ] \setsansfont[% FakeBold=2, ItalicFont=NewCMSans10-Oblique.otf,% BoldFont=NewCMSans10-Bold.otf,% BoldItalicFont=NewCMSans10-BoldOblique.otf,% SmallCapsFeatures={Numbers=...


4

If you add \XeTeXtracingfonts=1 you can see in the log that miktex finds for the typewriter font a type1 font (a .pfb): /MiKTeX 2.9/fonts/type1/public/cm-unicode/cmuntt.pfb and this then fails when trying to typeset the char with the accent. You can avoid this by setting the font by file name instead of font name (you perhaps will have to set the bold ...


1

Have a look: \dfrac{\left(5 \dfrac{4}{45}-4 \dfrac{1}{6}\right)\div 5 \dfrac{8}{15}}{\left(4 \dfrac{2}{3}+0.75\right) \times 3 \dfrac{9}{13}}\div 34 \dfrac{2}{7}+\dfrac{0.3\div 0.01}{70}+\dfrac{2}{7} Just change frac by dfrac:


2

the command has changed (probably to adjust to some changes in LaTeX regarding font series): it now only switches the series, and not the font family. This means that you have to select the family too e.g. with \cabin or \sffamily (I'm not sure if this was intended). Beside this, the command has a bug, it contains spurious spaces: \documentclass{report} \...


2

The font you’re using is from 1994 and encoded in Windows codepage 1256, which is obsolete. You will need to use a Unicode font in LuaLaTeX or XeLaTeX. Khaled Hosny’s Amiri is an excellent one that also has good complements in his Libertinus and Libertinus Math fonts. Here is an example of a template I made using it. All the fonts it uses should be in ...


4

If I measure the height of an italic “a” with the scaling factor of 0.95, I get a height of 4.24648pt. For a math italic “a” I get 4.51999pt. Thus the scaling factor, to four decimal digits, should be 0.93949. \documentclass{article} \usepackage[T1]{fontenc} \usepackage[scaled=0.95]{garamondx} \usepackage[garamondx,scaled=0.93949]{newtxmath} \begin{document}...


1

I resolved this issue by loading fontspec before the directlua block. Some of the glyph names in Linux Libertine O differ from those used by the default font. (This thread provided the tools I used to check the glyph names of the font.) Perhaps that's why the loading order matters. \documentclass[12pt]{article} \usepackage{luacode,luatexbase,xcolor} \...


0

I'm afraid that you won't be happy with the answer. The font used is the standard Computer Modern, but in bitmap format. This is evident if we look at the PDF file at high resolution. Here's a close-up of the title page: where the pixelated shape is very clear. Here's the same with the Type1 version: You can clearly see that the font is the same Computer ...


1

The font is bolded. You can accomplish it with both pdflatex and xelatex. For pdflatex, use pdfrender package. For xelatex, use FakeBold option in \fontspec package. Here is a solution for xelatex. \documentclass[a4paper, 12pt]{article} \usepackage{amsfonts, amssymb, amsmath, amsthm} \usepackage[]{fontspec} \setmainfont{Latin Modern Roman}[ FakeBold=2, ...


6

This really needs to be addressed in the font, you could try to edit latin modern in fontforge or similar to add the ligature, but simplest is to pick a font that has it. This is using Stix 2 text font with lualatex (or xelatex would also work) \documentclass{article} \usepackage{fontspec} \setmainfont{STIX2Text-Regular.otf} \begin{document} \mbox{f}i\...


2

You can fool superiors by redefining \f@@tn@te: \documentclass{article} \usepackage{libertine} \usepackage{superiors} \begin{document} \begin{center} \renewcommand*{\thefootnote}{\fnsymbol{footnote}}% \makeatletter\def\f@@tn@te{blub}\makeatother bla sldk slkd lskd\footnote{sldfkjlsdkfj sldksl dksld } \end{center} sld sldkjsl djfls djs d\footnote{...


3

You have an XY-problem here. You don’t want to install your own packages in TEXMFDIST, and you don’t need to download any extra files at all. The font is in fact available in TeX Live as the antiqua package. If you check the directory c:\texlive\2020\texmf-dist\fonts\vf\urw\antiqua or type kpsewhich uaq.map at the command prompt, you should see some of its ...


2

To get the digits from a fallback font you can use digitsnormal as argument for the range key but you have to add force=yes. \definefallbackfamily [garamaond_sans] [rm] [Comic Sans MS] [range=digitsnormal, force=yes, rscale=0.85] \definefontfamily [garamaond_sans] [rm] [EB Garamond] \setupbodyfont [garamaond_sans] \starttext \starttabulate \...


0

The following workaround suggested by Ulrike Fischer here worked for me. Adding the line \DeclareFontShape{OT1}{cmss}{b}{n}{<->ssub * cmss/bx/n}{} at the beginning of the document yields the desired behaviour. Crucially, this fix causes no harm when used with older installations of TeX Live, which means I can work on the same file across different ...


0

You must install the font for all users. In Windows 10 you can do it by right click on the ttf font and select "install for all users".


Top 50 recent answers are included