25

Please refer to the information present at the image attached.

The last image is the one I get when I type the code suggested in the same image, for which the author gets exactly the visual symbol I would like to get.

Important: I don´t want to mess up with previous document configurations, therefore I believe that what I need is to make a "local inibition" of the general document configuration, so that for this specific symbol I can get what I want.

I hope I could be understood. Not a native speaker, sorry for that.

Thanks a lot! fskilnik.enter image description here

fskilnik
  • 355
  • 1
    Welcome! You appear to be doing \usepackage{fourier}; is it the case? – egreg Feb 19 '17 at 20:22
  • 1
    Hi egreg!

    Thanks for the reply... yes, among MANY others... :(

    The problem is that I am not authorized to mess with that...

    Look at them:

    \usepackage[T1]{fontenc}

    \usepackage[utf8]{inputenc}

    \usepackage{fourier}

    \usepackage[brazil]{babel}

    \usepackage{amssymb}

    \usepackage{amsfonts}

    \usepackage{amsmath}

    \usepackage{amsthm}

    \usepackage{mathtools}

    – fskilnik Feb 19 '17 at 21:05
  • 1
    Hi egreg!

    Thanks for the reply... yes, and taking it out I get what I wanted, so you are right about your intuition but... when I take out this package, all the document is altered, therefore I really need to put the package "to sleep" only for one line of coding... is it possible? Thanks a lot!

    – fskilnik Feb 19 '17 at 21:11

1 Answers1

31

Just revert \mathcal to using Computer Modern Symbols:

\documentclass{article}
\usepackage{fourier}

% add these two lines to your long preamble    
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\SetMathAlphabet{\mathcal}{bold}{OMS}{cmsy}{b}{n}

\begin{document}

$\mathcal{O}(n\log n)$

\end{document}

enter image description here

Actually I'd prefer to add also

\newcommand{\bigO}{\mathcal{O}}

so the formula can be written

$\bigO(n\log n)$

This has the advantage that you're free to redefine \bigO without having to change the document, except for one line.

If you just want that big O, but also want to keep the calligraphic letters from fourier, use

\documentclass{article}
\usepackage{amsmath}
\usepackage{fourier}

\DeclareRobustCommand{\bigO}{%
  \text{\usefont{OMS}{cmsy}{m}{n}O}%
}

\begin{document}

$\bigO(n\log n)$

\end{document}
egreg
  • 1,121,712
  • 1
    Perfect, egreg! Thanks A LOT for your time and information provided, not to mention the solution itself! Regards, fskilnik. [I have clicked the "green check symbol" and also the "answer was useful" , both at the left of your answer. If I need to do something else, please let me know about it! :) ] – fskilnik Feb 19 '17 at 21:24
  • 1
    I am back, egreg... "we" have a problem... ALL \mathcal cases were converted to the new "non-fourier" style, but apart from the \mathcal{O} , they were great.

    I mean: could you please adapt your solution so that we create only "an alphabet" for the \mathcal{O} situation, please?

    Thanks a lot, again!

    – fskilnik Feb 20 '17 at 14:41
  • 1
    @fskilnik To be honest, I'd simply write O(n\log n), but I added how not to change \mathcal and have the big O you like. – egreg Feb 20 '17 at 15:17
  • 1
    It worked EXACTLY as you mentioned, and EXACTLY as I would like it to... thanks a lot. As far as your comment, I totally agree, but I must say my goal was never the one we have started with, that is, to use the Landau´s symbol... The fact is that the beautiful "bigO" you provided is also used as "bigO (Omega)" to mention functions that are holomorphic on the open set Omega (say of the complex field C or of C^n)... this "O" is to honour "Oka", a Japanese mathematician, by the way. That´s why I would like the symbol the way you kindly provided it! Regards, fskilnik. – fskilnik Feb 20 '17 at 18:17