Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
116 views
in Technique[技术] by (71.8m points)

Using Mathematica to build presentations and documents

I use Mma mainly to solve relatively small problems.

I want to start using it also to prepare my presentations and documents, but I am having troubles to learn how to do it from the embedded help, and I guess some good resources may be available elsewhere.

Do you know any useful pointers (books, papers, videos ...)?

Do you have a "bag of tricks" to post here?

Edit

This question received two answers so far (@mzabsky's and Mr.Wizard's) and although both are useful, perhaps my concerns are much more basic. So I am posting an example of the kind of things I am unable to do (or understand how to discern how others did them).

I took the following example from The Mathematica Journal (the notebook at the left on the following image - click on the image to see full size):

Enter image description here

So, some issues, just to get the idea of my troubles:

1) I copied the text to my .nb on the right, formatted it with the same style (text), but the appearance is different, so I guess the style definition is different. How can I copy the style definitions from one .nb to the other?

2) The table below the text block doesn't have an attached style. How was it formatted? Where is the background color defined?

I would like pointers to read (or videos to look, or whatever) about these issues. I don't want you to write down here a book on Mathematica formatting!

Summary of the links posted in answers

question from:https://stackoverflow.com/questions/5058854/using-mathematica-to-build-presentations-and-documents

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I agree with all that mzabsky said in his answer. Here's a few of extra things:

I find it useful to make statements using a Text or DisplayFormula cell then manually group a Mathematica check/proof to the statement which is then collapsed and can be displayed when you want.

The Writing Assistant Palette has quite a few useful constructions in it that you can learn from.

Finally, I found it really useful to make my own style sheet for a couple reasons: 1) the built-in ones are a bit ugly; 2) it really helps you to understand how the notebooks work.

To see examples of the stylesheet I made (which I don't claim to be perfect - I didn't bother making it work in all screen environments) look at some of the files in ftp://ftp.physics.uwa.edu.au/pub/MATH2200/2010/. I use a similar stylesheet in all of my notes - I have many research projects primarily contained in Mma notebooks, eg http://arxiv.org/abs/1102.3043.

Like Mr Wizard, I also recommend David Park's notes as a starting point. Also, you should study stylesheets that you like by going to the Format menu and clicking "Edit Stylesheet". Don't forget to follow the links through the cascade of stylesheets (version 6 onwards).

To answer the questions in your edit: Once you are viewing a notebook's stylesheet, you can save it, edit it, and use it in your own documents. Stylesheets in $UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets are automatically available in the menu. You can then use that stylesheet in any notebook by simply selecting it from the menu.

The formating in the screenshot that you posted is all contained in the stylesheet. This includes the grey background in the table.

Addendum:

When distributing notebooks to others, if the stylesheet is external from the notebook, then other people will not see it as you do. To include the stylesheet into the current notebook, you need code like

ss = StyleDefinitions /. Options[EvaluationNotebook[]]
fn = ToFileName[{$UserBaseDirectory, "SystemFiles", "FrontEnd",  "StyleSheets"}, ss]

If[FileExistsQ[fn],
     style=Get[fn];SetOptions[EvaluationNotebook[],StyleDefinitions->style];,
     Print["Can not find file"]]

(Assuming the file is in stored in the conventional place)

Here's an EmbedStylesheet.m that is an improved version of the above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...