在 Workbench 中比较笔记本的步骤

发布于 2024-12-25 15:25:38 字数 210 浏览 1 评论 0原文

使用 Wolfram Workbench(版本 2)比较两个笔记本到底涉及哪些步骤?

即使是像我为了在 Workbench 中打开两个笔记本所做的事情,也请明确说明。

(我发现 Workbench 非常难以使用。我发现它的内置文档价值有限。有关它的教程截屏视频太仓促,无法跟上,即使停止和启动也是如此。而且仍然存在混乱,至少对我来说,在本教程附带的示例文件的各个版本中。)

What, exactly, are the steps involved in using Wolfram Workbench (version 2) to compare two notebooks?

Please be explicit even in such things as what I do in order to open the two notebooks in Workbench.

(I find Workbench fiendishly difficult to use. Its built-in documentation is, I find, of limited value. The tutorial screencasts about it are just too rushed to be able to follow, even with stopping and starting. And there's still a confusion, at least for me, among various versions of sample files that are to accompany the tutorial.)

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

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

发布评论

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

评论(2

手心的温暖 2025-01-01 15:25:38

我从未使用过工作台,但当我启动它时,我在几分钟内就可以比较文档,所以这并不难。

步骤:

  1. 使用“文件”>“创建项目”新的>新项目菜单(编辑:我认为许多项目类型都可以。我已经尝试了应用程序和基本数学类型)
  2. 使用导入添加要与项目进行比较的两个文件(在“文件”菜单中)或鼠标右键上下文菜单)。 编辑:最好的方法可能是使用“常规/文件系统”。它将询问要从中导入的目录。之后,您可以选择要从该目录导入的文件。
  3. 在包资源管理器视图中选择这两个文件
  4. 鼠标右键 >比较>每个其他
  5. 比较编辑器都会启动并排显示两个文档

Mathematicagraphics

I have never used the workbench but when I fired it up I was comparing documents in minutes, so it can't be that hard.

The steps:

  1. Create a project using the File > New > New Project menu (EDIT: many project types will do I think. I have tried both the Application and the Basic Mathematica type)
  2. Add the two files to be compared to the project using import (in the File menu or the right mouse button context menu). EDIT: The best approach is probably using "General/File system". It will ask for a directory to import from. After that you may select the files you want to import from that directory.
  3. Select both files in the package explorer view
  4. Right mouse button > Compare with> Each other
  5. Compare editor fires up showing the two documents side by side

Mathematica graphics

千仐 2025-01-01 15:25:38

(欢迎来到 StackOverflow Murray,很高兴在这里见到您!)

这不是对您问题的直接回答,但我认为您可能会发现了解 << AuthorTools` 包包含比较笔记本的功能。评估以下内容以打开(“隐藏”)文档:

NotebookOpen@
 FileNameJoin[{$InstallationDirectory, "AddOns", "Applications", 
   "AuthorTools", "Documentation", "English", "AuthorToolsGuide.nb"}];

然后您可以使用 CreateDocument@NotebookDiff[notebook1, notebook2] 来比较它们,或者使用更方便的方法

CreateDocument@NotebookDiff[SystemDialogInput["FileOpen"], SystemDialogInput["FileOpen"]]

来更多地选择文件容易地。

或者,您可以在前端打开两个笔记本,然后使用这个小控制面板:

Dynamic@Column[
  {PopupMenu[Dynamic[nb1], 
    Thread[Notebooks[] -> NotebookTools`NotebookName /@ Notebooks[]]],
   PopupMenu[Dynamic[nb2], 
    Thread[Notebooks[] -> NotebookTools`NotebookName /@ Notebooks[]]],
   Button["Show differences", 
    CreateDocument@NotebookTools`NotebookDiff[nb1, nb2]]}
  ]

Mathematicagraphics


值得一提的是在 Mathematica 8 中,NotebookTools 上下文中有一些未记录的与笔记本相关的功能,包括 NotebookTools`NotebookDiff[] 函数。


相关问题: 是否可以调用Mathematica 的命令行差异功能?

(Welcome to StackOverflow Murray, it's good to see you here!)

This is not a direct answer to your question, but I think you might find it useful to know that the << AuthorTools` package includes functionality for comparing notebooks. Evaluate the following to open the ("hidden") documentation:

NotebookOpen@
 FileNameJoin[{$InstallationDirectory, "AddOns", "Applications", 
   "AuthorTools", "Documentation", "English", "AuthorToolsGuide.nb"}];

Then you can compare them using CreateDocument@NotebookDiff[notebook1, notebook2], or perhaps using the somewhat more convenient

CreateDocument@NotebookDiff[SystemDialogInput["FileOpen"], SystemDialogInput["FileOpen"]]

which will let you select the files more easily.

Alternatively, you can open the two notebooks in the front end, and use this little control panel:

Dynamic@Column[
  {PopupMenu[Dynamic[nb1], 
    Thread[Notebooks[] -> NotebookTools`NotebookName /@ Notebooks[]]],
   PopupMenu[Dynamic[nb2], 
    Thread[Notebooks[] -> NotebookTools`NotebookName /@ Notebooks[]]],
   Button["Show differences", 
    CreateDocument@NotebookTools`NotebookDiff[nb1, nb2]]}
  ]

Mathematica graphics


It's interesting to mention that in Mathematica 8 there's some undocumented notebook-related functionality in the NotebookTools context, including a NotebookTools`NotebookDiff[] function.


Related question: Is it possible to invoke Mathematica's diff functionality from the command line?

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