0

TeXstudio has highlighted this for some time. same problem indicates it in the commands:

\tikzmarknode{}, \eqdescbox, \dimexpr

I have no problems in compiling the pdf file, I only see these things highlighted. I did an update of TexLive the other day but I still have this.

\documentclass[a4paper]{article} 

\usepackage[T1]{fontenc} 
\usepackage[italian]{babel}
\usepackage{amsmath}
\usepackage{graphicx,wrapfig}
\usepackage{mwe} 

\newcommand*{\Fra}[2]{\frac{#1}{#2}} 
\newcommand{\ccdot}{\,\mathrm{\!\cdot\!}}

\graphicspath{ {./img/} }

\begin{document}

\begin{wrapfigure}[10]{l}{3.0cm}
    \vspace{-10pt}
    \includegraphics[width=2.5cm]{particella1}
    \label{fig:partstab}
\end{wrapfigure}

\end{document}

enter image description here

Bernard
  • 271,350
Antonio
  • 543
  • 1
    You might want to retag the question: as far as I understand, this has nothing to do with TeX errors but rather with the editor TeXStudio. – campa Mar 06 '19 at 09:16
  • If you don't give the code in text and compileable format, few people will answer you: no one wants to copy the text from an image manually! – AndréC Mar 06 '19 at 09:18
  • @AndréC it is not a question of text or compilation. I have no problem compiling the file. I do not understand why some commands see them this way – Antonio Mar 06 '19 at 10:00
  • The editor has no way of knowing all commands and environments there is in LaTeX, so it only provides a special interface for a subset of these. It is probably a bit confusing for the user when the editor says something like that, not knowing that the user has not made any mistake. – daleif Mar 06 '19 at 10:04
  • @daleif I thought about this possibility. is defined as a syntax error. I do not understand where I can correct this the error – Antonio Mar 06 '19 at 10:06
  • @Antonio Can you compile the file and get what you want? If you can get what you want, this is only a problem of your editor. –  Mar 06 '19 at 10:17
  • 2
    You might want to give a look at the TeXStudio documentation, sections 1.4, 1.5 and 4.13. Here on the site there are similar questions, like TeXStudio doesn't recognize some commands, TeXStudio does not recognize \colon. – campa Mar 06 '19 at 10:20
  • @campa I did a verification, even forcing the upload to continue giving this error. I disabled syntax checking.

    You can also switch off syntax checking at Configure ... -> Editor -> Inline Checking -> Syntax.

    – Antonio Mar 06 '19 at 10:34

1 Answers1

1

It worked for me this way:

  • create a new .txt file
  • open the .txt file with Notepad++ (free txt program)
  • In the opened file, Insert:
# wrapfig package
# Matthew Bertucci 8/31/2021 for v3.6

added the next 2 lines:

\begin{wrapfigure}%\ %<content...%>%
\end{wrapfigure}

\begin{wrapfig}{position}{width} \begin{wrapfig}[lineheight]{position}[overhang%l]{width} \end{wrapfig} \begin{wraptable}{position}{width}#* \begin{wraptable}[lineheight]{position}[overhang%l]{width}#* \end{wraptable}#* \begin{wrapfloat}{floatname}{position}{width}#* \end{wrapfloat}#* \wrapoverhang#*

  • Credit: The code is copied from (added the first 2 lines): https://github.com/texstudio-org/texstudio/blob/master/completion/wrapfig.cwl
  • Saving the file:
    • browse to: C:\Users\username\AppData\Roaming\texstudio\completion\user
    • giving file name: wrapfig.cwl
    • Save as type: All types(*.*)
  • loading the .cwl file:
    • in TeXstudio, select: options > Configure TeXstudio
    • from list in left side, select: Completion
    • from list in right side, tick the box beside wrapfig.cwl
  • after clicking 'ok' it starts loading the file, the red mark will disappear and there no longer 'unrecognized environment'.

They are some notes I found here and there and gathered it together in one place. Hope it helps.