Unrecognized command!

1,680

(Not a real answer, just a placeholder to narrow down the problem.)

Haven't yet been able to reproduce your symptom. Please verify my result from the following document, and then we can go from there to see where your problem really lies.

\documentclass{article} 
\usepackage[demo]{graphicx} 
\usepackage{sidecap} 
\begin{document} 
\begin{SCfigure} 
\centering 
\caption{frame XY}
\includegraphics[scale=0.5]{frame}
\end{SCfigure} 
\end{document}

enter image description here

Share:
1,680

Related videos on Youtube

user132255
Author by

user132255

Updated on August 01, 2022

Comments

  • user132255
    user132255 over 1 year

    I'm writing my thesis with latex, i created a main file and i included in this a package.sty, the index,the sections and so on. I encountered some problems in using the sidecap or floatrow packages. I wrote in my sty file \usepackage{sidecap} but when i call the function \begin{SCfigure} latex says that the command is unrecognized. The same happens with the floatrow package. It's not essential that i use side captions in my work document but from my point of view the use of them gives a better style and format. If some one can solve my doubt I will be very grateful.

    **EDIT - posted Code from Comment below **

    \documentclass[a4paper,11pt,twoside,openany,reqno,table]{art‌​icle} 
    \usepackage{graphicx} 
    \usepackage{caption} 
    \usepackage{sidecap} 
    \begin{document} 
    \begin{SCfigure} 
    \centering 
    \caption{frame XY} 
    \includegraphics[scale=0.5]{frame} 
    \end{SCfigure} 
    \end{document} 
    
    • gernot
      gernot over 6 years
      Welcome! We cannot say anything about the source of the problem without seeing the actual code that produces the error. Please make a copy of your document and strip it down as much as possible while still showing the error. Then post the code by adding it to your question (just use the edit button left below your post).
    • Bernard
      Bernard over 6 years
      Are these packages installed?
    • Mico
      Mico over 6 years
      Please also use TeX-related terminology a bit more carefully. E.g., SCfigure is an 'environment', not a 'function'. Do tell us which document class you use, which packages you load (via \usepackage statements) in the preamble, and which instruction(s) give rise to error and/or warning messages. Do also share the precise contents of the warning and/or error messages.
    • user132255
      user132255 over 6 years
      I do't have errors but doesn't work. Now i will try to explain. I write the code the pdf is processed without problems. When i view the file my figure is at left or right of the page as should be but my caption is not at the side of the figure, or better is at his side but doesn't starts from the top. Is as latex makes the caption on the respective side but afer the figure. Hence when i view my code the command \begin{SCfigure} is highlighted in orange and if i go on it latex gives a small messagge: unrecognized command.
    • user132255
      user132255 over 6 years
      Let me know if ever see something like this in you code
    • David Carlisle
      David Carlisle over 6 years
      Sorry but it is impossible to guess what you have done and what output you got. Make a small complete example from \documentclass to \end{document} that uses SCfigure but does not work as you expect. Then people can debug it.
    • David Carlisle
      David Carlisle over 6 years
      how can you say "I do(n)'t have errors" but then go on to say you get an unrecognised command error?
    • samcarter_is_at_topanswers.xyz
      samcarter_is_at_topanswers.xyz over 6 years
      Is it your editor that says "unrecognised command" or do you get this from tex?
    • user132255
      user132255 over 6 years
      it's not the editor i got it from tex, in the final document seems to work but not as i exepect, even if i write the same code that is one the manual.. i cannot write you all the code. In a main file i wrote a \documentclass...{book}. i included in it the package.sty,the idex,sections and all the subparts of the document.. So is impossible that some one can debug it there are pages and pages of code. However really is not a problem i will try one time more, if doesn't work i will use the normal \begin{figure} with the caption. Probably i'm doing some mistake in setting the options of the pack.
    • David Carlisle
      David Carlisle over 6 years
      Your original document isn't what you should post. You should be able to construct a document which just shows the issue that you are seeing with sccaption. Otherwise it is impossible to guess what this question is about.
    • user132255
      user132255 over 6 years
      ok this is a simple code that i wrote to make an example.. but i don't know how to show you the result.
    • user132255
      user132255 over 6 years
      \documentclass[a4paper,11pt,twoside,openany,reqno,table]{art‌​icle} \usepackage{graphicx} \usepackage{caption} \usepackage{sidecap} \begin{document} \begin{SCfigure} \centering \caption{frame XY} \includegraphics[scale=0.5]{frame} \end{SCfigure} \end{document}
    • user132255
      user132255 over 6 years
      The caption is not at the leftside of the figure, but is after the figure in the left corner. I need it alligned with the figure doesn't matter if is at the top or bottom. What is m mistake?
    • jjdb
      jjdb over 6 years
      No, make an edit and add it to your question!
    • jjdb
      jjdb over 6 years
      Also to the experienced users, it would have been helpful if you've put the correct Welcome messages…
    • jjdb
      jjdb over 6 years
      So: Welcome to TeX.SX Welcome to Latex.Please read the Welcome page where you can find all the information for the first steps here.