This is a very strange question I encountered...so I am using the "NewDocumentCommand" from xparse. I have the following codes in my "test.sty" file (just a simple example):
\usepackage{xparse}
\usepackage{amssymb}
\NewDocumentCommand{\Test}{e{_}}{\mathbb{T}_{#1}}
I have the following codes in my .tex file:
\documentclass{article}
\usepackage{amssymb,test}
\begin{document}
\[\Test_{n}\]
\end{document}
Now, if I run this using TexShop on my Mac, it shows the error message
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
./test.sty:3: LaTeX error: "xparse/unknown-argument-type"
!
! Unknown argument type '_' replaced by 'm'.
!
! See the LaTeX3 documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.3 ...cumentCommand{\Test}{e{}}{\mathbb{T}{#1}}
?
?
However, when I run it on overleaf, it goes through and produces the expected result. I also asked a friend to run this on his TexShop, and it also goes without error.
So, I guess the issue is not with my code, but with my TexShop. I updated it to the latest ver 4.68 but the problem persists. I tried to change some configurations/settings but I don't know what could be possibly related to this phenomenon. Does anyone have any ideas? Thanks!
eargument type was added around 2018, I think). You'll need to update – Phelype Oleinik Jan 13 '22 at 01:16\listfilesto your preamble and include the part of the.logthat lists the package versions currently being used with your file. Also see Which package version am I using? – Werner Jan 13 '22 at 01:18