LaTeX forum ⇒ Document Classes\qformat in exam documentclass

Information and discussion about specific document classes and how to create your own document classes.
2szeba
Posts: 10
Joined: Sat Oct 30, 2021 10:50 pm

\qformat in exam documentclass

Postby 2szeba » Mon Apr 10, 2023 7:20 pm

I' m using exam package. Command \qformat allows you to change questions enumeration style. However, when using this command, the body of question starts on a new line. Can I somehow change it (I want to start question on this line, where number of question is)?

Recommended reading 2021:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics
User avatar
Stefan Kottwitz
Site Admin
Posts: 10050
Joined: Mon Mar 10, 2008 9:44 pm

\qformat in exam documentclass

Postby Stefan Kottwitz » Mon Apr 10, 2023 7:27 pm

Hi,

if you like, perhaps post a short compilable example that shows the undesired behavior, so we can help to improve or patch it.

Stefan
LaTeX.org admin

2szeba
Posts: 10
Joined: Sat Oct 30, 2021 10:50 pm

\qformat in exam documentclass

Postby 2szeba » Mon Apr 10, 2023 7:33 pm

\documentclass[a4paper,12pt,addpoints]{exam}
\qformat{\textbf{\underline{\textbf{Zadanie }\thequestion}}\quad\thepoints}
\usepackage{polski}
\begin{document}
\pagestyle{head}\firstpageheader{}{}{}
\begin{questions}
\question some question
\end{questions}
\end{document}

rais
Posts: 390
Joined: Sun Nov 16, 2014 8:51 pm

\qformat in exam documentclass

Postby rais » Sun Apr 16, 2023 10:40 pm

You could try redefining \questionlabel instead of using \qformat:
\documentclass[a4paper,12pt,addpoints]{exam}
\renewcommand*\questionlabel{\underline{\textbf{Zadanie }\thequestion}}
\usepackage{polski}
\begin{document}
\pagestyle{head}\firstpageheader{}{}{}
\begin{questions}
\question some question
\end{questions}
\end{document}

KR
Rainer


Return to “Document Classes”

Who is online

Users browsing this forum: No registered users and 9 guests