Answer Box size in Formula equation

Answer Box size in Formula equation

di Ahmad Amer -
Numero di risposte: 3

Salam,

How do I deal with the answer box sizes + answer font sizes? 

I want each answer box to be in a different size (coefficient answer box bigger than exponent answer box),

How do I edit to make it so?

(+ how do I change the font size inside the answer boxes?)

Thanks


Media dei voti:  -
In riposta a Ahmad Amer

Re: Answer Box size in Formula equation

di Dominique Bauer -
Immagine Documentation writers Immagine Particularly helpful Moodlers Immagine Plugin developers
You could have found how to do this by looking at the "Exponential identities 4" and "Exponential identities 7" examples at https://moodleformulas.org/course/view.php?id=78&section=3 ↗.

Note that :eq(0) refers to the first input box, :eq(1) to the second, and so on.

Anyway, here is your question:

Formulas_20200827_1403.png


In riposta a Dominique Bauer

Re: Answer Box size in Formula equation

di Ahmad Amer -
In the equation you provided,
how did you get different font-sizes for the coefficient and for the exponent?
what am I missing in my code to make them appear in different font-sizes?
Thanks.
In riposta a Ahmad Amer

Re: Answer Box size in Formula equation

di Dominique Bauer -
Immagine Documentation writers Immagine Particularly helpful Moodlers Immagine Plugin developers
In the XML file that I attached in my previous post, look at the HTML code of the Part's text where you will see:

\(
  \large{
     \dfrac{{a}x^{{c}}}{{b}x^{{d}}} = \hspace{39px} x
  }
\)
<div style="display:inline-block;
            position:relative;
            font-size:120%;
            font-family:'Times New Roman'; 
            left:-53px;
            top:0px">
  {_0}
</div>
<div style="display:inline-block;
            position:relative;
            font-size:80%;
            font-family:'Times New Roman';
            left:-38px;
            top:-6px;">
  {_1}
</div>
where
font-size:120%; 
makes a larger font and
font-size:80%; 
 a smaller one. Note that you can adjust the percentage as needed.