Undefined control sequence. }} [closed]











up vote
0
down vote

favorite












I am writing my thesis with a document class I found on Overleaf (I think from Cambridge, dont remember) but the error is reproducible with article document class as well.



I needed to side caption my figures and since I am using a made up class I know nothing about, the packages suggested for doing that here wouldnt work. From the same question I used Oleg's answer at the bottom of the page which was basically



%----------------------------------------
%COMMAND FOR DOING SIDE CAPTION.
%----------------------------------------
newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}


Which works fantastically in my thesis but gives me the error "Undefined Control Sequence. }}". I checked and this error also shows up with article class. The pdf is produced just fine as far as I can tell but I am wondering where that error is coming from and if it can be fixed.



The function is used



begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


Whole simple code would look like:



% !TEX encoding = UTF-8 Unicode 
documentclass[12pt,leqno]{article}
usepackage[spanish,english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
usepackage[demo]{graphicx}


newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}

begin{document}

section{Section Title}

begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


end{document}










share|improve this question















closed as off-topic by Fran, Kurt, marmot, Zarko, Henri Menke Dec 2 at 5:05



  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
    – Bernard
    Dec 1 at 13:20










  • Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
    – Andrew Swann
    Dec 1 at 13:23










  • Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
    – M.O.
    Dec 1 at 13:26










  • Better that add ` ragged2e` remove RaggedRight that does nothing here.
    – Fran
    Dec 1 at 23:20








  • 4




    I'm voting to close this question as off-topic because is solved in the comments
    – Fran
    Dec 1 at 23:20















up vote
0
down vote

favorite












I am writing my thesis with a document class I found on Overleaf (I think from Cambridge, dont remember) but the error is reproducible with article document class as well.



I needed to side caption my figures and since I am using a made up class I know nothing about, the packages suggested for doing that here wouldnt work. From the same question I used Oleg's answer at the bottom of the page which was basically



%----------------------------------------
%COMMAND FOR DOING SIDE CAPTION.
%----------------------------------------
newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}


Which works fantastically in my thesis but gives me the error "Undefined Control Sequence. }}". I checked and this error also shows up with article class. The pdf is produced just fine as far as I can tell but I am wondering where that error is coming from and if it can be fixed.



The function is used



begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


Whole simple code would look like:



% !TEX encoding = UTF-8 Unicode 
documentclass[12pt,leqno]{article}
usepackage[spanish,english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
usepackage[demo]{graphicx}


newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}

begin{document}

section{Section Title}

begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


end{document}










share|improve this question















closed as off-topic by Fran, Kurt, marmot, Zarko, Henri Menke Dec 2 at 5:05



  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
    – Bernard
    Dec 1 at 13:20










  • Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
    – Andrew Swann
    Dec 1 at 13:23










  • Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
    – M.O.
    Dec 1 at 13:26










  • Better that add ` ragged2e` remove RaggedRight that does nothing here.
    – Fran
    Dec 1 at 23:20








  • 4




    I'm voting to close this question as off-topic because is solved in the comments
    – Fran
    Dec 1 at 23:20













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am writing my thesis with a document class I found on Overleaf (I think from Cambridge, dont remember) but the error is reproducible with article document class as well.



I needed to side caption my figures and since I am using a made up class I know nothing about, the packages suggested for doing that here wouldnt work. From the same question I used Oleg's answer at the bottom of the page which was basically



%----------------------------------------
%COMMAND FOR DOING SIDE CAPTION.
%----------------------------------------
newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}


Which works fantastically in my thesis but gives me the error "Undefined Control Sequence. }}". I checked and this error also shows up with article class. The pdf is produced just fine as far as I can tell but I am wondering where that error is coming from and if it can be fixed.



The function is used



begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


Whole simple code would look like:



% !TEX encoding = UTF-8 Unicode 
documentclass[12pt,leqno]{article}
usepackage[spanish,english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
usepackage[demo]{graphicx}


newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}

begin{document}

section{Section Title}

begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


end{document}










share|improve this question















I am writing my thesis with a document class I found on Overleaf (I think from Cambridge, dont remember) but the error is reproducible with article document class as well.



I needed to side caption my figures and since I am using a made up class I know nothing about, the packages suggested for doing that here wouldnt work. From the same question I used Oleg's answer at the bottom of the page which was basically



%----------------------------------------
%COMMAND FOR DOING SIDE CAPTION.
%----------------------------------------
newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}


Which works fantastically in my thesis but gives me the error "Undefined Control Sequence. }}". I checked and this error also shows up with article class. The pdf is produced just fine as far as I can tell but I am wondering where that error is coming from and if it can be fixed.



The function is used



begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


Whole simple code would look like:



% !TEX encoding = UTF-8 Unicode 
documentclass[12pt,leqno]{article}
usepackage[spanish,english]{babel}
usepackage[utf8]{inputenc}
usepackage{amsmath}
usepackage{amssymb}
usepackage[demo]{graphicx}


newcommand{sidebysidecaption}[4]{%
RaggedRight%
begin{minipage}[t]{#1}
vspace*{0pt}
#3
end{minipage}
hfill%
begin{minipage}[t]{#2}
vspace*{0pt}
#4
end{minipage}%
}

begin{document}

section{Section Title}

begin{figure}[t]
sidebysidecaption{0.555linewidth}{0.42linewidth}{%
includegraphics[width=linewidth]{figure.pdf}%
}{%
caption[title figure]{caption figure %
label{figure}%
}}
end{figure}


end{document}







errors






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 1 at 13:25

























asked Dec 1 at 13:12









M.O.

115




115




closed as off-topic by Fran, Kurt, marmot, Zarko, Henri Menke Dec 2 at 5:05



  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.




closed as off-topic by Fran, Kurt, marmot, Zarko, Henri Menke Dec 2 at 5:05



  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.

If this question can be reworded to fit the rules in the help center, please edit the question.












  • Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
    – Bernard
    Dec 1 at 13:20










  • Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
    – Andrew Swann
    Dec 1 at 13:23










  • Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
    – M.O.
    Dec 1 at 13:26










  • Better that add ` ragged2e` remove RaggedRight that does nothing here.
    – Fran
    Dec 1 at 23:20








  • 4




    I'm voting to close this question as off-topic because is solved in the comments
    – Fran
    Dec 1 at 23:20


















  • Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
    – Bernard
    Dec 1 at 13:20










  • Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
    – Andrew Swann
    Dec 1 at 13:23










  • Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
    – M.O.
    Dec 1 at 13:26










  • Better that add ` ragged2e` remove RaggedRight that does nothing here.
    – Fran
    Dec 1 at 23:20








  • 4




    I'm voting to close this question as off-topic because is solved in the comments
    – Fran
    Dec 1 at 23:20
















Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
– Bernard
Dec 1 at 13:20




Welcome to TeX SX! Could you post a fill compilable code, not just snippets?
– Bernard
Dec 1 at 13:20












Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
– Andrew Swann
Dec 1 at 13:23




Adding usepackage{ragged2e,graphicx} and making sure figure.pdf exists, I get no error.
– Andrew Swann
Dec 1 at 13:23












Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
– M.O.
Dec 1 at 13:26




Thanks! I had added the complete code but adding the package ragged2e fixed it! I dont know how I missed that, thank you so much!
– M.O.
Dec 1 at 13:26












Better that add ` ragged2e` remove RaggedRight that does nothing here.
– Fran
Dec 1 at 23:20






Better that add ` ragged2e` remove RaggedRight that does nothing here.
– Fran
Dec 1 at 23:20






4




4




I'm voting to close this question as off-topic because is solved in the comments
– Fran
Dec 1 at 23:20




I'm voting to close this question as off-topic because is solved in the comments
– Fran
Dec 1 at 23:20















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?