1

I was trying to enlarge a bit some equations, and I tried EVERYTHING.

\large \Large \begin{large} \mathlarger..

None of those commands work. I don't know what to try. Does anyone have some idea?

If this help, here is my LaTeX "starting code":

\documentclass[danish, a4paper, 12pt]{report}
%\documentclass{article}
\usepackage[paperheight=28cm, paperwidth=20cm, margin=2cm]{geometry}
\usepackage[T1]{fontenc}
\usepackage[urw-garamond]{mathdesign}
\usepackage[english]{babel}
%\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\usepackage[usenames,dvipsnames]{color}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{tabularx}
\usepackage{amsopn}
\usepackage{xparse}
\usepackage{physics}
\usepackage{wasysym}
\usepackage{pstricks}
\usepackage{pspicture}
\usepackage{mathrsfs}
\graphicspath{{"Immagini/"}}
\usepackage{mathtools}
\DeclarePairedDelimiter\ceil{\lceil}{\rceil}
\DeclarePairedDelimiter\floor{\lfloor}{\rfloor}
\definecolor{ballblue}{rgb}{0.13, 0.67, 0.8}
\definecolor{apple}{rgb}{0.55, 0.71, 0.0}
\definecolor{awesome}{rgb}{1.0, 0.13, 0.32}
\definecolor{azure}{rgb}{0.0, 0.5, 1.0}
\newcommand\Large{\@setfontsize\Large\@xviipt{22}}
\DeclareMathOperator{\de}{\text{d}}
\newenvironment{sistema}%
{\left\lbrace\begin{array}{@{}l@{}}}%
{\end{array}\right.}
\renewcommand\theequation{\arabic{equation}}

\begin{document}

cui e chiesto un tempo $t^*$ per il quale il peso e il doppio, ossia
$$P(t^*)=2P_0$$
Si agisce come prima, solo che in questo caso l'incognita è il tempo,
e si scrive
$$2P_0 = \scalebox{2}{e^{\frac{\ln(1.4)}{30}\ t^*}}$$

\end{document}

As you can see, I also tried with

\newcommand\Large{\@setfontsize\Large\@xviipt{22}}

and nothing happens...

After having tried with "scale box" and after having failed again... here is a screenshot of the log.

enter image description here

Au101
  • 10,278
Henry
  • 378
  • 3
    No indeed, these commands apply to text, but not to mathematical equations and objects. Try http://tex.stackexchange.com/questions/3703/make-equations-large, http://tex.stackexchange.com/questions/7462/how-to-make-math-symbols-bigger, http://tex.stackexchange.com/questions/160437/larger-font-size-in-math-display-equation-environment, http://tex.stackexchange.com/questions/94232/setting-math-font-size/95688#95688 All good resources – Au101 Nov 28 '16 at 20:06
  • @Au101 Ah lol! That was the error! Thank you! – Henry Nov 28 '16 at 20:07
  • @Au101 First try with "scale box": failed. I'll search for other ways... – Henry Nov 28 '16 at 20:10
  • 2
    Well in that case, the best thing for you to do is rather than asking about the general case, give us an MWE which demonstrates your setup (all relevant packages, but none of the irrelevant ones ideally) and an equation to experiment with. Then it might be easier to find out why the generic methods aren't working for you and suggest the correct approach – Au101 Nov 28 '16 at 20:11
  • @Au101 Edited with a screenshot. Packages and all what I used are those I wrote above. The only error lies within that row.. – Henry Nov 28 '16 at 20:19
  • 1
    Thanks for adding :) Copying and pasting the code in like you did before is by far the preferred method, because then we can copy and paste it from your question, straight into a file, and start playing around. Whereas with a screenshot, we'd have to type it all out ourselves! Also, an ideal MWE would not have unnecessary extra code like \definecolor{awesome}{rgb}{1.0, 0.13, 0.32} which is clearly not related to the problem – Au101 Nov 28 '16 at 20:25
  • But an MWE which has too much in it is better than one which has not enough in it, so don't worry about that too much, but it will really help you get the best answers if you focus on producing good MWEs, the easier it is to help you, the better it is for you, I think :) – Au101 Nov 28 '16 at 20:25
  • @Au101 Sorry for that, I thought that having all the code would have been better >.< – Henry Nov 28 '16 at 20:27
  • No worries! It's definitely better than leaving out something which does turn out to be relevant. The number of questions which get answers only for the OP to reveal that it doesn't work because they're using package foo is astonishing. But, still, it's definitely good to learn about minimising your examples, it can only help you, because otherwise the problem can easily be lost in loads of unnecessary code. Also if you load a non-standard package, people may even have to go to the trouble of installing it before they can even start on your problem. Clearly this doesn't help you – Au101 Nov 28 '16 at 20:30
  • @Au101 You're right indeed. The fact is that everything I tried, does not work.. Even the math larger command. I clearly don't know what to do, I read lots of answer but they did not help.. – Henry Nov 28 '16 at 20:32
  • LaTeX can do INCREDIBLE things with VERY SIMPLE commands.

    Why has this one to be that complicated?

    – Henry Nov 28 '16 at 20:33
  • 3
    Whatever else you may do, remove the instruction \newcommand\Large{\@setfontsize\Large\@xviipt{22}} from the preamble. I can't possibly work; for one, \Large is already defined by LaTeX; hence, \newcommand\Large{...} must throw an error message. – Mico Nov 28 '16 at 20:45
  • @Mico I removed that line already! :D – Henry Nov 28 '16 at 20:47
  • 1
    @AlanTuring I'm not sure why you found it complicated, \large\begin[equation}1=2\end{equation} would make a large equation (there is some fine tuning you could do the vertical space but the equation will be large) – David Carlisle Nov 28 '16 at 20:51
  • @DavidCarlisle .... And here we are... probably it's because I use $$ instead of begin{equation}... – Henry Nov 28 '16 at 20:52
  • 2
    @AlanTuring no \large$$1=2$$ would be large as well (but actually I see you only wanted to make a subterm large, in which case $$a=\mbox{\large$\sqrt{x}$}$$ would work as well. (but $$ is not latex syntax. – David Carlisle Nov 28 '16 at 20:53
  • @Oh, really? I learnt the $$ command from my thesis supervisor, I thought it was a super awesome command, rather than writing \begin{equation} etc every time.. lol – Henry Nov 28 '16 at 20:54
  • 2
    @AlanTuring $$ ... $$ is a TeX command. It should not be used in LaTeX, there are many things wrong with it. The LaTeX shorthand is \[ ... \]. This is what you need to use. Note one immediate advantage, it's easy to see where it starts \[ and where it ends \]. If I am looking at your source code and I see $$ how do I know whether I am entering or leaving display math mode? – Au101 Nov 28 '16 at 20:56

2 Answers2

4

You've shown us a lengthy preamble so far but no code that actually attempts to change the math font size.

Anyway, it is entirely possible to change the font sizes used in math mode, as the following MWE demonstrates.

enter image description here

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\newcommand\pyth{$a^2+b^2=c^2$}
\usepackage{amsmath,mathdesign}
\begin{document}
\obeylines
\pyth
\large\pyth
\Large\pyth
\LARGE\pyth
\huge\pyth
\Huge\pyth
\end{document}
Mico
  • 506,678
  • Yeah but I don't want to create N newcommand for all the equations I have to write. Or am I missing something? – Henry Nov 28 '16 at 20:27
  • P.s. the math font size changer should be "scalebox" and I wrote it. And I read it comes from the graphicx package, which I use! – Henry Nov 28 '16 at 20:29
  • 1
    @AlanTuring - Yes, you are missing something: the purpose of the \pyth macro. It is certainly not necessary to define macros to contain the equations. You may verify that this assertion is true by replacing every instance of \pyth in the body of the text with $a^2+b^2=c^2$ -- or any other equation you care about... -- and recompiling the code. – Mico Nov 28 '16 at 20:33
  • Uhh! Going to try! I did not know that :D – Henry Nov 28 '16 at 20:34
  • Nothing works... – Henry Nov 28 '16 at 20:36
  • The \scalebox can process both text mode and math mode material. I don't see any necessity for \scalebox here. – Mico Nov 28 '16 at 20:36
  • 1
    @AlanTuring - "Nothing works" is rather unspecific. My MWE obviously does work. I assume you're doing "something else" and that this "something else" isn't working. Sadly, I'm no clairvoyant. Unless you tell us what you're actually doing, the likelihood that anyone will be able to offer specific and helpful advice is going to be negligibly small. – Mico Nov 28 '16 at 20:38
  • I am doing nothing.. My preamble is that I wrote above, and what I tried now was simply your macro. But nothing changed, the formula is still small – Henry Nov 28 '16 at 20:40
  • @AlanTuring It works for me if I remove \usepackage[urw-garamond]{mathdesign}. Try removing that, tell me if it works or not, and then we'll know whether the problem is there or not. Myself I do not have this font so I can't experiment – Au101 Nov 28 '16 at 20:44
  • @Au101 If I remove that package, lots of other errors pop up -.- Sigh – Henry Nov 28 '16 at 20:46
3

You definitely not want to scale parts of the equation, but rather use the proper way of setting it.

By the way, why asking for Danish when the document appears to be in Italian?

\documentclass[a4paper]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}

\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}

\chapter{Some examples}

\section{Bad example}

Ecco una formula composta male. Si agisce come prima, solo
che ora l'incognita è il tempo, e si scrive
\[
2P_0=\scalebox{2}{$e^{\frac{\ln(1.4)}{30}\ t^*}$}
\]
Ecco la stessa formula composta correttamente. Si agisce come
prima, solo che ora l'incognita è il tempo, e si scrive
\[
2P_0=\exp\biggl(\frac{\ln(1.4)}{30}t^*\biggr)
\]

\end{document}

Note that $$ should never be used in LaTeX. Using \large or \Large instead of \scalebox would not solve the main issue, even if they worked in math mode, which they don't.

enter image description here

If you insist on the exponential notation, you can type

\[
2P_0=e^{(\ln(1.4)/30)t^*}
\]

to get

enter image description here

Two story fractions in exponents should be avoided as long as possible.

egreg
  • 1,121,712