Text Formattinglabel for a question in exam class

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
mshj
Posts: 12
Joined: Tue Jul 15, 2014 3:41 pm

label for a question in exam class

Post by mshj »

hi
how i can use label for a question in exam document class? you can see my goal in attach file
Attachments
mshjExamChoice.png
mshjExamChoice.png (9.11 KiB) Viewed 6826 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

label for a question in exam class

Post by Johannes_B »

I am not sure what you want to know. You mention labels, but the picture shows something like choices to do multiple choice tests. Can you try to explain in one or two sentences what you are trying to achieve, maybe even showing a minimal working example?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

label for a question in exam class

Post by StarValkyrie »

Code: Select all

\question[]my question? \\
\begin{flushright}
it's reference
\par\end{flushright}
\begin{oneparchoices}
\choice one 
\choice two
\choice three
\choice four
\end{choices}\pagebreak[3]{}
alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

label for a question in exam class

Post by alainremillard »

If you are asking about cross-reference, they are done the same way latex does, with \label{tag} and \ref{tag}. You may have to run latex twice to get every reference right.

Code: Select all

\documentclass[12pt]{exam}
\begin{document}
\begin{questions}
\question[]my question? \label{myquestion} \\
\begin{flushright}
it's a reference to question \ref{myquestion}
\par\end{flushright}
\begin{oneparchoices}
\choice one 
\choice two
\choice three
\choice four
\end{oneparchoices}\pagebreak[3]{}
\end{questions}
\end{document}
Post Reply