# How to export notebook in PDF with long formulas in traditional format?

I am trying to export notebook in PDF but these formulas below always automatically converts to raw input form such as $a/b$ instead of $\frac{a}{b}$. So it doesn't look nice.
There are many other fractions but all are OK except these long fractions. I have tried a lot of methods from old posts but haven't found anything similar and works for me.

I set these formulas with Bold and font 20. So how to export theses as $\frac{a}{b}$ instead of $a/b$?

iL -> ((-1 + D1 + D2) Vin)/(2 ((-1 + D1 + D2)^2 R2 +
2 (-1 + D1 + D2) D3 R2 + D3^2 (R1 + R2))) ;
V1 -> -(((-1 + D1 + D2) D3 R1 Vin)/((-1 + D1 + D2)^2 R2 +
2 (-1 + D1 + D2) D3 R2 + D3^2 (R1 + R2)));
V2 -> ((-1 + D1 + D2) (-1 + D1 + D2 +
D3) R2 Vin)/((-1 + D1 + D2)^2 R2 + 2 (-1 + D1 + D2) D3 R2 +
D3^2 (R1 + R2));
VCF1 -> -(((-1 + D1 + D2 + D3) ((-1 + D1 + D2) R2 +
D3 (R1 + R2)) Vin)/((-1 + D1 + D2)^2 R2 +
2 (-1 + D1 + D2) D3 R2 + D3^2 (R1 + R2)));
VCF2 -> -((D3 ((-1 + D1 + D2) R2 +
D3 (R1 + R2)) Vin)/((-1 + D1 + D2)^2 R2 +
2 (-1 + D1 + D2) D3 R2 + D3^2 (R1 + R2)));

• If you are writing using LaTeX, you can use TeXForm[put expression here], copy, paste in the TeX-document and when you convert it to pdf it has the form that you want. – DiSp0sablE_H3r0 Mar 25 '18 at 23:59
• I don't use LaTex in this notebook, just press Ctrl + / and fill out the formula. – anhnha Mar 26 '18 at 0:02
• Not in this formula. I meant if you want to use LaTeX to produce the pdf-file you want. – DiSp0sablE_H3r0 Mar 26 '18 at 0:03
• Yes, do you have any idea how to make those formulas above display $\frac{a}{b}$ in PDF? – anhnha Mar 26 '18 at 0:05
• Give me a second. I will post an answer. – DiSp0sablE_H3r0 Mar 26 '18 at 0:05

If you take for example the first expression and put in Mathematica

TeXForm[((-1 + D1 + D2) Vin)/(2 ((-1 + D1 + D2)^2 R2 +
2 (-1 + D1 + D2) D3 R2 + D3^2 (R1 + R2)))]


The output is

\frac{\text{Vin} (\text{D1}+\text{D2}-1)}{2 \left(2 \text{D3} \text{R2} (\text{D1}+\text{D2}-1)+\text{R2} (\text{D1}+\text{D2}-1)^2+\text{D3}^2 (\text{R1}+\text{R2})\right)}

And the pdf-file looks like

I hope that it is what you wanted.

Cheers!!!

• Thanks. But I only want to export the formula not including input like TeXForm[]. How to make the formula display as input? – anhnha Mar 26 '18 at 0:15
• Sorry, I just saw that. If you copy the output of the TeXForm command, you will only export the formula, unless I don't understand what you want to do. – DiSp0sablE_H3r0 Mar 26 '18 at 0:58
• Well, I tried but PDF file the formula is clutter like output above and this link: imgur.com/KpmRHwC – anhnha Mar 26 '18 at 2:45
• And if you take that expression and compile it into a LaTeX file it should give you a nice looking fraction. I mean all the thing with the frac, etc etc – DiSp0sablE_H3r0 Mar 26 '18 at 2:48
• But I need to export PDF file because these formulas is in a big file. – anhnha Mar 26 '18 at 2:53