Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
exercises: suppress printing of answers
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alan  
View profile  
 More options Jan 23 2012, 3:00 am
Newsgroups: comp.soft-sys.math.mathematica
From: Alan <alan.is...@gmail.com>
Date: Mon, 23 Jan 2012 08:00:14 +0000 (UTC)
Local: Mon, Jan 23 2012 3:00 am
Subject: exercises: suppress printing of answers
I have exercises with answers. I can put each exercise in a subsection
and each answer in a subsubsection (using the default style sheet).
I'd like to tag the answer heading cell (i.e., the subsubsection
styled cell) and use the tag to suppress outputting of the answers
(i.e., of all the material in that subsubsection, not just in the
heading), so that I can create a PDF of the exercises only.

I feel sure this can be done simply, but I don't see how to do it.
Suggestions?

Thanks,
Alan Isaac


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nasser M. Abbasi  
View profile  
 More options Jan 24 2012, 5:05 am
Newsgroups: comp.soft-sys.math.mathematica
From: "Nasser M. Abbasi" <n...@12000.org>
Date: Tue, 24 Jan 2012 10:05:25 +0000 (UTC)
Local: Tues, Jan 24 2012 5:05 am
Subject: Re: exercises: suppress printing of answers
On 1/23/2012 2:00 AM, Alan wrote:

> I have exercises with answers. I can put each exercise in a subsection
> and each answer in a subsubsection (using the default style sheet).
> I'd like to tag the answer heading cell (i.e., the subsubsection
> styled cell) and use the tag to suppress outputting of the answers
> (i.e., of all the material in that subsubsection, not just in the
> heading), so that I can create a PDF of the exercises only.

> I feel sure this can be done simply, but I don't see how to do it.
> Suggestions?

> Thanks,
> Alan Isaac

You should be able to just do

     Cell->Cell Properties-> and uncheck the Open property to close
the cells in question.

(select all the cells you want closed before hand with the mouse)

Later on, you can Open them again doing the reverse of the above.

--Nasser


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexei Boulbitch  
View profile  
 More options Jan 24 2012, 5:07 am
Newsgroups: comp.soft-sys.math.mathematica
From: Alexei Boulbitch <Alexei.Boulbi...@iee.lu>
Date: Tue, 24 Jan 2012 10:07:59 +0000 (UTC)
Local: Tues, Jan 24 2012 5:07 am
Subject: Re: exercises: suppress printing of answers
I have exercises with answers. I can put each exercise in a subsection

and each answer in a subsubsection (using the default style sheet).

I'd like to tag the answer heading cell (i.e., the subsubsection

styled cell) and use the tag to suppress outputting of the answers

(i.e., of all the material in that subsubsection, not just in the

heading), so that I can create a PDF of the exercises only.

I feel sure this can be done simply, but I don't see how to do it.

Suggestions?

Thanks,

Alan Isaac

Hi, Alan,

Recently here there was a discussion on making slides. Please have a look into my reply to this discussion:  Re: Using Mathematica to create slides<http://forums.wolfram.com/mathgroup/archive/2012/Jan/msg00285.html>, of 13.01.2012. Approaches to hide executable code described there you may like to apply to your case hiding answers. In addition you may have the answers in a separate file and connect the files with hyperlinks.

Further, the "Presentations" package of David Park has routines that may seem you attractive for your purposes. One of them, for example, enables you to keep answers together with the tasks document, but in an invisible form (all located in one closed technical Section). They may only become visible appearing in a separate window upon demand (after clicking a button) in the Mathematica environment. They are not visible when one reads a pdf file. Probably the Presentations package has also other approaches.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.

IEE S.A.

ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbi...@iee.lu<mailto:alexei.boulbi...@iee.lu>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tomas Garza  
View profile  
 More options Jan 24 2012, 5:09 am
Newsgroups: comp.soft-sys.math.mathematica
From: Tomas Garza <tgarz...@msn.com>
Date: Tue, 24 Jan 2012 10:09:31 +0000 (UTC)
Local: Tues, Jan 24 2012 5:09 am
Subject: Re: exercises: suppress printing of answers
I reckon you have a notebook with text cells, input cells and output cells, and you would  like to produce a PDF document without the output cells?  If that is the case, double-click the cell-bracket of each of the cells you would like to hide. This will not delete the cell, but simply hide it. Then you can File|SaveAs|PDF the notebook. If you need to show the hidden cells again, double-click their outer cell brackets (the ones with an arrow-like end).
-Tomas


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan  
View profile  
 More options Jan 25 2012, 7:08 am
Newsgroups: comp.soft-sys.math.mathematica
From: Alan <alan.is...@gmail.com>
Date: Wed, 25 Jan 2012 12:08:18 +0000 (UTC)
Local: Wed, Jan 25 2012 7:08 am
Subject: Re: exercises: suppress printing of answers
Thanks for all the interesting suggestions.
More than one was usable, but I'd still
be interested in learning how to programmatically
close all subsections labelled with a specific tag.

Thanks!
Alan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon  
View profile  
 More options Jan 26 2012, 3:31 am
Newsgroups: comp.soft-sys.math.mathematica
From: Simon <simonjty...@gmail.com>
Date: Thu, 26 Jan 2012 08:31:02 +0000 (UTC)
Local: Thurs, Jan 26 2012 3:31 am
Subject: Re: exercises: suppress printing of answers
Alan, this was also recently asked over at
http://mathematica.stackexchange.com/q/680/34

There were some programmatic solutions presented there.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alexei Boulbitch  
View profile  
 More options Jan 27 2012, 6:08 am
Newsgroups: comp.soft-sys.math.mathematica
From: Alexei Boulbitch <Alexei.Boulbi...@iee.lu>
Date: Fri, 27 Jan 2012 11:08:35 +0000 (UTC)
Local: Fri, Jan 27 2012 6:08 am
Subject: Re: exercises: suppress printing of answers

Thanks for all the interesting suggestions.

More than one was usable, but I'd still

be interested in learning how to programmatically

close all subsections labelled with a specific tag.

Thanks!

Alan

Hi, Alain,

What about this?

Button["Get answer: Nr.1", CreateDocument[Column[{

    TextCell[],

    TextCell[

     Style["This is some text with the answer to problem 1", 14],

     "Output"],

    TextCell[Style["containing display formulas and plain text:", 14],

      "Output"],

    ExpressionCell[

     Style["\!\(\*SubsuperscriptBox[\(\[Integral]\), \(a\), \(b\)]\)x\

\[DifferentialD]x=\!\(\*FractionBox[\(1\), \

\(2\)]\)(\!\(\*SuperscriptBox[\(b\), \

\(2\)]\)-\!\(\*SuperscriptBox[\(a\), \(2\)]\))", Italic, 22],

     "Output"],

    TextCell[Style["This is some more text ", 14], "Output"],

    ExpressionCell[

     Style["\!\(\*SuperscriptBox[\(x\), \

\(2\)]\)+\!\(\*SuperscriptBox[\(y\), \

\(2\)]\)=\!\(\*SuperscriptBox[\(z\), \(2\)]\)", Italic, 22], "Output"],

    Button[Style["Close the window", 16, Blue], NotebookClose[]]

    }], WindowTitle -> "Problem 1: the answer",

  WindowSize -> {500, 500}]]

In the end of your notebook with the problems make a Section "Answers". Copy-paste the above code into any input cell of this Section. Enter the text of the answer you wish into the Text cells and any formula into the Expression cells. Add more Text and Expression cells, if necessary. Mark the cell with this code as the "Initialization cell" (Menu/Cell/Cell Properties/Initialization cell). Execute this cell. A button entitled "Get answer : Nr.1" will appear.  Copy-paste this button into the end of the text of your problem. Collapse the whole Section "Answers" around the Section cell, or close the cells with the answers (Menu/Cell/Cell Properties and uncheck "Open"), or the both. Save the notebook. Done. You will only need to execute any operation as soon as the notebook is first open. I use for these purposes the function DateString[] that I place in the very beginning of each notebook. The answers will appear only upon pressing the corresponding button. They will never be seen in the pdf document.

Have fun, Alexei

Alexei BOULBITCH, Dr., habil.

IEE S.A.

ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG

Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44

e-mail: alexei.boulbi...@iee.lu<mailto:alexei.boulbi...@iee.lu>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »