LaTeX forum ⇒ Text FormattingChange \choice style with examdesign class

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
eliaspoky
Posts: 1
Joined: Sat Jan 24, 2015 8:31 pm

Change \choice style with examdesign class

Postby eliaspoky » Sat Jan 24, 2015 8:43 pm

Hi,

I'm working with examdesign multiple choice exams. I use this because I can make the questions go random.

I want to know how can I change the \choice style on the {multiplechoice} environment. I have this:

  1. \documentclass[10pt]{examdesign}
  2. \usepackage[spanish]{babel}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[top=2cm,left=2cm,right=2cm,bottom=2cm]{geometry}
  5. \usepackage{amssymb, amsmath, amsbsy}
  6. \usepackage{enumerate}
  7. \usepackage{verbatim}
  8. \usepackage{pifont}
  9. \SectionFont{\large\sffamily}
  10. \Fullpages
  11. %\ContinuousNumbering
  12. %\ShortKey
  13. \DefineAnswerWrapper{}{}
  14. \NumberOfVersions{2}
  15. \IncludeFromFile{foobar.tex}
  16. %\NoKey
  17. %\NoRearrange
  18. \ShortKey
  19.  
  20. \begin{document}
  21. \begin{multiplechoice}[title={PSU}, resetcounter=yes, rearrange=yes, keycolumns=5]
  22. \begin{question}
  23. $5 \{- (4 - 5) - 3[-2 + 3 - (-8 - 3)]\} =$
  24. \choice[!]{ $-175$ }
  25. \choice{$150$}
  26. \choice{$-50$}
  27. \choice{$-40$}
  28. \end{question}
  29. \end{multiplechoice}
  30. \end{document}


That gives to me something like:

(a) -175
(b) 150
(c) -50
(d) -40

but what I want is something like:

A) -175
B) 140
C) -50
D) -40

Do you know what can I do?

Thanks. :)

Tags:

alainremillard
Posts: 45
Joined: Fri Mar 16, 2012 8:22 pm

Postby alainremillard » Mon Feb 02, 2015 6:12 pm

Looking through the examdesign class files, there is no mechanism to change this behavior. So, you'll have to redefine the command. The following should do the trick. Place it just before the \begin{document}

  1. \makeatletter
  2. \renewcommand{\exam@DefaultChoice}[2][]{%
  3. \ifchoice \relax
  4. \else \@mcstartlist \choicetrue
  5. \fi
  6. \ifanswer
  7. \if#1!%
  8. \ifbox \vspace{-\fboxsep}\item[\hfill\fbox{\Alph{choice})}\hfill] #2
  9. \vspace{-\fboxsep}%
  10. \else
  11. \item[\hfill\MCfont{\Alph{choice})}\hfill] \MCfont{#2}%
  12. \fi
  13. \else \item[\hfill\Alph{choice})\hfill] #2
  14. \fi
  15. \stepcounter{choice}%
  16. \else
  17. \item[\hfill\Alph{choice})\hfill] #2
  18. \stepcounter{choice}%
  19. \fi}
  20. \makeatother


Have a nice day
Alain Rémillard

afrendly
Posts: 3
Joined: Thu Oct 27, 2016 4:17 pm

Postby afrendly » Thu Oct 27, 2016 5:06 pm

1. How to forward and reverse search with examdesign? Always back to "\end{document}" in reverse search.
2. How to left aligned number of question as image below.
Image
3. I use Google Translate. Thanks.

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Oct 27, 2016 5:23 pm

Welcome, i don't know what you mean by forward and backward search with examdesign. Can you elaborate?

For the second part, we will need 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.

afrendly
Posts: 3
Joined: Thu Oct 27, 2016 4:17 pm

Postby afrendly » Wed Nov 30, 2016 9:01 am

Johannes_B wrote:Welcome, i don't know what you mean by forward and backward search with examdesign. Can you elaborate?

For the second part, we will need a minimal working example.

1. How to inverse search when use examdesign clsass? I can't. Example:
  1. https://www.sharelatex.com/project/581206c62fa176004c871af6

It come back to "\end{document}".
2. How to left align number questions. Example: 9 and 10 not left align in above link.
Thank.

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Sun Dec 04, 2016 1:08 pm

I still don't know what the first part is about.

For the second however, you can use
  1. \usepackage{enumitem}
  2. \setlist[enumerate]{align=left}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 3 guests