Skip to main content
Share Your Experience: Take the 2024 Developer Survey

New answers tagged

1 vote
Accepted

Caption of listing uses wrong font

This is not a KOMA-Script issue but of the default style of package float, which is used by minted to define the listing environment and format the corresponding caption. But indeed KOMA-Script ...
cabohah's user avatar
  • 12.4k
3 votes
Accepted

LaTeX: Text type

You have done a mix of fonts and used "contestually" the engines XeLaTeX and pdfLaTeX. I have fixed also a bit your code. Double $$ are deprecated. \usepackage{tgchorus} work correctly. \...
Sebastiano's user avatar
  • 55.4k
1 vote

Caption of listing uses wrong font

You can select \normalfont when typesetting the caption label. \documentclass[]{scrreprt} \usepackage{sansmathfonts} \usepackage[T1]{fontenc} \usepackage{minted} \renewcommand*\familydefault{\...
egreg's user avatar
  • 1.1m
5 votes

how to fix libertine package with lualatex putting tilde too low?

If you must continue to use the libertine package, I suggest you write either \tilde{\mathbf{n}} or \textbf{\~{n}} in math mode. I have a hunch that \tilde{\mathbf{n}} is what you want. % !TEX TS-...
Mico's user avatar
  • 510k
5 votes

how to fix libertine package with lualatex putting tilde too low?

Don't use libertine. The font is long unsupported. Use libertinus instead, and \symbf instead of \mathbf. \documentclass{article} \usepackage{libertinus} \begin{document} \(\tilde{\symbf{n}}+a+b\) \...
egreg's user avatar
  • 1.1m
1 vote

Japanese font in table overlaps with adjacent column when compiled with XeLaTeX in Overleaf

With LuaLateX one can leverage the fallback mechanism to sort of join fonts. This avoids having to continuously having to type \text... etc. The fallback mechanism will substitute glyphs, from the ...
yannisl's user avatar
  • 117k
1 vote

Japanese font in table overlaps with adjacent column when compiled with XeLaTeX in Overleaf

Note that this may not be the right way to add line breaks in Japanese and it certainly doesn't use the correct places to insert such breaks. The Tamil and Japanese still produce bad boxes, but there'...
cfr's user avatar
  • 202k
2 votes

What is the correct way to give the Path of a locally given font to be used for the title of a document (xelatex)

Never use the \font primitive in latex, you should not have formatting in the argument of title at all: the formatting should be in the definition of maketitle, but for a one-off it will work. Just ...
David Carlisle's user avatar
7 votes

Not displaying bold chinese character in Times New Roman font

If you only need individual Chinese characters in a document mostly in a Western language, and your publisher or prof isn’t forcing you to use 8-bit fonts in the twenty-first century, I recommend the ...
Davislor's user avatar
  • 44.6k
3 votes
Accepted

Math Command Different Font

Tell fontspec not to change the \mathrm font from the default: \documentclass{article} \usepackage[a4paper, margin=0.78in]{geometry} \usepackage[mode=math]{siunitx} \usepackage[no-math]{fontspec} \...
Davislor's user avatar
  • 44.6k
3 votes

Math Command Different Font

siunitx format units with \mathrm witch matches the text font. This is because units are text, not math expressions. If you want to change this, I suggest to load the package unicode-math which ...
jlab's user avatar
  • 3,182
9 votes
Accepted

Not displaying bold chinese character in Times New Roman font

I used newtxtext rather than times (obsolete). I'd also recommend against mixing Computer Modern math with Times text: just do \usepackage{newtx} The problem is that the Chinese font description file ...
egreg's user avatar
  • 1.1m
4 votes

Not displaying bold chinese character in Times New Roman font

Here is a way to do it. Kindly watch my comments in the code below. I refer to Adam Burke's solution. Please keep in mind: to save your .tex file in UTF-8 compile it with XeLaTeX use UTF-8 charaters, ...
MS-SPO's user avatar
  • 12.7k
0 votes

How to use the AMSfonts of \mathbb{} outside of LaTeX

\mathbb is the macro of the package amsfonts. Therefore get and install AMSFonts (under the SIL Open Font License) in your operating system to use outside of LaTeX. However, the font format is very ...
Paalon's user avatar
  • 23
0 votes

Using ucharclasses and babel together

Using the command \selectlanguage or the environment otherlanguage* are good approaches, but the following method seems to work better. For example, consider 你好,\languagename\languagename. \newif\...
Inverted Pastry's user avatar
1 vote
Accepted

Using ucharclasses and babel together

You must define the transitions. An option is: \setTransitionsForCyrillics{\selectlanguage{russian}}{\selectlanguage{english}} \setTransitionsForChinese{\selectlanguage{chinese}}{\selectlanguage{...
Javier Bezos's user avatar
  • 10.3k
0 votes

Enclose character in framebox for a given font family and a given font size

You could use \vphantom with multiple characters. You want the boxes to have the same height and you also want the boxes to enclose the entire of the characters. Therefore, you need to provide \...
rdrg109's user avatar
  • 717
0 votes

Increase code font size in Texifier editor

Use these steps: Textfier -> Setting -> Editor -> Editor Look & Feel -> Font
Aurora M's user avatar
1 vote

XCharter with old style figures prints 1 like a shortened I instead of 1 like a shortened 1

As I met the problem -1 in osf + Xcharter- I received this answer from Ulrike Fischer : \setmainfont{XCharter.otf}[ CharacterVariant={1:0}, BoldFont = XCharter-Bold.otf , ItalicFont = ...
pierrO Lelou's user avatar
16 votes
Accepted

Help identifying a very strange Fraktur character

The first is lower case x, and the second is upper case E. While the following is not the exact font used, it gives a sample of a font with those two characters with the shapes as you showed. In the ...
Willie Wong's user avatar
  • 25.3k
3 votes

Which math font is used in this document?

The document uses palatino eulervm amssymb \documentclass{article} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{palatino} \usepackage{eulervm} \usepackage{amssymb} \begin{...
egreg's user avatar
  • 1.1m
1 vote

Which math font is used in this document?

\documentclass[12pt]{article} \usepackage[french]{babel} \usepackage{newpxtext} \usepackage{eulervm} \usepackage{amssymb} % Added package for \mathbb \begin{document} Les deux termes de l'égalité sont ...
Sebastiano's user avatar
  • 55.4k
0 votes

How to use lilypond-book with custom fonts?

As the question author did not include any minimal example one can only guess the context. But in my case the context was relevant. My Setup I tried to include custom fonts at three different parts ...
Jony's user avatar
  • 1
3 votes

Setting font face for \mathrm in math mode

You want to choose a different font for \mathrm and fontspec allows this. \documentclass{article} \usepackage{enumitem} \usepackage{babel} \usepackage{unicode-math} \babelprovide[import, onchar=fonts ...
egreg's user avatar
  • 1.1m
3 votes
Accepted

Setting font face for \mathrm in math mode

As you've observed, \mathrm takes the "Roman" (i.e., upright) font face from the prevailing text font, not the prevailing math font. To force usage of the plain (non-bold) upright glyphs ...
Mico's user avatar
  • 510k
1 vote
Accepted

How to import the sole symbol \vBar without the whole fdsymbol package

The general solution is shown in the answers to: Importing a Single Symbol From a Different Font In your case reading fdsymbol.sty could be a bit more complicated. Something like: \documentclass{...
cabohah's user avatar
  • 12.4k
3 votes

Setting multiple language environments in LaTeX

You can do this with Babel (or with Polyglossia, as @cfr has already posted). One advantage to using Babel with LuaLaTeX is that it can automatically detect the language you are typing in and change ...
Davislor's user avatar
  • 44.6k
1 vote

Setting multiple language environments in LaTeX

In future, please always provide compilable code rather than snippets. This makes it easier for people to help and more likely the answers will be applicable to your real document. You can scale the ...
cfr's user avatar
  • 202k
1 vote
Accepted

Text in math environment in algorithm2e has different typography when placed inside a for loop

The command \text is for textual insertions in formulas, respecting the font that's current outside the formula. Text inside \For and the other similar commands of algorithm2e is typeset in italics. ...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Get a colored char from a font

Since the font is contained in TeXLive, you should be able to load it without path. But as is explained nicely over at Overleaf, you may want to try the Harfbuzz renderer (with LuaLaTeX). Note that ...
Jasper Habicht's user avatar
6 votes

How to have italicized double-storey "a"?

I guess you want slanted, rather than italic. \documentclass{article} \DeclareSymbolFont{slantedletters}{OT1}{cmr}{m}{sl} \SetSymbolFont{slantedletters}{bold}{OT1}{cmr}{bx}{sl} \DeclareMathSymbol{a}{\...
egreg's user avatar
  • 1.1m
1 vote

Using Font "Barlow" in PDFLatex?

Posting this here as a likely incorrect answer (it doesn't run in pdflatex per se), but I still believe it's the correct treatment for the problem in the question. First, as the comments say above, ...
exa's user avatar
  • 108
1 vote
Accepted

Using inter font like usual suddenly produces an error in lgrenc.def and prohibits roman family

You are using largely undocumented font packages after installing a very minimal tex installation. The inter package makes everything sans serif, the simplest thing here is probably just load it first ...
David Carlisle's user avatar
0 votes

Does XeTeX 3.141592653 from TeX Live 2024 support variable fonts (specifically, NotoSansMonoCJKSC-VF.otf)?

According to the documentation, current fontspec supports Multiple Master fonts on XeTeX, but not Variable, whereas Variable but not Multiple Master are supported on LuaTeX. fontspec.pdf section 7 ...
cfr's user avatar
  • 202k
0 votes

Does XeTeX 3.141592653 from TeX Live 2024 support variable fonts (specifically, NotoSansMonoCJKSC-VF.otf)?

Reading through the fontspec documentation, it seems that only LuaLaTeX supports variable fonts; fontspec added support for them very recently, in version 2.9a.
nplatis's user avatar
  • 2,200
1 vote
Accepted

Bold not working with NewTx package when writing in Japanese

Apparently, CJKutf8 doesn't understand the b setting for \bfdefault. Italic doesn't make sense for Japanese, though, so you'll always get upright shape. \documentclass[12pt, a4paper, oneside]{report} \...
egreg's user avatar
  • 1.1m
0 votes

telling luaotfload where to look for fonts

The issue appears that fontconfig seems to automatically look in /usr/local/share/fonts without this being explicitly specified in the configuration. However luaotfload doesn't use fontconfig but ...
Paul de Vrieze's user avatar
4 votes
Accepted

Nicer \sqrt with urw-garamond

You might do like ebgaramond-maths which borrows large symbols from Computer Modern. \documentclass{article} \usepackage{amsmath} \usepackage[urw-garamond]{mathdesign} \DeclareFontShape{OMX}{cmex}{m}{...
egreg's user avatar
  • 1.1m
2 votes

Summation Sign Font

Updating 1: 2024/05/03 The \sum symbol is taken from pakage txfonts: see short MWE and of the figure. %% Compile and read me! \documentclass[a4paper,12pt]{article} \usepackage{txfonts} \usepackage[T1]{...
Sebastiano's user avatar
  • 55.4k
2 votes

How can I do the equivalent of \DeclareFontShapeChangeRule which tests 4 targets rather than 3?

Can't you update the fd files to use the new standardised shape names, then do \documentclass{article} \usepackage[T1]{fontenc} \DeclareFontShapeChangeRule {n}{si} {scit} {scsl} \begin{document} ...
David Carlisle's user avatar
3 votes

How can I do the equivalent of \DeclareFontShapeChangeRule which tests 4 targets rather than 3?

What's wrong with changing the .fd file of the font in question (if you maintain it) and add the scit shape and then aliasing the si shape to that shape (just like many fonts alias bxto b). After that ...
Frank Mittelbach's user avatar
3 votes

Vietnamese and Cantarell

If you're tied to pdflatex, you can use a different sans serif font that supports Vietnamese. \documentclass[12pt]{article} \usepackage{ysabeau} \usepackage[utf8]{vietnam} \renewcommand{\rmdefault}{\...
egreg's user avatar
  • 1.1m
4 votes
Accepted

Vietnamese and Cantarell

Use an unicode engine (lualatex): \documentclass[12pt]{article} \usepackage{fontspec} \setmainfont{Cantarell} \usepackage[vietnamese]{babel} \title{Cantarell và Tiếng Việt} \begin{document} \maketitle ...
Ulrike Fischer's user avatar

Top 50 recent answers are included