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
macros typography optional-arguments
add a comment |
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
macros typography optional-arguments
Is this a purely abstract exercise, or is@mymacrocreating an instance of afigurefloat? If it's the latter, have you considered loading and using thecaptionpackage?
– 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 intol@figureor@dottedtocline? your overleaf code uses classgsufbeand many many packages so is not at all minimal. The crucial thing here is that your are usinghyperrefhence the decoration you saw withdetokenize.
– jfbu
Dec 1 at 11:30
in the case at than it appears you would only need to redefine locallynumberlineto 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
add a comment |
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
macros typography optional-arguments
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
macros typography optional-arguments
edited Jun 4 at 7:41
asked Jun 2 at 9:47
Mark
306
306
Is this a purely abstract exercise, or is@mymacrocreating an instance of afigurefloat? If it's the latter, have you considered loading and using thecaptionpackage?
– 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 intol@figureor@dottedtocline? your overleaf code uses classgsufbeand many many packages so is not at all minimal. The crucial thing here is that your are usinghyperrefhence the decoration you saw withdetokenize.
– jfbu
Dec 1 at 11:30
in the case at than it appears you would only need to redefine locallynumberlineto 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
add a comment |
Is this a purely abstract exercise, or is@mymacrocreating an instance of afigurefloat? If it's the latter, have you considered loading and using thecaptionpackage?
– 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 intol@figureor@dottedtocline? your overleaf code uses classgsufbeand many many packages so is not at all minimal. The crucial thing here is that your are usinghyperrefhence the decoration you saw withdetokenize.
– jfbu
Dec 1 at 11:30
in the case at than it appears you would only need to redefine locallynumberlineto 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
add a comment |
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:

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}
Thank you but I get some errors. For exampleStrBefore{abcd efgh}{ }[FigNum]%works well butStrBefore{#4}{ }[FigNum]%doesn't work. I get errors from .lof file. First error:Undefined control sequencefor 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 thedocumentclassand 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 ascaption. 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
|
show 2 more comments
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:

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}
Thank you but I get some errors. For exampleStrBefore{abcd efgh}{ }[FigNum]%works well butStrBefore{#4}{ }[FigNum]%doesn't work. I get errors from .lof file. First error:Undefined control sequencefor 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 thedocumentclassand 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 ascaption. 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
|
show 2 more comments
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:

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}
Thank you but I get some errors. For exampleStrBefore{abcd efgh}{ }[FigNum]%works well butStrBefore{#4}{ }[FigNum]%doesn't work. I get errors from .lof file. First error:Undefined control sequencefor 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 thedocumentclassand 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 ascaption. 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
|
show 2 more comments
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:

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}
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:

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}
answered Jun 2 at 11:08
Peter Grill
163k24432744
163k24432744
Thank you but I get some errors. For exampleStrBefore{abcd efgh}{ }[FigNum]%works well butStrBefore{#4}{ }[FigNum]%doesn't work. I get errors from .lof file. First error:Undefined control sequencefor 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 thedocumentclassand 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 ascaption. 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
|
show 2 more comments
Thank you but I get some errors. For exampleStrBefore{abcd efgh}{ }[FigNum]%works well butStrBefore{#4}{ }[FigNum]%doesn't work. I get errors from .lof file. First error:Undefined control sequencefor 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 thedocumentclassand 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 ascaption. 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
|
show 2 more comments
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Is this a purely abstract exercise, or is
@mymacrocreating an instance of afigurefloat? If it's the latter, have you considered loading and using thecaptionpackage?– 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@figureor@dottedtocline? your overleaf code uses classgsufbeand many many packages so is not at all minimal. The crucial thing here is that your are usinghyperrefhence the decoration you saw withdetokenize.– jfbu
Dec 1 at 11:30
in the case at than it appears you would only need to redefine locally
numberlineto 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