Creacting automated equation list of symbols using glossary
up vote
0
down vote
favorite
I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent
does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds
which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls
or glsdesc
macros, I get the following errors:
Argument of @tempc has an extra }. addLegends{test1,test2}
File ended while scanning use of @tempc.
Missing endcsname inserted. addLegends{test1,test2}
Paragraph ended before @tempc was complete. addLegends{test1,test2}
Undefined control sequence. addLegends{test1,test2}
The following macro has been used:
makeatletter
newififshowleg
newcommand{addLegends}[1]{%
showlegfalse
@for@tempa:=#1do{%
ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
ifshowleg %
with: %
begin{conditions} %
@for@tempb:=#1do{ %
ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
gls{@tempb} & glsdesc{@tempb}\ %
}{}}%
end{conditions} %
else fi %
}
makeatother
And this is a reduced version of the latex document:
usepackage[toc]{glossaries}
glsenableentrycount
% MACRO
newglossaryentry{test1}{name={test1},description={TEST1}}
newglossaryentry{test2}{name={test2},description={TEST2}}
begin{document}
addLegends{test1,test2}
begin{end}
Does anybody know what is causing the error?
Thanks,
Markus
glossaries loops
New contributor
add a comment |
up vote
0
down vote
favorite
I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent
does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds
which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls
or glsdesc
macros, I get the following errors:
Argument of @tempc has an extra }. addLegends{test1,test2}
File ended while scanning use of @tempc.
Missing endcsname inserted. addLegends{test1,test2}
Paragraph ended before @tempc was complete. addLegends{test1,test2}
Undefined control sequence. addLegends{test1,test2}
The following macro has been used:
makeatletter
newififshowleg
newcommand{addLegends}[1]{%
showlegfalse
@for@tempa:=#1do{%
ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
ifshowleg %
with: %
begin{conditions} %
@for@tempb:=#1do{ %
ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
gls{@tempb} & glsdesc{@tempb}\ %
}{}}%
end{conditions} %
else fi %
}
makeatother
And this is a reduced version of the latex document:
usepackage[toc]{glossaries}
glsenableentrycount
% MACRO
newglossaryentry{test1}{name={test1},description={TEST1}}
newglossaryentry{test2}{name={test2},description={TEST2}}
begin{document}
addLegends{test1,test2}
begin{end}
Does anybody know what is causing the error?
Thanks,
Markus
glossaries loops
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent
does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds
which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls
or glsdesc
macros, I get the following errors:
Argument of @tempc has an extra }. addLegends{test1,test2}
File ended while scanning use of @tempc.
Missing endcsname inserted. addLegends{test1,test2}
Paragraph ended before @tempc was complete. addLegends{test1,test2}
Undefined control sequence. addLegends{test1,test2}
The following macro has been used:
makeatletter
newififshowleg
newcommand{addLegends}[1]{%
showlegfalse
@for@tempa:=#1do{%
ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
ifshowleg %
with: %
begin{conditions} %
@for@tempb:=#1do{ %
ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
gls{@tempb} & glsdesc{@tempb}\ %
}{}}%
end{conditions} %
else fi %
}
makeatother
And this is a reduced version of the latex document:
usepackage[toc]{glossaries}
glsenableentrycount
% MACRO
newglossaryentry{test1}{name={test1},description={TEST1}}
newglossaryentry{test2}{name={test2},description={TEST2}}
begin{document}
addLegends{test1,test2}
begin{end}
Does anybody know what is causing the error?
Thanks,
Markus
glossaries loops
New contributor
I want to define a macro to add an automated symbol explanation under an equation. I have to use pre-defined glossary entries because the glsentrycurrent
does not allow to add new glossaries in the document. To add the automated legend I define the newcommand addLegeds
which should basically loop over all comma separated strings passed as an argument and check if they have been used befor. If all of them were used befor no legend should be added. The macro works exept that as soon as I use the gls
or glsdesc
macros, I get the following errors:
Argument of @tempc has an extra }. addLegends{test1,test2}
File ended while scanning use of @tempc.
Missing endcsname inserted. addLegends{test1,test2}
Paragraph ended before @tempc was complete. addLegends{test1,test2}
Undefined control sequence. addLegends{test1,test2}
The following macro has been used:
makeatletter
newififshowleg
newcommand{addLegends}[1]{%
showlegfalse
@for@tempa:=#1do{%
ifnumequal{glsentrycurrcount{@tempa}}{0}{showlegtrue}{}}%
ifshowleg %
with: %
begin{conditions} %
@for@tempb:=#1do{ %
ifnumequal{glsentrycurrcount{@tempb}}{0}{ %
gls{@tempb} & glsdesc{@tempb}\ %
}{}}%
end{conditions} %
else fi %
}
makeatother
And this is a reduced version of the latex document:
usepackage[toc]{glossaries}
glsenableentrycount
% MACRO
newglossaryentry{test1}{name={test1},description={TEST1}}
newglossaryentry{test2}{name={test2},description={TEST2}}
begin{document}
addLegends{test1,test2}
begin{end}
Does anybody know what is causing the error?
Thanks,
Markus
glossaries loops
glossaries loops
New contributor
New contributor
New contributor
asked 2 mins ago
mboe
1
1
New contributor
New contributor
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
mboe is a new contributor. Be nice, and check out our Code of Conduct.
mboe is a new contributor. Be nice, and check out our Code of Conduct.
mboe is a new contributor. Be nice, and check out our Code of Conduct.
mboe is a new contributor. Be nice, and check out our Code of Conduct.
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%2f462658%2fcreacting-automated-equation-list-of-symbols-using-glossary%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