1
\documentclass[sn-mathphys]{sn-jnl} %\documentclass{article}

\begin{document}

\begin{equation*}
  |u|_{p(x)}=\inf\left \{\tau>0;\int_{\Omega}\left|\frac{u}{\tau}\right|^{p(x)}\,dx\leq 1\right\}.
\end{equation*}

\end{document}

I can't figure out why this code won't work. Thanks

! Missing delimiter (. inserted).
<to be read again> 
                   \let 
l.6 ...(x)}=\inf\left \{\tau>0;\int_{\Omega}\left|
                                                  \frac{u}{\tau}\right|^{p(x...

? 
4
  • 1
    please always provide a complete small document not just a fragment, in particular equation* is not defined by default, so we have to guess which packages to load Commented Feb 17, 2022 at 19:08
  • Assuming a package or class, I'm not getting an error.
    – Teepeemm
    Commented Feb 17, 2022 at 19:09
  • If I define equation* by loading amsmath then your fragment gives no error. Commented Feb 17, 2022 at 19:09
  • 1
    I wrapped your fragment in \documentclass...\end{document} please further edit so that the code produces the error shown. Commented Feb 17, 2022 at 19:11

1 Answer 1

1

The posted code produces no error, and you have only shown a fragment of the error message. If I edit your example to produce the error, so the input is

\documentclass{article}
\usepackage{amsmath}
\begin{document}

\begin{equation*}
  |u|_{p(x)}=\inf\left x\{\tau>0;\int_{\Omega}\left|\frac{u}{\tau}\right|^{p(x)}\,dx\leq 1\right\}.
\end{equation*}

\end{document}

The the error message is

! Missing delimiter (. inserted).
<to be read again> 
                   x
l.6   |u|_{p(x)}=\inf\left x
                            \{\tau>0;\int_{\Omega}\left|\frac{u}{\tau}\right...

? 

The error message is then as you showed, but the important part is the context display that you did not show.

The l.6 tells you it is on line 6 and the linebreak in the display shows you the point that TeX had reached, so here it had stopped after an x following \left and has not yet scanned the rest of the equation (which is shown after the linebreak).

In general the error is generated by a non-delimiter following \left or \right and the full error message will show the offending character (x here) as the last character before the line break in the error context display.


Here using the class mentioned in comments the error message is

! Missing delimiter (. inserted).
<to be read again> 
                   \let 
l.6 ...(x)}=\inf\left \{\tau>0;\int_{\Omega}\left|
                                                  \frac{u}{\tau}\right|^{p(x...

? 

showing that in this class | has a non standard definition which is not a delimiter. You can use the command forms \lvert and \rvert to obtain the original characer:

\documentclass[sn-mathphys]{sn-jnl} %\documentclass{article}

\begin{document}

\show|
\begin{equation*}
  |u|_{p(x)}=\inf\left \{\tau>0;\int_{\Omega}\left\lvert\frac{u}{\tau}\right\vert^{p(x)}\,dx\leq 1\right\}.
\end{equation*}

\end{document}

alternatively program package (the real culprit here) provides \normalbaroutside to avoid breaking standard markup. so

\documentclass[sn-mathphys]{sn-jnl} %\documentclass{article}
\normalbaroutside
\begin{document}


\begin{equation*}
  |u|_{p(x)}=\inf\left \{\tau>0;\int_{\Omega}\left|\frac{u}{\tau}\right|^{p(x)}\,dx\leq 1\right\}.
\end{equation*}

\end{document}
8
  • Thank you for your quik responses.
    – user263802
    Commented Feb 17, 2022 at 19:58
  • Thank you for your quik responses. Yes it is about context, in fact i usee this forumla with the Springer Nature template. \documentclass[sn-mathphys]{sn-jnl} , Math and Physical Sciences Reference Style .
    – user263802
    Commented Feb 17, 2022 at 20:06
  • @user263802 if you showed the error message as I did, somone could help, prefereably also show your input. But if you do not show any input that generates the error and do not show the error message it is hard to give any more help than the general advice I give here. Commented Feb 17, 2022 at 20:12
  • @user263802 actually I have that class, I will update your question and my answer, give me a couple of minutes Commented Feb 17, 2022 at 20:15
  • @user263802 answer updated Commented Feb 17, 2022 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .