Label or tag for questions












2















I am making mini question banks on different chapters of physics. For this, I am using the 'exam' class. what I need is the following:



I want to put some information for my own use against each of the questions. For example, year, difficulty level (hard, easy etc.), topic name and such labels. I need the ability to print or suppress printing these labels depending on situations.



Following is an MWE:



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}


unframedsolutions
printanswers

begin{document}
section{ABC}
begin{questions}

question This is question 1 ?
begin{solution}
This is answer 1
end{solution}

question This is question 2
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


What is want is like below :



    begin{document}
section{ABC}
begin{questions}

question This is question 1 ? label{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 label{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


And as we use 'printanswers', I should be able to use 'printlabels' or 'noprintlabels'



How to achieve this ?










share|improve this question























  • label is already used by LaTeX for something else. You should come up with a new name.

    – Steven B. Segletes
    11 hours ago











  • Yes, any other name instead of 'label'.

    – cosmicraga
    11 hours ago
















2















I am making mini question banks on different chapters of physics. For this, I am using the 'exam' class. what I need is the following:



I want to put some information for my own use against each of the questions. For example, year, difficulty level (hard, easy etc.), topic name and such labels. I need the ability to print or suppress printing these labels depending on situations.



Following is an MWE:



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}


unframedsolutions
printanswers

begin{document}
section{ABC}
begin{questions}

question This is question 1 ?
begin{solution}
This is answer 1
end{solution}

question This is question 2
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


What is want is like below :



    begin{document}
section{ABC}
begin{questions}

question This is question 1 ? label{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 label{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


And as we use 'printanswers', I should be able to use 'printlabels' or 'noprintlabels'



How to achieve this ?










share|improve this question























  • label is already used by LaTeX for something else. You should come up with a new name.

    – Steven B. Segletes
    11 hours ago











  • Yes, any other name instead of 'label'.

    – cosmicraga
    11 hours ago














2












2








2


2






I am making mini question banks on different chapters of physics. For this, I am using the 'exam' class. what I need is the following:



I want to put some information for my own use against each of the questions. For example, year, difficulty level (hard, easy etc.), topic name and such labels. I need the ability to print or suppress printing these labels depending on situations.



Following is an MWE:



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}


unframedsolutions
printanswers

begin{document}
section{ABC}
begin{questions}

question This is question 1 ?
begin{solution}
This is answer 1
end{solution}

question This is question 2
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


What is want is like below :



    begin{document}
section{ABC}
begin{questions}

question This is question 1 ? label{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 label{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


And as we use 'printanswers', I should be able to use 'printlabels' or 'noprintlabels'



How to achieve this ?










share|improve this question














I am making mini question banks on different chapters of physics. For this, I am using the 'exam' class. what I need is the following:



I want to put some information for my own use against each of the questions. For example, year, difficulty level (hard, easy etc.), topic name and such labels. I need the ability to print or suppress printing these labels depending on situations.



Following is an MWE:



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}


unframedsolutions
printanswers

begin{document}
section{ABC}
begin{questions}

question This is question 1 ?
begin{solution}
This is answer 1
end{solution}

question This is question 2
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


What is want is like below :



    begin{document}
section{ABC}
begin{questions}

question This is question 1 ? label{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 label{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


And as we use 'printanswers', I should be able to use 'printlabels' or 'noprintlabels'



How to achieve this ?







labels exam tags






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 11 hours ago









cosmicragacosmicraga

1,10441533




1,10441533













  • label is already used by LaTeX for something else. You should come up with a new name.

    – Steven B. Segletes
    11 hours ago











  • Yes, any other name instead of 'label'.

    – cosmicraga
    11 hours ago



















  • label is already used by LaTeX for something else. You should come up with a new name.

    – Steven B. Segletes
    11 hours ago











  • Yes, any other name instead of 'label'.

    – cosmicraga
    11 hours ago

















label is already used by LaTeX for something else. You should come up with a new name.

– Steven B. Segletes
11 hours ago





label is already used by LaTeX for something else. You should come up with a new name.

– Steven B. Segletes
11 hours ago













Yes, any other name instead of 'label'.

– cosmicraga
11 hours ago





Yes, any other name instead of 'label'.

– cosmicraga
11 hours ago










1 Answer
1






active

oldest

votes


















2














Something like this??



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}
newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}
newcommandnoprintqtags{defqtag##1{}}

unframedsolutions
printanswers
printqtags
begin{document}
section{ABC}
begin{questions}

question This is question 1 ? qtag{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 qtag{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


enter image description here



With printqtags changed to noprintqtags, the result becomes



enter image description here






share|improve this answer


























  • Yes, exactly. :) Thank you so much.

    – cosmicraga
    11 hours ago











  • Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

    – cosmicraga
    11 hours ago








  • 1





    @cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

    – Steven B. Segletes
    11 hours ago






  • 1





    Perfect. :) Please edit your answer.

    – cosmicraga
    11 hours ago












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%2f483022%2flabel-or-tag-for-questions%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









2














Something like this??



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}
newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}
newcommandnoprintqtags{defqtag##1{}}

unframedsolutions
printanswers
printqtags
begin{document}
section{ABC}
begin{questions}

question This is question 1 ? qtag{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 qtag{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


enter image description here



With printqtags changed to noprintqtags, the result becomes



enter image description here






share|improve this answer


























  • Yes, exactly. :) Thank you so much.

    – cosmicraga
    11 hours ago











  • Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

    – cosmicraga
    11 hours ago








  • 1





    @cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

    – Steven B. Segletes
    11 hours ago






  • 1





    Perfect. :) Please edit your answer.

    – cosmicraga
    11 hours ago
















2














Something like this??



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}
newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}
newcommandnoprintqtags{defqtag##1{}}

unframedsolutions
printanswers
printqtags
begin{document}
section{ABC}
begin{questions}

question This is question 1 ? qtag{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 qtag{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


enter image description here



With printqtags changed to noprintqtags, the result becomes



enter image description here






share|improve this answer


























  • Yes, exactly. :) Thank you so much.

    – cosmicraga
    11 hours ago











  • Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

    – cosmicraga
    11 hours ago








  • 1





    @cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

    – Steven B. Segletes
    11 hours ago






  • 1





    Perfect. :) Please edit your answer.

    – cosmicraga
    11 hours ago














2












2








2







Something like this??



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}
newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}
newcommandnoprintqtags{defqtag##1{}}

unframedsolutions
printanswers
printqtags
begin{document}
section{ABC}
begin{questions}

question This is question 1 ? qtag{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 qtag{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


enter image description here



With printqtags changed to noprintqtags, the result becomes



enter image description here






share|improve this answer















Something like this??



documentclass[addpoints,answers,10pt]{exam}
usepackage[T1]{fontenc}
usepackage{graphicx}
usepackage{tabularx}
usepackage{nonfloat}
usepackage{caption}
usepackage{amsmath,amssymb}
usepackage{lmodern}
usepackage{textcomp}
usepackage{ifpdf}
usepackage[export]{adjustbox}


usepackage{graphicx}
usepackage{background}
newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}
newcommandnoprintqtags{defqtag##1{}}

unframedsolutions
printanswers
printqtags
begin{document}
section{ABC}
begin{questions}

question This is question 1 ? qtag{difficult, 2009, Light}
begin{solution}
This is answer 1
end{solution}

question This is question 2 qtag{moderate, 2019, Sound}
begin{solution}
This is answer 2
end{solution}
question This is Question 3
begin{solution}
This is answer 3
end{solution}
end{questions}
end{document}


enter image description here



With printqtags changed to noprintqtags, the result becomes



enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 11 hours ago

























answered 11 hours ago









Steven B. SegletesSteven B. Segletes

160k9205413




160k9205413













  • Yes, exactly. :) Thank you so much.

    – cosmicraga
    11 hours ago











  • Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

    – cosmicraga
    11 hours ago








  • 1





    @cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

    – Steven B. Segletes
    11 hours ago






  • 1





    Perfect. :) Please edit your answer.

    – cosmicraga
    11 hours ago



















  • Yes, exactly. :) Thank you so much.

    – cosmicraga
    11 hours ago











  • Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

    – cosmicraga
    11 hours ago








  • 1





    @cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

    – Steven B. Segletes
    11 hours ago






  • 1





    Perfect. :) Please edit your answer.

    – cosmicraga
    11 hours ago

















Yes, exactly. :) Thank you so much.

– cosmicraga
11 hours ago





Yes, exactly. :) Thank you so much.

– cosmicraga
11 hours ago













Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

– cosmicraga
11 hours ago







Exactly. how can I print those labels in a separate line or paragraph below the question, just like the solution environment with a heading like that in 'Solution'?

– cosmicraga
11 hours ago






1




1





@cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

– Steven B. Segletes
11 hours ago





@cosmicraga Something like newcommandprintqtags{defqtag##1{partextbf{Tag: (##1)}}}? If so, I will edit my answer.

– Steven B. Segletes
11 hours ago




1




1





Perfect. :) Please edit your answer.

– cosmicraga
11 hours ago





Perfect. :) Please edit your answer.

– cosmicraga
11 hours ago


















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%2f483022%2flabel-or-tag-for-questions%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

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)