Document Classes\qformat in exam documentclass

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

\qformat in exam documentclass

Post by 2szeba »

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 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

\qformat in exam documentclass

Post by Stefan Kottwitz »

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

Post by 2szeba »

Code: Select all

\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: 419
Joined: Sun Nov 16, 2014 8:51 pm

\qformat in exam documentclass

Post by rais »

You could try redefining \questionlabel instead of using \qformat:

Code: Select all

\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
Post Reply