Please believe me this is not an Off Topic in TEX. Wait and see that I SEARCH the web and go deeply into questions for this but nothing found:

Can we equip ‎AtBeginEnvironment with two option simultaneously? I mean I want to have something like:


which make whole examples a bit smaller in fonts, merged with the code \emph which make the whole body inside example environment unitalic.

What I did is:

\emph{ John Smith}

to do so. Thanks for the hints.

Cosidering David's comment, I added my MWE as follows. It does not work as suggested. Maybe there is a defect in xepersian not working properly. See this plz:

\settextfont[Scale=1.1]{XB Niloofar}\setdigitfont[Scale=1.3]{IRXLotus}
\setlatintextfont[Scale=1.2]{Times New Roman}
با حل دستگاه، ‎$A=4$‎ و ‎$B=5$‏ و ‎لذا‎ داریم:
\displaystyle\int f_2(x)~dx=\displaystyle\int \dfrac{4}{x-3}~dx-

I hope every one can copy the codes and run it personally. If you do that, you will the Persian words are still italic, however, I did the suggested codes.

  • @campa Thanks. I does not change. It is still `small' (which is OK) and is still 'italic' (which is not of interest).
    – Mikasa
    Aug 1, 2019 at 11:13
  • @campa Is it possible that some packages make bad effects such that your code does not work properly? Something like conflicting with each other?
    – Mikasa
    Aug 1, 2019 at 11:22
  • @DavidCarlisle: Thanks David for your hints. Thanks for the time. I'll do what you said in the next time and obey.
    – Mikasa
    Aug 1, 2019 at 12:10
  • 1
    Your example gave a lot of errors due to unicode control characters and if I remove them I do not have the fonts, but you do not want to use AtBeginEnvironment here at all. you have defined the example environment so you can define it not to be italic, see the amsthm package theoremstyle commands. Aug 1, 2019 at 15:49

1 Answer 1


The amsthm package provides several "theorem styles". While the default style, also known as the plain style, is programmed to typeset its body in italics, the remark and definition styles employ upright lettering. I therefore suggest that you insert the instruction


after loading amsthm and before issuing the instruction


(I'm afraid I can't run your MWE as two required fonts -- XB Niloofar and IRXLotus -- are not installed on my system. Sorry.)

  • 1
    Thanks I didn't have time to post a proper answer (after I changed the question:-) Aug 1, 2019 at 16:50
  • Great! Thanks for your consideration. +1
    – Mikasa
    Aug 1, 2019 at 16:56
  • 1
    @DavidCarlisle Thanks David for making the right title and for strong light on my question. You were the pioneer.
    – Mikasa
    Aug 1, 2019 at 16:57
  • @DavidCarlisle - Thanks, David. You figured out what the OP's main issue was -- nothing to do with options being specified in an \AtBeginEnvironment directive...
    – Mico
    Aug 1, 2019 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.