Texstudio begin{subfigure} unrecognized command












4















I'm using the subcaption package to make subfigures in my document like so:



usepackage{caption}
usepackage{subcaption}

begin{document}

begin{figure}[ht]
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/1.png}
caption{Subcap1}
label{fig:1}
end{subfigure}
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/2.png}
caption{Subcap2}
label{fig:2}
end{subfigure}
caption{Cap}
label{fig:3}
end{figure}

end{document}


This compiles fine, but in the texstudio editor, the begin{subfigure} and end{subfigure} are highlighted as "unrecognized command". I have tried activating the caption, subcaption, subfig and subfigure cwl files at Options > Completion but this doesn't remove the highlight.



While this doesn't affect the compiling, it is rather annoying. Am I missing something or incorrectly using the packages?










share|improve this question




















  • 1





    Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

    – JP-Ellis
    Feb 23 '16 at 12:27
















4















I'm using the subcaption package to make subfigures in my document like so:



usepackage{caption}
usepackage{subcaption}

begin{document}

begin{figure}[ht]
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/1.png}
caption{Subcap1}
label{fig:1}
end{subfigure}
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/2.png}
caption{Subcap2}
label{fig:2}
end{subfigure}
caption{Cap}
label{fig:3}
end{figure}

end{document}


This compiles fine, but in the texstudio editor, the begin{subfigure} and end{subfigure} are highlighted as "unrecognized command". I have tried activating the caption, subcaption, subfig and subfigure cwl files at Options > Completion but this doesn't remove the highlight.



While this doesn't affect the compiling, it is rather annoying. Am I missing something or incorrectly using the packages?










share|improve this question




















  • 1





    Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

    – JP-Ellis
    Feb 23 '16 at 12:27














4












4








4


1






I'm using the subcaption package to make subfigures in my document like so:



usepackage{caption}
usepackage{subcaption}

begin{document}

begin{figure}[ht]
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/1.png}
caption{Subcap1}
label{fig:1}
end{subfigure}
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/2.png}
caption{Subcap2}
label{fig:2}
end{subfigure}
caption{Cap}
label{fig:3}
end{figure}

end{document}


This compiles fine, but in the texstudio editor, the begin{subfigure} and end{subfigure} are highlighted as "unrecognized command". I have tried activating the caption, subcaption, subfig and subfigure cwl files at Options > Completion but this doesn't remove the highlight.



While this doesn't affect the compiling, it is rather annoying. Am I missing something or incorrectly using the packages?










share|improve this question
















I'm using the subcaption package to make subfigures in my document like so:



usepackage{caption}
usepackage{subcaption}

begin{document}

begin{figure}[ht]
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/1.png}
caption{Subcap1}
label{fig:1}
end{subfigure}
begin{subfigure}[b]{0.45textwidth}
includegraphics[width=textwidth]{images/2.png}
caption{Subcap2}
label{fig:2}
end{subfigure}
caption{Cap}
label{fig:3}
end{figure}

end{document}


This compiles fine, but in the texstudio editor, the begin{subfigure} and end{subfigure} are highlighted as "unrecognized command". I have tried activating the caption, subcaption, subfig and subfigure cwl files at Options > Completion but this doesn't remove the highlight.



While this doesn't affect the compiling, it is rather annoying. Am I missing something or incorrectly using the packages?







subfloats texstudio subcaption






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 25 mins ago









user69318

1723413




1723413










asked Feb 23 '16 at 12:15









HoltHolt

233




233








  • 1





    Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

    – JP-Ellis
    Feb 23 '16 at 12:27














  • 1





    Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

    – JP-Ellis
    Feb 23 '16 at 12:27








1




1





Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

– JP-Ellis
Feb 23 '16 at 12:27





Welcome to LaTeX! Welcome to TeX.SX! This question is probably better suited to the developers of TeXStudio, or perhaps one of their mailing lists or forums. Perhaps someone here might be able to here, but this isn't strictly related to TeX or LaTeX.

– JP-Ellis
Feb 23 '16 at 12:27










1 Answer
1






active

oldest

votes


















4














Save this as subcaptionTemp.cwl in ~/.config/texstudio/ or %APPDATA%texstudio!



# manipulated the auto-generated subcaption.cwl for Holt
# subcaption package
# Axel Sommerfeldt 04/16/2013
# URL: http://mirror.switch.ch/ftp/mirror/tex/help/Catalogue/entries/subcaption.html

#include:caption
#
#
# Chapter 1 Loading the package
#
#
captionsetup[sub]{%<options%>}
#keyvals:captionsetup
margin=%<num%>pt
margin={%<left amount%>,%<right amount%>}
margin*=%<num%>pt
margin*={%<left amount%>,%<right amount%>}
font=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font={%<option 1%>,%<option 2%>}
labelfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont={%<option 1%>,%<option 2%>}
textfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont={%<option 1%>,%<option 2%>}
labelformat=#default,empty,parens,simple,brace
labelsep=#none,period,space,quad,colon,newline,endash
skip=%<num%>pt
list=#false,true,no
hypcap=#false,true
indention=%<amount%>pt
position=#auto,top,above,bottom,below
#endkeyvals
#
#
# Chapter 2 The subcaption command
#
#
subcaption{heading}#/minipage
subcaption[list entry]{heading}#/minipage
subcaption*{heading}#/minipage
setcaptionsubtype#S
setcaptionsubtype*#S
#
#
# Chapter 3 The subfigure & subtable environments
#
#
begin{subfigure}{width}
# pos can be b (default: )
begin{subfigure}[pos]{width}
begin{subtable}{width}
begin{subtable}[pos]{width}
end{subfigure}
end{subtable}
captin@For{subtyelist}#S
#
#
# Chapter 4 The subcaptionbox command
#
#
# inner-pos can be c, l, r, s (default: c)
subcaptionbox[list entry]{heading}[width][inner-pos]{contents}
subcaptionbox[list entry]{heading}[width]{contents}
subcaptionbox[list entry]{heading}{contents}
subcaptionbox{heading}[width][inner-pos]{contents}
subcaptionbox{heading}[width]{contents}
subcaptionbox{heading}{contents}
subcaptionbox*{heading}[width][inner-pos]{contents}
subcaptionbox*{heading}[width]{contents}
subcaptionbox*{heading}{contents}
#
#
# Chapter 5 The DeclareCaptionSubType command
#
#
# numbering-pos can be arabic, roman, Roman, alph, Alph, fnsymbol... (defaul: alph)
DeclareCaptionSubType[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
DeclareCaptionSubType*[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
#
#
# Chapter 6 References
#
#
thesubfigure#S
thesubtable#S
p@subfigure#S
p@subtable#S
subref{key}#*r
subref*{key}#*r
#keyvals:captionsetup
subrefformat=#parens
#endkeyvals
phantomsubcaption
# other commands
subfigureautorefname#S
subfigurename#S
subtableautorefname#S
subtablename#S
theHsubfigure#S
theHsubtable#S


Then go to your preferences and load this file:



enter image description here





I would be happy for any feedback. If this works nicely for you, I will submit it to the maintainers of TXS.






share|improve this answer
























  • It did work! Thanks very much! Check mark clicked :)

    – Holt
    Mar 3 '16 at 10:40













  • Thanks for this answer. Were you able to send it to the TXS people?

    – Carlos Mendoza
    Mar 23 '17 at 19:44











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f295456%2ftexstudio-beginsubfigure-unrecognized-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














Save this as subcaptionTemp.cwl in ~/.config/texstudio/ or %APPDATA%texstudio!



# manipulated the auto-generated subcaption.cwl for Holt
# subcaption package
# Axel Sommerfeldt 04/16/2013
# URL: http://mirror.switch.ch/ftp/mirror/tex/help/Catalogue/entries/subcaption.html

#include:caption
#
#
# Chapter 1 Loading the package
#
#
captionsetup[sub]{%<options%>}
#keyvals:captionsetup
margin=%<num%>pt
margin={%<left amount%>,%<right amount%>}
margin*=%<num%>pt
margin*={%<left amount%>,%<right amount%>}
font=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font={%<option 1%>,%<option 2%>}
labelfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont={%<option 1%>,%<option 2%>}
textfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont={%<option 1%>,%<option 2%>}
labelformat=#default,empty,parens,simple,brace
labelsep=#none,period,space,quad,colon,newline,endash
skip=%<num%>pt
list=#false,true,no
hypcap=#false,true
indention=%<amount%>pt
position=#auto,top,above,bottom,below
#endkeyvals
#
#
# Chapter 2 The subcaption command
#
#
subcaption{heading}#/minipage
subcaption[list entry]{heading}#/minipage
subcaption*{heading}#/minipage
setcaptionsubtype#S
setcaptionsubtype*#S
#
#
# Chapter 3 The subfigure & subtable environments
#
#
begin{subfigure}{width}
# pos can be b (default: )
begin{subfigure}[pos]{width}
begin{subtable}{width}
begin{subtable}[pos]{width}
end{subfigure}
end{subtable}
captin@For{subtyelist}#S
#
#
# Chapter 4 The subcaptionbox command
#
#
# inner-pos can be c, l, r, s (default: c)
subcaptionbox[list entry]{heading}[width][inner-pos]{contents}
subcaptionbox[list entry]{heading}[width]{contents}
subcaptionbox[list entry]{heading}{contents}
subcaptionbox{heading}[width][inner-pos]{contents}
subcaptionbox{heading}[width]{contents}
subcaptionbox{heading}{contents}
subcaptionbox*{heading}[width][inner-pos]{contents}
subcaptionbox*{heading}[width]{contents}
subcaptionbox*{heading}{contents}
#
#
# Chapter 5 The DeclareCaptionSubType command
#
#
# numbering-pos can be arabic, roman, Roman, alph, Alph, fnsymbol... (defaul: alph)
DeclareCaptionSubType[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
DeclareCaptionSubType*[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
#
#
# Chapter 6 References
#
#
thesubfigure#S
thesubtable#S
p@subfigure#S
p@subtable#S
subref{key}#*r
subref*{key}#*r
#keyvals:captionsetup
subrefformat=#parens
#endkeyvals
phantomsubcaption
# other commands
subfigureautorefname#S
subfigurename#S
subtableautorefname#S
subtablename#S
theHsubfigure#S
theHsubtable#S


Then go to your preferences and load this file:



enter image description here





I would be happy for any feedback. If this works nicely for you, I will submit it to the maintainers of TXS.






share|improve this answer
























  • It did work! Thanks very much! Check mark clicked :)

    – Holt
    Mar 3 '16 at 10:40













  • Thanks for this answer. Were you able to send it to the TXS people?

    – Carlos Mendoza
    Mar 23 '17 at 19:44
















4














Save this as subcaptionTemp.cwl in ~/.config/texstudio/ or %APPDATA%texstudio!



# manipulated the auto-generated subcaption.cwl for Holt
# subcaption package
# Axel Sommerfeldt 04/16/2013
# URL: http://mirror.switch.ch/ftp/mirror/tex/help/Catalogue/entries/subcaption.html

#include:caption
#
#
# Chapter 1 Loading the package
#
#
captionsetup[sub]{%<options%>}
#keyvals:captionsetup
margin=%<num%>pt
margin={%<left amount%>,%<right amount%>}
margin*=%<num%>pt
margin*={%<left amount%>,%<right amount%>}
font=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font={%<option 1%>,%<option 2%>}
labelfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont={%<option 1%>,%<option 2%>}
textfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont={%<option 1%>,%<option 2%>}
labelformat=#default,empty,parens,simple,brace
labelsep=#none,period,space,quad,colon,newline,endash
skip=%<num%>pt
list=#false,true,no
hypcap=#false,true
indention=%<amount%>pt
position=#auto,top,above,bottom,below
#endkeyvals
#
#
# Chapter 2 The subcaption command
#
#
subcaption{heading}#/minipage
subcaption[list entry]{heading}#/minipage
subcaption*{heading}#/minipage
setcaptionsubtype#S
setcaptionsubtype*#S
#
#
# Chapter 3 The subfigure & subtable environments
#
#
begin{subfigure}{width}
# pos can be b (default: )
begin{subfigure}[pos]{width}
begin{subtable}{width}
begin{subtable}[pos]{width}
end{subfigure}
end{subtable}
captin@For{subtyelist}#S
#
#
# Chapter 4 The subcaptionbox command
#
#
# inner-pos can be c, l, r, s (default: c)
subcaptionbox[list entry]{heading}[width][inner-pos]{contents}
subcaptionbox[list entry]{heading}[width]{contents}
subcaptionbox[list entry]{heading}{contents}
subcaptionbox{heading}[width][inner-pos]{contents}
subcaptionbox{heading}[width]{contents}
subcaptionbox{heading}{contents}
subcaptionbox*{heading}[width][inner-pos]{contents}
subcaptionbox*{heading}[width]{contents}
subcaptionbox*{heading}{contents}
#
#
# Chapter 5 The DeclareCaptionSubType command
#
#
# numbering-pos can be arabic, roman, Roman, alph, Alph, fnsymbol... (defaul: alph)
DeclareCaptionSubType[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
DeclareCaptionSubType*[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
#
#
# Chapter 6 References
#
#
thesubfigure#S
thesubtable#S
p@subfigure#S
p@subtable#S
subref{key}#*r
subref*{key}#*r
#keyvals:captionsetup
subrefformat=#parens
#endkeyvals
phantomsubcaption
# other commands
subfigureautorefname#S
subfigurename#S
subtableautorefname#S
subtablename#S
theHsubfigure#S
theHsubtable#S


Then go to your preferences and load this file:



enter image description here





I would be happy for any feedback. If this works nicely for you, I will submit it to the maintainers of TXS.






share|improve this answer
























  • It did work! Thanks very much! Check mark clicked :)

    – Holt
    Mar 3 '16 at 10:40













  • Thanks for this answer. Were you able to send it to the TXS people?

    – Carlos Mendoza
    Mar 23 '17 at 19:44














4












4








4







Save this as subcaptionTemp.cwl in ~/.config/texstudio/ or %APPDATA%texstudio!



# manipulated the auto-generated subcaption.cwl for Holt
# subcaption package
# Axel Sommerfeldt 04/16/2013
# URL: http://mirror.switch.ch/ftp/mirror/tex/help/Catalogue/entries/subcaption.html

#include:caption
#
#
# Chapter 1 Loading the package
#
#
captionsetup[sub]{%<options%>}
#keyvals:captionsetup
margin=%<num%>pt
margin={%<left amount%>,%<right amount%>}
margin*=%<num%>pt
margin*={%<left amount%>,%<right amount%>}
font=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font={%<option 1%>,%<option 2%>}
labelfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont={%<option 1%>,%<option 2%>}
textfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont={%<option 1%>,%<option 2%>}
labelformat=#default,empty,parens,simple,brace
labelsep=#none,period,space,quad,colon,newline,endash
skip=%<num%>pt
list=#false,true,no
hypcap=#false,true
indention=%<amount%>pt
position=#auto,top,above,bottom,below
#endkeyvals
#
#
# Chapter 2 The subcaption command
#
#
subcaption{heading}#/minipage
subcaption[list entry]{heading}#/minipage
subcaption*{heading}#/minipage
setcaptionsubtype#S
setcaptionsubtype*#S
#
#
# Chapter 3 The subfigure & subtable environments
#
#
begin{subfigure}{width}
# pos can be b (default: )
begin{subfigure}[pos]{width}
begin{subtable}{width}
begin{subtable}[pos]{width}
end{subfigure}
end{subtable}
captin@For{subtyelist}#S
#
#
# Chapter 4 The subcaptionbox command
#
#
# inner-pos can be c, l, r, s (default: c)
subcaptionbox[list entry]{heading}[width][inner-pos]{contents}
subcaptionbox[list entry]{heading}[width]{contents}
subcaptionbox[list entry]{heading}{contents}
subcaptionbox{heading}[width][inner-pos]{contents}
subcaptionbox{heading}[width]{contents}
subcaptionbox{heading}{contents}
subcaptionbox*{heading}[width][inner-pos]{contents}
subcaptionbox*{heading}[width]{contents}
subcaptionbox*{heading}{contents}
#
#
# Chapter 5 The DeclareCaptionSubType command
#
#
# numbering-pos can be arabic, roman, Roman, alph, Alph, fnsymbol... (defaul: alph)
DeclareCaptionSubType[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
DeclareCaptionSubType*[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
#
#
# Chapter 6 References
#
#
thesubfigure#S
thesubtable#S
p@subfigure#S
p@subtable#S
subref{key}#*r
subref*{key}#*r
#keyvals:captionsetup
subrefformat=#parens
#endkeyvals
phantomsubcaption
# other commands
subfigureautorefname#S
subfigurename#S
subtableautorefname#S
subtablename#S
theHsubfigure#S
theHsubtable#S


Then go to your preferences and load this file:



enter image description here





I would be happy for any feedback. If this works nicely for you, I will submit it to the maintainers of TXS.






share|improve this answer













Save this as subcaptionTemp.cwl in ~/.config/texstudio/ or %APPDATA%texstudio!



# manipulated the auto-generated subcaption.cwl for Holt
# subcaption package
# Axel Sommerfeldt 04/16/2013
# URL: http://mirror.switch.ch/ftp/mirror/tex/help/Catalogue/entries/subcaption.html

#include:caption
#
#
# Chapter 1 Loading the package
#
#
captionsetup[sub]{%<options%>}
#keyvals:captionsetup
margin=%<num%>pt
margin={%<left amount%>,%<right amount%>}
margin*=%<num%>pt
margin*={%<left amount%>,%<right amount%>}
font=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
font={%<option 1%>,%<option 2%>}
labelfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
labelfont={%<option 1%>,%<option 2%>}
textfont=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont+=#scriptsize,footnotesize,small,normalsize,large,Large,normalfont,up,it,sl,sc,md,bf,rm,sf,tt,singlespacing,onehalfspacing,doublespacing,{strech=%<amount%>},normalcolor,{color=%<colour%>},normal
textfont={%<option 1%>,%<option 2%>}
labelformat=#default,empty,parens,simple,brace
labelsep=#none,period,space,quad,colon,newline,endash
skip=%<num%>pt
list=#false,true,no
hypcap=#false,true
indention=%<amount%>pt
position=#auto,top,above,bottom,below
#endkeyvals
#
#
# Chapter 2 The subcaption command
#
#
subcaption{heading}#/minipage
subcaption[list entry]{heading}#/minipage
subcaption*{heading}#/minipage
setcaptionsubtype#S
setcaptionsubtype*#S
#
#
# Chapter 3 The subfigure & subtable environments
#
#
begin{subfigure}{width}
# pos can be b (default: )
begin{subfigure}[pos]{width}
begin{subtable}{width}
begin{subtable}[pos]{width}
end{subfigure}
end{subtable}
captin@For{subtyelist}#S
#
#
# Chapter 4 The subcaptionbox command
#
#
# inner-pos can be c, l, r, s (default: c)
subcaptionbox[list entry]{heading}[width][inner-pos]{contents}
subcaptionbox[list entry]{heading}[width]{contents}
subcaptionbox[list entry]{heading}{contents}
subcaptionbox{heading}[width][inner-pos]{contents}
subcaptionbox{heading}[width]{contents}
subcaptionbox{heading}{contents}
subcaptionbox*{heading}[width][inner-pos]{contents}
subcaptionbox*{heading}[width]{contents}
subcaptionbox*{heading}{contents}
#
#
# Chapter 5 The DeclareCaptionSubType command
#
#
# numbering-pos can be arabic, roman, Roman, alph, Alph, fnsymbol... (defaul: alph)
DeclareCaptionSubType[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
DeclareCaptionSubType*[numbering scheme]{float type}#*d
DeclareCaptionSubType{float type}#*d
#
#
# Chapter 6 References
#
#
thesubfigure#S
thesubtable#S
p@subfigure#S
p@subtable#S
subref{key}#*r
subref*{key}#*r
#keyvals:captionsetup
subrefformat=#parens
#endkeyvals
phantomsubcaption
# other commands
subfigureautorefname#S
subfigurename#S
subtableautorefname#S
subtablename#S
theHsubfigure#S
theHsubtable#S


Then go to your preferences and load this file:



enter image description here





I would be happy for any feedback. If this works nicely for you, I will submit it to the maintainers of TXS.







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 23 '16 at 23:11









LaRiFaRiLaRiFaRi

35.8k246122




35.8k246122













  • It did work! Thanks very much! Check mark clicked :)

    – Holt
    Mar 3 '16 at 10:40













  • Thanks for this answer. Were you able to send it to the TXS people?

    – Carlos Mendoza
    Mar 23 '17 at 19:44



















  • It did work! Thanks very much! Check mark clicked :)

    – Holt
    Mar 3 '16 at 10:40













  • Thanks for this answer. Were you able to send it to the TXS people?

    – Carlos Mendoza
    Mar 23 '17 at 19:44

















It did work! Thanks very much! Check mark clicked :)

– Holt
Mar 3 '16 at 10:40







It did work! Thanks very much! Check mark clicked :)

– Holt
Mar 3 '16 at 10:40















Thanks for this answer. Were you able to send it to the TXS people?

– Carlos Mendoza
Mar 23 '17 at 19:44





Thanks for this answer. Were you able to send it to the TXS people?

– Carlos Mendoza
Mar 23 '17 at 19:44


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f295456%2ftexstudio-beginsubfigure-unrecognized-command%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt