Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I need to make this equation in LateX but I get some errors when i try to do that.

enter image description here

Can you help me please??

share|improve this question
3  
Hi and Welcome to TeX.sx. Could you post what code you've tried as a complete, compilable document (even if it yields errors). –  Alan Munn Jan 5 at 21:26
    
Now im using this code: [{CTrain}_{Tot}= 4h*10\frac { \euro }{ h*pers } *1500pers] but i get "e" and not "€" i had already import the package "eurosym" –  dadem Jan 5 at 21:57

3 Answers 3

up vote 6 down vote accepted

I'd consider using siunitx for this kind of things:

\documentclass{article}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{eurosym}

\DeclareSIUnit{\pers}{pers}
\DeclareSIUnit{\EUR}{\text{\euro}}
\sisetup{
  per-mode = fraction,
  inter-unit-product = \ensuremath{{}\cdot{}},
}

\begin{document}
\[
\mathit{Ctrain}_{\textup{Tot}}=
\SI{4}{h}\cdot \SI{10}{\EUR\per\hour\per\pers}\cdot\SI{1500}{\pers}
\]
\end{document}

enter image description here

share|improve this answer
    
wonderful! thx man! i dont understand every row of your code but thx! –  dadem Jan 5 at 22:16
    
@dadem siunitx is a very powerful and customizable package; give a look at its manual. –  egreg Jan 5 at 22:21

Because you do not give more information I can only guess what documentclass you are using and what errors you are fighting. I have added two examples:

\documentclass{article}
\usepackage{lmodern,textcomp}
\usepackage{eurosym}
\usepackage{amsmath, amssymb}

\begin{document}

${\text{Ctrain}_{\text{Tot}}=4h*10 \frac{\mbox{\euro}}{h*\text{pers}}*1500\text{pers}}$

or

${\text{Ctrain}_{\text{Tot}}=4h*10 \frac{\text{\euro}}{h*\text{pers}}*1500\text{pers}}$

\end{document}

You should also use the search function! There is an excellent answer here.

share|improve this answer
    
I get answer from @egreg already try the solution that you linked to me but doesn't work. Solution form egreg was very good! –  dadem Jan 6 at 9:31

use this in between $ signs :

 { CTrain }_{ Tot }\quad =\quad 4h*10\frac { \euro  }{ h*pers } *1500pers

To be able to use this code you must first import required package for euro sign. You can use any one of following packages:

  • eurosym
  • eurosans

If this is not working on your tex/latex editor use the following link:

http://www.codecogs.com/latex/eqneditor.php

share|improve this answer
    
already use it! but i still have the problem with € symbol –  dadem Jan 5 at 22:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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