LaTeX forum ⇒ Fonts & Character SetsMath capital characters Topic is solved

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sat Mar 23, 2024 1:53 pm

Good morning,
This is a test example:
************************************************************
\documentclass{book}

\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts,xfrac,pifont,bbold,physics}

\title{MATH CAPITALS TEST}
\author{Jon A. Gomez}
\date{March 2024}

\begin{document}

This is mathcal test:

$\mathcal{A,H,L}$

This is mathscr test:

$\mathscr{A,H,L}$
\end{document}

***********************************************************************
The compiled text that I get corresponds with fonts \mathcal and \mathsrc

Nevertheless, on my document, in which I have coded in the preamble:
\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts,xfrac,pifont,bbold,physics}


But, when I compile, the compiler gives the wrong font for
\mathcal
: it gives a font corresponding to
\mathscr


Can anyone help me on this issue?

Thanks so much,
Jon

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10159
Joined: Mon Mar 10, 2008 9:44 pm

Math capital characters

Postby Stefan Kottwitz » Sat Mar 23, 2024 7:47 pm

Hi Jon,

try this:

\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}


Stefan
LaTeX.org admin

Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sat Mar 23, 2024 8:48 pm

Hi Stefan,
I've included
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
before
\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts,xfrac,pifont,bbold,physics}

And the problem still continues.
On the other hand, I've made a test with
\usepackage[mathscr]{euscript}
and the command
$\mathscr{A}$
and have get an A letter in Euler type, which in fact is different to calligraphic type, the one I am trying to use (and so getting the good Lagrangian font).

Thanks again for your help. Hope you will finally get the right solution!

Best reghards,
Jon
Last edited by Jongomez on Sat Mar 23, 2024 8:54 pm, edited 1 time in total.

Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sat Mar 23, 2024 8:50 pm

.../.. sorry, Stefan, I've forgot to say that your proposal didn't work.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10159
Joined: Mon Mar 10, 2008 9:44 pm

Math capital characters

Postby Stefan Kottwitz » Sat Mar 23, 2024 8:58 pm

Hi Jon,

Your example in the first post works correctly when I click on "Run LaTeX here." You said it doesn't work in your document, but don't show what you are doing differently there.

My proposal is a fix for some cases, like when another font, such as mathptmx, causes such a problem. I suggest that instead of describing some things you do (that I cannot emulate here), post a small example that has the issue so it can be fixed there.

Stefan
LaTeX.org admin

Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sat Mar 23, 2024 11:12 pm

Hi Stefan,
I'll try to to as you suggest. Anyway, I supposse that I must include most of the preamble and a small part of the document, since the error could come from the configuration og the preamble. What do you think?

Jon

Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sat Mar 23, 2024 11:33 pm

Here is the example, When compiled you will see that in the third line it appears the wrong character A. (text taken from my document).
*********************************************************************************************
\documentclass[11pt,a4paper,oneside,openright,]{book}
\usepackage{graphicx,scalerel} % Required for inserting images +  anchura hat
\usepackage[margin=1.2in]{geometry} 
\usepackage[toc,page]{appendix}
\usepackage{enumitem}
\usepackage{natbib}
\usepackage{lipsum}
\usepackage{caption}
\usepackage[T1]{fontenc}
\usepackage{titlesec, blindtext, color}

\usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts,xfrac,pifont,bbold,physics}

\usepackage [utf8]{inputenc}
\usepackage[breakable, theorems, skins]{tcolorbox}
\usepackage{mathtools}
\usepackage[spanish]{babel} % español

\usepackage[breakable, theorems, skins]{tcolorbox}
\usepackage[colorlinks = true,
            linkcolor = red,
            urlcolor  = blue,
            citecolor = red,
            anchorcolor = red]{hyperref}

\usepackage{booktabs}
\usepackage{soul}
\usepackage{frcursive}
\usepackage{enumitem}
\usepackage{fouriernc}  %% Type of font
\newcounter{micontador}
\usepackage{float}
\usepackage[section]{placeins}
\usepackage{imakeidx}

\makeindex[columns=2, title=Índice de términos]
\usepackage{relsize}
\usepackage{nicefrac}
\usepackage{engord}
\spanishdecimal{.}
% --
\usepackage{footnote}
\makesavenoteenv{tabular}

%**SEPARACION PARRAFOS**
\setlength{\parskip}{0.5\baselineskip plus2pt minus2pt}
\newcommand{\cmark}{\ding{51}}
\newcommand{\xmark}{\ding{55}}
%%%%%%%*multicolumnas%%%%%%%
\usepackage{multirow} 
\usepackage{array}

\DeclareCaptionLabelFormat{custom}
{#1 \textbf{#2}}
% Separator style
\DeclareCaptionLabelSeparator{custom}{colon}
% Caption format 

\DeclareCaptionFormat{custom}
{ #1\textbf{#2}\small{#3}}
\makeatletter
\makeatother
\usepackage{emptypage}

\begin{document}
Vamos a exponer una suposición oculta que no tuvimos en cuenta en el \textit{Volumen I}. Un experimento implica algo más que un sistema a estudiar. \textbf{También implica un aparato} $\mathcal{A}$ para hacer mediciones y registrar los resultados de las mediciones.
\end{document}


Good luck!

Jon

User avatar
Stefan Kottwitz
Site Admin
Posts: 10159
Joined: Mon Mar 10, 2008 9:44 pm

Math capital characters  Topic is solved

Postby Stefan Kottwitz » Sat Mar 23, 2024 11:38 pm

Hi Jon,

with this example that shows the issue, it's clear; it's because of loading the fouriernc font; just use my proposed line after that.

Stefan
LaTeX.org admin

Jongomez
Posts: 44
Joined: Tue Nov 28, 2023 9:29 pm

Math capital characters

Postby Jongomez » Sun Mar 24, 2024 12:17 am

Perfect Stephan, it worked!

Thanks a lot for your support.
Best regards,
Jon


Return to “Fonts & Character Sets”

Who is online

Users browsing this forum: No registered users and 5 guests