Latest news 2019-12-05: new blog post "RSS Feeds and Other Notifications."

Bug Tracker

ID83
StatusClosed (Fixed)
Categorydatatooltk
Version1.4
Summaryfields repeat in the import of probsoln problems with data tool-gui interface on osx

Report

I am a Spanish user of LaTeX. I am a Physics teacher. Congratulations for your extraordinary package Probsoln, and the gui interface of datoooltk that avoid to import directly tex probsoln files with problems. I am trying to import your sample file: "prob-probspaces.tex" into the gui interface of datooltk that i installed in my macbook pro (OS X Yosemite), in a java environment, but imports the same contents into questions and answer fields. I do not have to resolve the problem.

José Antonio Torralba Hernández

MWE

%%
 % Finite probability spaces
\newproblem{weightedcoin}{%
A coin is weighted so that heads is four times as likely
as tails. Find the probability that:
\begin{textenum}
\item tails appears,
\item heads appears
\end{textenum}}{%
Let $p=P(T)$, then $P(H)=4p$. We require $P(H)+P(T)=1$,
so $4p+p=1$, hence $p=\frac{1}{5}$. Therefore:
\begin{textenum}
\item $P(T)=\frac{1}{5}$,
\item $P(H)=\frac{4}{5}$
\end{textenum}}

\newproblem*{validprobspaces}{%
Under which of the following functions does
$S=\{a_1,a_2\}$ become a probability space?
\par
\begin{textenum}
\begin{tabular}{ll}
\incorrectitem $P(a_1)=\frac{1}{3}$, $P(a_2)=\frac{1}{2}$
&
\correctitem $P(a_1)=\frac{3}{4}$, $P(a_2)=\frac{1}{4}$
\\
\correctitem $P(a_1)=1$, $P(a_2)=0$
&
\incorrectitem $P(a_1)=\frac{5}{4}$, $P(a_2)=-\frac{1}{4}$
\end{tabular}
\end{textenum}
}

Evaluation

At first I thought this was a bug as well, but I realise that this is due to the definition of \newproblem. The datatooltk import function works by inserting all text contained inside the onlyproblem environment into the Question field and all text contained inside the onlysolution environment into the Answer field. Any text in the problem that occurs outside of either of these environments is placed in both fields (as it would appear in the document regardless of the answers/noanswers setting). The \newproblem command is defined such that
 \newproblem[⟨n⟩][⟨default args⟩]{⟨label⟩}{⟨problem⟩}{⟨solution⟩}
is equivalent to
\begin{defproblem}[⟨n⟩][⟨default args⟩]{⟨label⟩}%
⟨problem⟩%
\begin{onlysolution}%
\begin{solution}%
⟨solution⟩%
\end{solution}%
\end{onlysolution}%
\end{defproblem}
(See section 6 "Defining a Problem" in the probsoln manual.) This means that ⟨problem⟩ isn't inside the onlyproblem environment which is why it ends up in both fields. If you use prob-probspaces2.tex instead of prob-probspaces.tex which uses defproblem instead of \newproblem then the import function works as expected.

Since it makes more sense for the import function to treat the ⟨problem⟩ argument of \newproblem as though it was inside onlyproblem I will modify the import function. (I can't change the definition of \newproblem within probsoln.sty as that would break backward compatibility, but I could get the import function to temporarily redefine it.)

Update 2015-04-20: fixed in version 1.5.

Add comment.

Watch This Report

If you would like to be notified whenever updates are made to this report, please fill in your email address in the box below and click on "Notify Me of Changes" button. (Please ensure the address is valid.) Your details won't be passed on to third parties in line with this site's Privacy Policy.

If you supply your name, it will be used in the email greeting, which provides a more personal message, otherwise you'll just get a generic greeting. If you have previously supplied your name when signing up for notifications, you don't need to resupply it unless you want to change it.

If you have previously subscribed to notifications for this report, you can unsubscribe by clicking on the "Stop Notification" button.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional.)
E mail:
Confirm E mail:
Confirm Bug ID:

To unsubscribe from all notifications use the notifications page.

Comment

You can append a comment to the report using the form below. Comments are checked first before being added. Any spam or offensive content will be removed first according to this site's Terms of Website Use. Please bear in mind that I develop and maintain free software in my spare time. If you want commerical level support then you can hire a TeX consultant.

The "Confirm Bug ID" field helps to protect against spambots. Please enter the bug ID (which you can find at the top of this page).

(Optional. If provided, it will be shown with the comment.)
Confirm Bug ID:

You can use the following markup:

[pre]Displayed verbatim[/pre]
[tt]monospace text[/tt]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

Click on the Preview button to preview the message.

Return to list.

© 2019 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs