Modifying argument in macro











up vote
1
down vote

favorite












I need to modify an argument of macro.

For example #4 equals to 1.1 Optimal solution of RNASP



When I write Figure #4, output is this:

Figure 1.1 Optimal solution of RNASP



But I need this:
Figure 1.1: Optimal solution of RNASP



I suppose I need some text operations like:




  • Split text to two. Figure number and text.

  • Add "Figure" word to start and ":" to end of the first part

  • Make first part bold

  • Combine first and second part and set as new variable to use in macro


Macro:



def@mymacro#1#2#3#4#5{
...
vskip 2cm
Figure #4
...
}


Edit: I figured out that, for example in one instance #4 equals to the following string. I obtained it by making detokenize{#4}



hyper@linkstart {link}{Hy@tocdestname }{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}hyper@-linkend


When I make detokenize these functions work:



StrLen{detokenize{#4}}

StrLeft{detokenize{#4}}{30}


But this doesn't work:



StrBetween{detokenize{#4}}{foo}{bar}


Besides I need to put a : just after the figure number and make bold before the start of the caption.



Edit: Although having other class functions and definitions, I removed my other content and created an overleaf project. String manipulation can be seen on 206-208 of the gsu12.def file. https://www.overleaf.com/16674170vmvhjncqjndv



I get this error:
https://ibb.co/gZUn2d










share|improve this question
























  • Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
    – Mico
    Jun 2 at 10:19










  • I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
    – Mark
    Jun 2 at 10:23












  • You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
    – John Kormylo
    Jun 7 at 15:26












  • are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
    – jfbu
    Dec 1 at 11:30












  • in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
    – jfbu
    Dec 1 at 11:32















up vote
1
down vote

favorite












I need to modify an argument of macro.

For example #4 equals to 1.1 Optimal solution of RNASP



When I write Figure #4, output is this:

Figure 1.1 Optimal solution of RNASP



But I need this:
Figure 1.1: Optimal solution of RNASP



I suppose I need some text operations like:




  • Split text to two. Figure number and text.

  • Add "Figure" word to start and ":" to end of the first part

  • Make first part bold

  • Combine first and second part and set as new variable to use in macro


Macro:



def@mymacro#1#2#3#4#5{
...
vskip 2cm
Figure #4
...
}


Edit: I figured out that, for example in one instance #4 equals to the following string. I obtained it by making detokenize{#4}



hyper@linkstart {link}{Hy@tocdestname }{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}hyper@-linkend


When I make detokenize these functions work:



StrLen{detokenize{#4}}

StrLeft{detokenize{#4}}{30}


But this doesn't work:



StrBetween{detokenize{#4}}{foo}{bar}


Besides I need to put a : just after the figure number and make bold before the start of the caption.



Edit: Although having other class functions and definitions, I removed my other content and created an overleaf project. String manipulation can be seen on 206-208 of the gsu12.def file. https://www.overleaf.com/16674170vmvhjncqjndv



I get this error:
https://ibb.co/gZUn2d










share|improve this question
























  • Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
    – Mico
    Jun 2 at 10:19










  • I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
    – Mark
    Jun 2 at 10:23












  • You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
    – John Kormylo
    Jun 7 at 15:26












  • are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
    – jfbu
    Dec 1 at 11:30












  • in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
    – jfbu
    Dec 1 at 11:32













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I need to modify an argument of macro.

For example #4 equals to 1.1 Optimal solution of RNASP



When I write Figure #4, output is this:

Figure 1.1 Optimal solution of RNASP



But I need this:
Figure 1.1: Optimal solution of RNASP



I suppose I need some text operations like:




  • Split text to two. Figure number and text.

  • Add "Figure" word to start and ":" to end of the first part

  • Make first part bold

  • Combine first and second part and set as new variable to use in macro


Macro:



def@mymacro#1#2#3#4#5{
...
vskip 2cm
Figure #4
...
}


Edit: I figured out that, for example in one instance #4 equals to the following string. I obtained it by making detokenize{#4}



hyper@linkstart {link}{Hy@tocdestname }{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}hyper@-linkend


When I make detokenize these functions work:



StrLen{detokenize{#4}}

StrLeft{detokenize{#4}}{30}


But this doesn't work:



StrBetween{detokenize{#4}}{foo}{bar}


Besides I need to put a : just after the figure number and make bold before the start of the caption.



Edit: Although having other class functions and definitions, I removed my other content and created an overleaf project. String manipulation can be seen on 206-208 of the gsu12.def file. https://www.overleaf.com/16674170vmvhjncqjndv



I get this error:
https://ibb.co/gZUn2d










share|improve this question















I need to modify an argument of macro.

For example #4 equals to 1.1 Optimal solution of RNASP



When I write Figure #4, output is this:

Figure 1.1 Optimal solution of RNASP



But I need this:
Figure 1.1: Optimal solution of RNASP



I suppose I need some text operations like:




  • Split text to two. Figure number and text.

  • Add "Figure" word to start and ":" to end of the first part

  • Make first part bold

  • Combine first and second part and set as new variable to use in macro


Macro:



def@mymacro#1#2#3#4#5{
...
vskip 2cm
Figure #4
...
}


Edit: I figured out that, for example in one instance #4 equals to the following string. I obtained it by making detokenize{#4}



hyper@linkstart {link}{Hy@tocdestname }{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}hyper@-linkend


When I make detokenize these functions work:



StrLen{detokenize{#4}}

StrLeft{detokenize{#4}}{30}


But this doesn't work:



StrBetween{detokenize{#4}}{foo}{bar}


Besides I need to put a : just after the figure number and make bold before the start of the caption.



Edit: Although having other class functions and definitions, I removed my other content and created an overleaf project. String manipulation can be seen on 206-208 of the gsu12.def file. https://www.overleaf.com/16674170vmvhjncqjndv



I get this error:
https://ibb.co/gZUn2d







macros typography optional-arguments






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 4 at 7:41

























asked Jun 2 at 9:47









Mark

306




306












  • Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
    – Mico
    Jun 2 at 10:19










  • I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
    – Mark
    Jun 2 at 10:23












  • You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
    – John Kormylo
    Jun 7 at 15:26












  • are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
    – jfbu
    Dec 1 at 11:30












  • in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
    – jfbu
    Dec 1 at 11:32


















  • Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
    – Mico
    Jun 2 at 10:19










  • I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
    – Mark
    Jun 2 at 10:23












  • You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
    – John Kormylo
    Jun 7 at 15:26












  • are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
    – jfbu
    Dec 1 at 11:30












  • in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
    – jfbu
    Dec 1 at 11:32
















Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
– Mico
Jun 2 at 10:19




Is this a purely abstract exercise, or is @mymacro creating an instance of a figure float? If it's the latter, have you considered loading and using the caption package?
– Mico
Jun 2 at 10:19












I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
– Mark
Jun 2 at 10:23






I'm trying to update List of figures and List of Tables. I have mentioned a detailed question here: tex.stackexchange.com/questions/434579/… I thought maybe it can be easier this way.
– Mark
Jun 2 at 10:23














You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
– John Kormylo
Jun 7 at 15:26






You can't modify #4 directly, but you can copy it into a macro and modify the macro. In this case, you might even need newtoks. See also tex.stackexchange.com/questions/233085/….
– John Kormylo
Jun 7 at 15:26














are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
– jfbu
Dec 1 at 11:30






are you trying to hack into l@figure or @dottedtocline ? your overleaf code uses class gsufbe and many many packages so is not at all minimal. The crucial thing here is that your are using hyperref hence the decoration you saw with detokenize.
– jfbu
Dec 1 at 11:30














in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
– jfbu
Dec 1 at 11:32




in the case at than it appears you would only need to redefine locally numberline to do what your want. But the question is too vague without indication of which macro exactly you are hacking into.
– jfbu
Dec 1 at 11:32










1 Answer
1






active

oldest

votes

















up vote
0
down vote













If you are using this to adjust figure captions, I would go with @Mico's suggestion and make use of the caption package. But, as an exercise on how to do this, one way is to use the xstring package and extract the string before and after the first space:



enter image description here



Code



documentclass{article}
usepackage{xstring}

defmymacro#1#2#3#4#5{%
StrBefore{#4}{ }[FigNum]%
StrBehind{#4}{ }[FigLabel]%
textbf{Figure FigNum}:~FigLabel%
}%

begin{document}

mymacro{}{}{}{1.1 Optimal solution of RNASP}{}

end{document}





share|improve this answer





















  • Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
    – Mark
    Jun 2 at 12:01












  • Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
    – Mark
    Jun 2 at 12:15












  • I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
    – Mark
    Jun 3 at 5:31










  • @Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
    – Peter Grill
    Jun 3 at 7:16










  • I use this for table of figures. I updated my question after making a detokenize.
    – Mark
    Jun 3 at 9:20











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',
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%2f434603%2fmodifying-argument-in-macro%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








up vote
0
down vote













If you are using this to adjust figure captions, I would go with @Mico's suggestion and make use of the caption package. But, as an exercise on how to do this, one way is to use the xstring package and extract the string before and after the first space:



enter image description here



Code



documentclass{article}
usepackage{xstring}

defmymacro#1#2#3#4#5{%
StrBefore{#4}{ }[FigNum]%
StrBehind{#4}{ }[FigLabel]%
textbf{Figure FigNum}:~FigLabel%
}%

begin{document}

mymacro{}{}{}{1.1 Optimal solution of RNASP}{}

end{document}





share|improve this answer





















  • Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
    – Mark
    Jun 2 at 12:01












  • Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
    – Mark
    Jun 2 at 12:15












  • I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
    – Mark
    Jun 3 at 5:31










  • @Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
    – Peter Grill
    Jun 3 at 7:16










  • I use this for table of figures. I updated my question after making a detokenize.
    – Mark
    Jun 3 at 9:20















up vote
0
down vote













If you are using this to adjust figure captions, I would go with @Mico's suggestion and make use of the caption package. But, as an exercise on how to do this, one way is to use the xstring package and extract the string before and after the first space:



enter image description here



Code



documentclass{article}
usepackage{xstring}

defmymacro#1#2#3#4#5{%
StrBefore{#4}{ }[FigNum]%
StrBehind{#4}{ }[FigLabel]%
textbf{Figure FigNum}:~FigLabel%
}%

begin{document}

mymacro{}{}{}{1.1 Optimal solution of RNASP}{}

end{document}





share|improve this answer





















  • Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
    – Mark
    Jun 2 at 12:01












  • Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
    – Mark
    Jun 2 at 12:15












  • I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
    – Mark
    Jun 3 at 5:31










  • @Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
    – Peter Grill
    Jun 3 at 7:16










  • I use this for table of figures. I updated my question after making a detokenize.
    – Mark
    Jun 3 at 9:20













up vote
0
down vote










up vote
0
down vote









If you are using this to adjust figure captions, I would go with @Mico's suggestion and make use of the caption package. But, as an exercise on how to do this, one way is to use the xstring package and extract the string before and after the first space:



enter image description here



Code



documentclass{article}
usepackage{xstring}

defmymacro#1#2#3#4#5{%
StrBefore{#4}{ }[FigNum]%
StrBehind{#4}{ }[FigLabel]%
textbf{Figure FigNum}:~FigLabel%
}%

begin{document}

mymacro{}{}{}{1.1 Optimal solution of RNASP}{}

end{document}





share|improve this answer












If you are using this to adjust figure captions, I would go with @Mico's suggestion and make use of the caption package. But, as an exercise on how to do this, one way is to use the xstring package and extract the string before and after the first space:



enter image description here



Code



documentclass{article}
usepackage{xstring}

defmymacro#1#2#3#4#5{%
StrBefore{#4}{ }[FigNum]%
StrBehind{#4}{ }[FigLabel]%
textbf{Figure FigNum}:~FigLabel%
}%

begin{document}

mymacro{}{}{}{1.1 Optimal solution of RNASP}{}

end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 2 at 11:08









Peter Grill

163k24432744




163k24432744












  • Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
    – Mark
    Jun 2 at 12:01












  • Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
    – Mark
    Jun 2 at 12:15












  • I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
    – Mark
    Jun 3 at 5:31










  • @Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
    – Peter Grill
    Jun 3 at 7:16










  • I use this for table of figures. I updated my question after making a detokenize.
    – Mark
    Jun 3 at 9:20


















  • Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
    – Mark
    Jun 2 at 12:01












  • Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
    – Mark
    Jun 2 at 12:15












  • I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
    – Mark
    Jun 3 at 5:31










  • @Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
    – Peter Grill
    Jun 3 at 7:16










  • I use this for table of figures. I updated my question after making a detokenize.
    – Mark
    Jun 3 at 9:20
















Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
– Mark
Jun 2 at 12:01






Thank you but I get some errors. For example StrBefore{abcd efgh}{ }[FigNum]% works well but StrBefore{#4}{ }[FigNum]% doesn't work. I get errors from .lof file. First error: Undefined control sequence for the line: contentsline {figure}{numberline {1.1}{ignorespaces Optimal solution of RNASP.relax }}{12}{figure.caption.11}
– Mark
Jun 2 at 12:01














Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
– Mark
Jun 2 at 12:15






Does PDFLatex causes this problem ? I use PDFLatex to add width parameter like this: includegraphics[width=6cm]{myfigure}. When I use XeLatex or LuaLatex, includegraphics give keyval error.
– Mark
Jun 2 at 12:15














I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
– Mark
Jun 3 at 5:31




I added your string manipulation to the line of 206-208 of the gsu12.def file. You can see example project here: overleaf.com/16674170vmvhjncqjndv This is the error: ibb.co/gZUn2d
– Mark
Jun 3 at 5:31












@Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
– Peter Grill
Jun 3 at 7:16




@Mark: Please compose a fully compilable MWE that reproduces the problem including the documentclass and the appropriate packages. Remove anything that is not necessary to reproduce the problem and post that code in the question. If you are doing this for figure captions, you really should use a package such as caption. The above was to illustrate how you could do what you asked in the bullet points in the question.
– Peter Grill
Jun 3 at 7:16












I use this for table of figures. I updated my question after making a detokenize.
– Mark
Jun 3 at 9:20




I use this for table of figures. I updated my question after making a detokenize.
– Mark
Jun 3 at 9:20


















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f434603%2fmodifying-argument-in-macro%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

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?