Labelling, numbering and referring to a question












1















I wish to typeset the following questions in latex



Q 1 Find the shortest path....                      
Q 2 Explain...


I want to type these questions under begin{question}......end{question} in latex and label each question to refer them later.










share|improve this question




















  • 3





    Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

    – CarLaTeX
    Mar 31 at 7:32











  • Please see this link: minimal working example (MWE)

    – Kurt
    Mar 31 at 7:42













  • @Mico No, i don't wish to use exam document class

    – gete
    Mar 31 at 8:05











  • @Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

    – gete
    Mar 31 at 8:16
















1















I wish to typeset the following questions in latex



Q 1 Find the shortest path....                      
Q 2 Explain...


I want to type these questions under begin{question}......end{question} in latex and label each question to refer them later.










share|improve this question




















  • 3





    Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

    – CarLaTeX
    Mar 31 at 7:32











  • Please see this link: minimal working example (MWE)

    – Kurt
    Mar 31 at 7:42













  • @Mico No, i don't wish to use exam document class

    – gete
    Mar 31 at 8:05











  • @Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

    – gete
    Mar 31 at 8:16














1












1








1


0






I wish to typeset the following questions in latex



Q 1 Find the shortest path....                      
Q 2 Explain...


I want to type these questions under begin{question}......end{question} in latex and label each question to refer them later.










share|improve this question
















I wish to typeset the following questions in latex



Q 1 Find the shortest path....                      
Q 2 Explain...


I want to type these questions under begin{question}......end{question} in latex and label each question to refer them later.







labels






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 31 at 8:02









Mico

286k32390779




286k32390779










asked Mar 31 at 7:21









getegete

475




475








  • 3





    Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

    – CarLaTeX
    Mar 31 at 7:32











  • Please see this link: minimal working example (MWE)

    – Kurt
    Mar 31 at 7:42













  • @Mico No, i don't wish to use exam document class

    – gete
    Mar 31 at 8:05











  • @Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

    – gete
    Mar 31 at 8:16














  • 3





    Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

    – CarLaTeX
    Mar 31 at 7:32











  • Please see this link: minimal working example (MWE)

    – Kurt
    Mar 31 at 7:42













  • @Mico No, i don't wish to use exam document class

    – gete
    Mar 31 at 8:05











  • @Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

    – gete
    Mar 31 at 8:16








3




3





Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

– CarLaTeX
Mar 31 at 7:32





Please edit your question and add a complete but minimal example which reproduces your problem. As is, I'm afraid it's very difficult to answer to your question.

– CarLaTeX
Mar 31 at 7:32













Please see this link: minimal working example (MWE)

– Kurt
Mar 31 at 7:42







Please see this link: minimal working example (MWE)

– Kurt
Mar 31 at 7:42















@Mico No, i don't wish to use exam document class

– gete
Mar 31 at 8:05





@Mico No, i don't wish to use exam document class

– gete
Mar 31 at 8:05













@Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

– gete
Mar 31 at 8:16





@Mico, you may resolve my problem with any suitable answer using exam document class or without using it, since i have no idea about this environment too. Yes, i am using asthm ntheorem environments

– gete
Mar 31 at 8:16










1 Answer
1






active

oldest

votes


















3














Here's a solution that employs the ntheorem package. It sets up a new theorem-like environment called question. Cross-referencing question environments can be achieved via the usual label-ref mechanism.



enter image description here



documentclass{article}

usepackage{ntheorem}
theoremstyle{plain}
theorembodyfont{upshape} % or "itshape", or whatever
newtheorem{question}{Q}

usepackage{cleveref} % optional (for cref and Cref macros)
crefname{question}{question}{questions}

begin{document}

begin{question} label{q:1}
Find the shortest path dots
end{question}

begin{question} label{q:2}
Explain dots
end{question}

Questions ref{q:1} and ref{q:2} dots

Cref{q:1,q:2} dots
end{document}





share|improve this answer
























  • Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

    – gete
    Mar 31 at 13:26











  • @gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

    – Mico
    Mar 31 at 14:14













  • @gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

    – Mico
    Mar 31 at 14:16











  • Thanks. Its fixed now

    – gete
    Apr 2 at 9:59












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%2f482373%2flabelling-numbering-and-referring-to-a-question%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









3














Here's a solution that employs the ntheorem package. It sets up a new theorem-like environment called question. Cross-referencing question environments can be achieved via the usual label-ref mechanism.



enter image description here



documentclass{article}

usepackage{ntheorem}
theoremstyle{plain}
theorembodyfont{upshape} % or "itshape", or whatever
newtheorem{question}{Q}

usepackage{cleveref} % optional (for cref and Cref macros)
crefname{question}{question}{questions}

begin{document}

begin{question} label{q:1}
Find the shortest path dots
end{question}

begin{question} label{q:2}
Explain dots
end{question}

Questions ref{q:1} and ref{q:2} dots

Cref{q:1,q:2} dots
end{document}





share|improve this answer
























  • Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

    – gete
    Mar 31 at 13:26











  • @gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

    – Mico
    Mar 31 at 14:14













  • @gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

    – Mico
    Mar 31 at 14:16











  • Thanks. Its fixed now

    – gete
    Apr 2 at 9:59
















3














Here's a solution that employs the ntheorem package. It sets up a new theorem-like environment called question. Cross-referencing question environments can be achieved via the usual label-ref mechanism.



enter image description here



documentclass{article}

usepackage{ntheorem}
theoremstyle{plain}
theorembodyfont{upshape} % or "itshape", or whatever
newtheorem{question}{Q}

usepackage{cleveref} % optional (for cref and Cref macros)
crefname{question}{question}{questions}

begin{document}

begin{question} label{q:1}
Find the shortest path dots
end{question}

begin{question} label{q:2}
Explain dots
end{question}

Questions ref{q:1} and ref{q:2} dots

Cref{q:1,q:2} dots
end{document}





share|improve this answer
























  • Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

    – gete
    Mar 31 at 13:26











  • @gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

    – Mico
    Mar 31 at 14:14













  • @gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

    – Mico
    Mar 31 at 14:16











  • Thanks. Its fixed now

    – gete
    Apr 2 at 9:59














3












3








3







Here's a solution that employs the ntheorem package. It sets up a new theorem-like environment called question. Cross-referencing question environments can be achieved via the usual label-ref mechanism.



enter image description here



documentclass{article}

usepackage{ntheorem}
theoremstyle{plain}
theorembodyfont{upshape} % or "itshape", or whatever
newtheorem{question}{Q}

usepackage{cleveref} % optional (for cref and Cref macros)
crefname{question}{question}{questions}

begin{document}

begin{question} label{q:1}
Find the shortest path dots
end{question}

begin{question} label{q:2}
Explain dots
end{question}

Questions ref{q:1} and ref{q:2} dots

Cref{q:1,q:2} dots
end{document}





share|improve this answer













Here's a solution that employs the ntheorem package. It sets up a new theorem-like environment called question. Cross-referencing question environments can be achieved via the usual label-ref mechanism.



enter image description here



documentclass{article}

usepackage{ntheorem}
theoremstyle{plain}
theorembodyfont{upshape} % or "itshape", or whatever
newtheorem{question}{Q}

usepackage{cleveref} % optional (for cref and Cref macros)
crefname{question}{question}{questions}

begin{document}

begin{question} label{q:1}
Find the shortest path dots
end{question}

begin{question} label{q:2}
Explain dots
end{question}

Questions ref{q:1} and ref{q:2} dots

Cref{q:1,q:2} dots
end{document}






share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 31 at 8:24









MicoMico

286k32390779




286k32390779













  • Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

    – gete
    Mar 31 at 13:26











  • @gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

    – Mico
    Mar 31 at 14:14













  • @gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

    – Mico
    Mar 31 at 14:16











  • Thanks. Its fixed now

    – gete
    Apr 2 at 9:59



















  • Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

    – gete
    Mar 31 at 13:26











  • @gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

    – Mico
    Mar 31 at 14:14













  • @gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

    – Mico
    Mar 31 at 14:16











  • Thanks. Its fixed now

    – gete
    Apr 2 at 9:59

















Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

– gete
Mar 31 at 13:26





Thanks for your response, but i couldn't fix yet. I am not using usepackage{ntheorem}, but working in the following environment: documentclass[11pt]{article} usepackage{amsthm, amstext} usepackage{amsmatch} newtheorem{thm}{Theorem}[section]

– gete
Mar 31 at 13:26













@gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

– Mico
Mar 31 at 14:14







@gete - If you're not willing or able to use the ntheorem package, why did you indicate earlier that you do? Incidentally, I've never heard of a package called amsmatch before. Does your code compile without errors?

– Mico
Mar 31 at 14:14















@gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

– Mico
Mar 31 at 14:16





@gete - If you must use the amsthm package, all you have to do is replace theoremstyle{plain} theorembodyfont{upshape} newtheorem{question}{Q} with theoremstyle{definition} newtheorem{question}{Q}.

– Mico
Mar 31 at 14:16













Thanks. Its fixed now

– gete
Apr 2 at 9:59





Thanks. Its fixed now

– gete
Apr 2 at 9:59


















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%2f482373%2flabelling-numbering-and-referring-to-a-question%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 change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents