0

I would like to know if stmaryrd and stix package are mutually compatibile and even if they are compatible with the packages I use into the following code: indeed, I see that \Lbag and \Rbag delimiters are different (is right?) into stmaryrd and stix package and moreover I see there appear other symbols which are present into amssymb package but strangerly I did not find any incompatibile into the linked guides.

\documentclass[10pt]{article}

\usepackage[paperheight=29.7cm,paperwidth=21cm,textwidth=17cm,textheight=25 cm]{geometry} \usepackage{layout} \usepackage{titlesec} \usepackage[hang,flushmargin]{footmisc} \usepackage{hyperref} \usepackage{caption} \usepackage{soulutf8} \usepackage[T1]{fontenc} \usepackage{fontsize} \linespread{1.5}

\usepackage{amsfonts} \usepackage{mathrsfs} \usepackage{yfonts}

\usepackage{enumitem} \usepackage{amssymb}

\usepackage{amsmath} \usepackage{amsthm}

\setcounter{footnote}{-1} \setcounter{equation}{-1}

\newtheorem{lemma}[equation]{Lemma}

\newtheorem{proposition}[equation]{Proposizione}

\newtheorem{corollary}[equation]{Corollario}

\newtheorem{theorem}[equation]{Teorema}

\hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %I get the following code from here to manipulate the fontsize of an equation. \ExplSyntaxOn \NewDocumentEnvironment{sequation}{O{\small}b} { \yufip_sequation:nnn {equation}{#1}{#2} }{} \NewDocumentEnvironment{sequation}{O{\small}b} { \yufip_sequation:nnn {equation}{#1}{#2} }{} \cs_new_protected:Nn \yufip_sequation:nnn { \begin{#1} \mbox{#2$\displaystyle#3$} \end{#1} } \ExplSyntaxOff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document} % Here I wrote my document using some mathematical symbols as \cup, \cap, \bigcup, \bigcap, \setminus, \bot, \top, \rightthreetimes, \leftthreetimes, \odot, \oplus etc... and any any mathematical fonts as \mathcal, \mathfrak and \mathscr \end{document}

So could someone help me, please?

  • what do you mean by compatible here? are you asking if they look well together (the usual meaning of "compatible" or if the packages give errors if both loaded or .... ? – David Carlisle Jun 01 '23 at 18:22
  • @DavidCarlisle Some time ago I added MnSymbol package but it was not compatible with amssymb: e.g. it changed \setminus symbol and even calligraphic letters; moreover the compilator reported any errors which I did not understand where find exactly. – Antonio Maria Di Mauro Jun 01 '23 at 18:24
  • your example does not use stix or stix2 packages either uses a lot of font families (out of maximum 16) it doesn't make sense to load amsfonts stix mathrfs yfonts and stmaryrd al at the same time . don't make us guess a failing example, show an example of your problem – David Carlisle Jun 01 '23 at 18:39
  • @DavidCarlisle Okay: I have to use stmaryrd to use \Lbag and \Rbag whereas I have to use stix to use \cupplus and \capdot but I see that \lbag and \rbag commands are in both as it was for \setminus with MnSymbols and amssymb so that I would like to understand if I can use now stmaryrd and stix contemporary. – Antonio Maria Di Mauro Jun 01 '23 at 18:43
  • mnsymbols and stix (use stix2) are complete alternatves to amssymb using different encodings so do not mix those three but stmaryrd like mathrfs is just adding an extra font so wont clash unless you run out of fonts. but do you really need stmaryrd \Lbag in addition to stix2 \lbag (⟅) ??? – David Carlisle Jun 01 '23 at 18:53
  • @DavidCarlisle Well If I use \Lbag and \Rbag by stmaryrd it would be better: so I can use stmaryrd and amssymb contemporary? However, I understood I cannot add stix but I did not understand if the same if for sitx2: could you explain better, please? – Antonio Maria Di Mauro Jun 01 '23 at 18:58
  • 1
    as I said, you can use stix if you wish, just not at same time as amsymb and mnsymbol, but really your question isn't clear enough to answer. You post an error free document and ask if you make some unspecified changes if you will get errors. Just define what you want, and if you get errors, ask a new question asking about the error – David Carlisle Jun 01 '23 at 19:05

1 Answers1

3

You use either stmaryrd or stix2. And don't load amssymb if you choose stix2: this package aims to have as wide coverage of math symbols as possible.

Now, I may understand that you prefer \Lbag and \Rbag from stmaryrd instead of the symbols provided by stix2.

It's really simple (I only load the required packages):

\documentclass{article}
\usepackage{amsmath}
\usepackage{stix2}
\usepackage[only,Lbag,Rbag]{stmaryrd}

\begin{document}

$\Lbag x\Rbag$ from stmaryrd

$\lbag x\rbag$ from stix2

\end{document}

enter image description here

However, since stix2 changes the standard \DeclareMathSizes, you may want to make stmryrd fully scalable.

\documentclass{article}
\usepackage{amsmath}
\usepackage{stix2}
\usepackage[only,Lbag,Rbag]{stmaryrd}

\DeclareFontFamily{U}{stmry}{} \DeclareFontShape{U}{stmry}{m}{n} { <-5.5> stmary5 <5.5-6.5> stmary6 <6.5-7.5> stmary7 <7.5-8.5> stmary8 <8.5-9.5> stmary9 <9.5-> stmary10 }{}

\begin{document}

$\Lbag x\Rbag$ from stmaryrd

$\lbag x\rbag$ from stix2

\end{document}

This avoids annoying warnings and uses the correct sizes in sub/superscripts.

In case you're short of math groups, you can obtain the same effect in a slightly more complicated way.

\documentclass{article}
\usepackage{amsmath}
\usepackage{stix2}

\DeclareFontFamily{U}{stmry}{} \DeclareFontShape{U}{stmry}{m}{n} { <-5.5> stmary5 <5.5-6.5> stmary6 <6.5-7.5> stmary7 <7.5-8.5> stmary8 <8.5-9.5> stmary9 <9.5-> stmary10 }{} \DeclareRobustCommand{\Lbag}{\mathopen{\text{\usefont{U}{stmry}{m}{n}\symbol{"48}}}} \DeclareRobustCommand{\Rbag}{\mathclose{\text{\usefont{U}{stmry}{m}{n}\symbol{"49}}}}

\begin{document}

$\Lbag x\Rbag$ from stmaryrd

$\lbag x\rbag$ from stix2

\end{document}

egreg
  • 1,121,712