Text Formatting5 selection switch question

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

5 selection switch question

Post by mshj »

hi
(excuse me, my English is very bad!)
i need to define 5 selection question in my book, for example:
2+2=?
1)1 2)2 3)3 4)4 5)5
i use this template,everything in this template is automatically, and i have not any problem in 4-choice exam, but i need to design a 5-choice exam on this templete. everything can help me?
Attachments
exam.tex
(5.57 KiB) Downloaded 416 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

5 selection switch question

Post by Johannes_B »

Use the proper tool, for example the exam class. It can do much more.

Code: Select all

\documentclass[
%	answers %JB: Comment this in and see the difference
]{exam}
\begin{document}
\begin{questions}
	\question $2+3=$
	\begin{choices}
		\choice 1
		\choice 4
		\choice 8
		\CorrectChoice 5
		\choice 42
	\end{choices}
	\question $1+3=$
	\begin{oneparchoices}
		\choice 1
		\CorrectChoice 4
		\choice 8
		\choice 5
		\choice 42
	\end{oneparchoices}
\end{questions}
\end{document}
Package exsheets might be of interest as well, but it doesn't support multiple choice questions.

My personal Opinion: Don't use this for maths.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mshj
Posts: 12
Joined: Tue Jul 15, 2014 3:41 pm

Re: 5 selection switch question

Post by mshj »

tank you, but i want to use this template. becouse exam document class have problem with xepersian package and persian alphbet! also my template aoutomaticaly arreng choices, for example if question choice is long, it's arrang choices in 2 line, if so long it's arrange them in 4 line! it's can work in any language and any symbol or alphbet!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: 5 selection switch question

Post by Johannes_B »

Your template is pretty simple, but changing it needs some time/effort.

What is the problem with xepersian and exam? I added the package and everything seems fine (nothing exploded, no blood in the pdf file, but then again i can't read persian, so i need your input on what is wrong ;-)
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: 5 selection switch question

Post by Johannes_B »

I just had a look at the documentation of package xepersian. Section 6.2 describes how to typeset multiple-choice questions. Please have a look at it.

EDIT: http://tex.stackexchange.com/questions/ ... ion-in-exa
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
mshj
Posts: 12
Joined: Tue Jul 15, 2014 3:41 pm

Re: 5 selection switch question

Post by mshj »

I LOVE YOU...
when i use exam, choice number is hide, but when i use final answer in this page all is OK!
thank you
Post Reply