2

I am trying to make the following in LaTeX:

enter image description here

However, I have the following error when I try to make something like this using \left and \right:

Please use \mathaccent for accents in math mode.
\add@accent ...@spacefactor \spacefactor }\accent 
                                              #1 #2\egroup \spacefactor ...
l.121 \[\left\{ tasa de acumulació
                               n del componente j \right\} 

my MWE is the following:

\documentclass[a4paper,openright,12pt]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc} 
\usepackage{amsmath}

\begin{document}

\[\left\{ tasa de acumulación del componente j \right\}

\end{document}

Thank you in advance

  • 1
    Try \parbox{width}{text} . You are using accented letters which is not allowed in math mode. The parbox switches to regular text and you'll be fine. The wrap the parboxes with the math mode braces like you have been doing. – daleif Feb 26 '18 at 6:35
1
  • equation is not complete, missing is \] for its closing
  • for text in equation consider daleif comment, i.e., employ a \parbox.

enter image description here

\documentclass[a4paper,openright,12pt]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newlength\mylen

\begin{document}
\settowidth\mylen{tasa de acumulación} % compute width of \parbox
\[
\left\{ \parbox{\mylen}{tasa de acumulación del componente $j$} \right\}
\]

\end{document}
  • 1
    i first found that acumulación has letter which is not accessible with pdflatex. but now i see, that it works also with it. i will correct this – Zarko Feb 26 '18 at 11:41
  • 1
    +1. I've edited the answer to take away the guesswork of how wide the parbox should be. Feel free to revert. – Mico Feb 26 '18 at 12:14
  • 1
    i made this computation by hand (count number of letters and spaces ...). of course your solution is more accurate (better). thank you very much! – Zarko Feb 26 '18 at 12:18
  • Worked perfectly Mico and Zarko!! Thank you so much – user151562 Feb 27 '18 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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