Code: Select all
\newenvironment{question}{\itshape}{}
\newenvironment{solution}{\\[2mm]\marginnote{-}}{}
Code: Select all
\begin{question}
Question?
\end{question}\begin{solution}
Answer
\end{solution}
Code: Select all
\newenvironment{question}{\itshape}{}
\newenvironment{solution}{\\[2mm]\marginnote{-}}{}
Code: Select all
\begin{question}
Question?
\end{question}\begin{solution}
Answer
\end{solution}
NEW: TikZ book now 40% off at Amazon.com for a short time.
Thank you very much for your answer. I'm new to LaTeX and I'm impressed by the amount of possibilities. It seems there is a package for just about everything. However in this case, I don't think the examdesign package will solve the problem with the misaligned text in the margin (which is by the way just a small marker to assist the lecturer in quickly finding the sample solutions).localghost wrote:The examdesign class (or related packages) may be better for this purpose.
Here you are:localghost wrote:I think at this point a minimal working example (MWE) is necessary just to see what you are doing. But I won't be able to look at it until after the Xmas holidays.
Code: Select all
\documentclass[11pt,a4paper,fleqn]{article}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{marginnote}
\setlength{\parindent}{0em}
\reversemarginpar
\newenvironment{question}{\itshape}{}
\newenvironment{solution}{\\\marginnote{->}}{}
\begin{document}
\begin{question}
Question
\end{question}\begin{solution}
Solution with correctly aligned marker on the left
\end{solution}\\
\begin{question}
Question
\end{question}\begin{solution}
\begin{enumerate}
\item The marker should be at the same vertical position like this text
\end{enumerate}
\end{solution}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.