使用 Mathematica 构建演示文稿和文档

发布于 2024-10-18 13:21:27 字数 2393 浏览 3 评论 0 原文

我使用Mma主要是为了解决比较小的问题。

我也想开始使用它来准备我的演示文稿和文档,但我在从嵌入式帮助中学习如何做到这一点时遇到了困难,我想其他地方可能会提供一些好的资源。

您知道任何有用的指南(书籍、论文、视频...)吗?

您有“技巧包”要发布在这里吗?

编辑

到目前为止,这个问题收到了两个答案(@mzabsky 的和 Mr.Wizard 的),尽管两者都很有用,但也许我的担忧更为基本。因此,我发布了一个我无法做的事情的示例(或了解如何辨别其他人是如何做的)。

我从The Mathematica Journal(下图左侧的笔记本 - 单击图像可查看完整尺寸):

在此处输入图像描述

所以,有些问题,只是为了了解我的麻烦:

1)我将文本复制到我的 .nb右边,用相同的样式(文本)格式化它,但外观不同,所以我猜样式定义不同。如何将样式定义从一个 .nb 复制到另一个 .nb?

2) 文本块下方的表格没有附加样式。它是如何格式化的?背景颜色在哪里定义的?

我想要有关这些问题的阅读指南(或观看视频或其他内容)。我不想让你在这里写一本关于 Mathematica 格式化的书!

答案中发布的链接摘要

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

从来不烧饼 2024-10-25 13:21:27

我使用 Mathematica 实时做课堂笔记,没有出现任何重大问题(而自豪的 TeX 人员却很难跟上:))。我还用它来完成我在大学过去两年半里写的大多数与数学相关的作业/作业。

在开始之前,您可能需要观看一些视频教程

另外,我的一些建议:

  • 键盘快捷键是快速打字的关键。 Ctrl+9 用于内联数学单元,Ctrl+6 用于上标等。
  • 了解“的符号标识符” esc - 符号 - esc”表示法。 “sum”代表求和,“es”代表空集……您可以在 Mathematica 文档中找到这些列表。我只遇到了极少数我想输入的没有 esc 表示法名称的符号(例如,向左双箭头或双右三通)。
  • 将所有与数学相关的内容键入内联数学单元格中。数学单元将为您执行一些与数学相关的格式设置 - 将空格放在它们所属的位置,以斜体呈现所有变量和符号等。
  • 使用“新建”->“样式笔记本”中找到的预格式化模板。
  • 不要使用 ENTER 作为隔断线,各个段落应进入单独的文本单元格 (Ctrl+Shift+D)因此 Mathematica 可以正确地将内容分解为单独的页面/幻灯片。
  • 内置的 Mathematica PDF 导出功能很糟糕;我为此使用 CutePDF 打印机。

另外,经常保存并经常备份(Dropbox/Syncplicity 是理想的解决方案) ,一个错误的键盘快捷键可以将数百小时的工作文档变成炖牛肉(相信我,去过那里):)

我在讲座期间实时记下的课堂笔记示例(是捷克语,但这并不重要)。

I use Mathematica to take lecture notes in real time without any major issues (while the proud TeX guys struggle hard to keep up :) ). I have also used it for most math-related homework/assignments I wrote during past two and half years on university.

Before you start, you may want to look at some of these video tutorials.

Also, a few recommendations from me:

  • Keyboard shortcuts are the key to type fast. Ctrl+9 for inline math cell, Ctrl+6 for superscript, etc.
  • Learn symbol identifiers for the "esc - symbol - esc" notation. "sum" for Sum, "es" for empty set...you can find list of these in the Mathematica documentation. I have encountered only very few symbols I wanted to type that don't have the esc notation name (for example, leftwards double arrow or double right tee).
  • Type all math-related stuff into inline math cells. The math cell will do some of the math related formatting for you - put spaces where they belong, render all variables and symbols in italics, etc.
  • Use the preformatted templates found in "New"->"Styled Notebook".
  • Do not use ENTER for breaklines, individual paragraph should go into separate text cells (Ctrl+Shift+D) so Mathematica can break the content into individual pages/slides correctly.
  • In-built Mathematica PDF export sucks big-time; I use CutePDF printer for this.

Also, save often and back up often (Dropbox/Syncplicity are the ideal solution), one misplaced keyboard shortcut can turn hundred hours of work worth document into a goulash (trust me, been there) :)

Example of lecture notes I took in real-time during lecture (it is in Czech, but that doesn't matter much).

晨曦÷微暖 2024-10-25 13:21:27

我同意姆扎布斯基在回答中所说的一切。
这里有一些额外的事情:

我发现使用 TextDisplayFormula 单元格创建语句,然后手动将 Mathematica 检查/证明分组到该语句,然后折叠并可以在您需要时显示。

写作助手调色板中有很多有用的结构,您可以从中学习。

最后,我发现制作自己的样式表非常有用,原因如下:
1)内置的有点丑; 2)它确实可以帮助您了解笔记本的工作原理。

要查看我制作的样式表的示例(我并不声称它是完美的 - 我没有费心让它在所有屏幕环境中工作),请查看 ftp://ftp.physicals.uwa.edu.au/pub/MATH2200/2010/。我在所有笔记中都使用类似的样式表 - 我有许多研究项目主要包含在 Mma 笔记本中,例如 http:// arxiv.org/abs/1102.3043

和 Wizard 先生一样,我也推荐 David Park 的笔记作为起点。另外,您应该通过转到“格式”菜单并单击“编辑样式表”来研究您喜欢的样式表。不要忘记点击链接浏览一系列样式表(版本 6 及以上)。

要回答编辑中的问题: 查看笔记本的样式表后,您可以保存它、编辑它并在您自己的文档中使用它。样式表位于
$UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets 在菜单中自动可用。然后,您只需从菜单中选择该样式表即可在任何笔记本中使用该样式表。

您发布的屏幕截图中的格式全部包含在样式表中。这包括表中的灰色背景。

附录:

将笔记本分发给其他人时,如果样式表位于笔记本外部,那么其他人将不会像您一样看到它。要将样式表包含到当前笔记本中,您需要类似的代码

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"]]

(假设文件存储在常规位置)

这是一个 EmbedStylesheet。 m 这是上面的改进版本。

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.

凉城 2024-10-25 13:21:27

关于嵌入式样式表的 Mathgroup 线程,特别是此处 (John Browne)和此处(David Park 和 Selwyn Hollis)可能会感兴趣。

我发现样式表有问题。特别是,我不喜欢在将笔记本交给其他人之前,或者在尝试从不熟悉的计算机上进行打印之前必须记住嵌入样式表。但是,随着 David Park 的教程(向导先生在上面引用),我发现 这个建议非常有用。

A Mathgroup thread on embedded stylesheets, particularly here (John Browne) and here (David Park and Selwyn Hollis) might be of interest.

I find stylesheets problematical. In particular I don't like having to remember to embed a stylesheet before I give the notebook to someone else, or before I try to print from an unfamiliar computer. However, along with David Park's tutorial (referenced above by Mr Wizard), I find this advice from Bob Ueland very useful.

怎樣才叫好 2024-10-25 13:21:27

如果您浏览 The Mathematica Journal 过刊,您将看到可用的文章笔记本格式。这些可能是有用的参考。

编辑

我现在记不起一个好的格式化教程。您可以使用显示表达式(Win:Shift+Ctrl+E)来查看块的代码表达式,例如示例中的表。虽然人们可能无法以相同的形式手动输入代码,但它可以指示所使用的选项或方法。也可以根据需要按程序生成代码。

当我找到或回忆起链接时,我会添加它们。

David Park 的样式表创建说明

Mathematica 幻灯片演示者的提示

这些很简短,但可能仍然有用:

笔记本格式

使用 Mathematica 进行演示

If you browse the back-issues of The Mathematica Journal you will see that articles are available in Notebook format. These may be a useful reference.

Edit

I cannot recall a good formatting tutorial at the moment. You can use Show Expression (Win: Shift+Ctrl+E) to view the code expression for a block, such as the table in your example. While one may not enter code by hand in the same form, it can give indications of the options or methods that are used. Code can also be procedurally produced as needed.

I will add links as I find or recall them.

David Park's StyleSheet creation notes

Tips for Mathematica SlideShow presenters

These are brief, but may still be useful:

Notebook formatting

Presentations with Mathematica

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文