Mathematica Tutorial: Notebooks and Documents
Total Page:16
File Type:pdf, Size:1020Kb
Wolfram Mathematica ® Tutorial Collection NOTEBOOKS AND DOCUMENTS For use with Wolfram Mathematica® 7.0 and later. For the latest updates and corrections to this manual: visit reference.wolfram.com For information on additional copies of this documentation: visit the Customer Service website at www.wolfram.com/services/customerservice or email Customer Service at [email protected] Comments on this manual are welcomed at: [email protected] Printed in the United States of America. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 ©2008 Wolfram Research, Inc. All rights reserved. No part of this document may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, without the prior written permission of the copyright holder. Wolfram Research is the holder of the copyright to the Wolfram Mathematica software system ("Software") described in this document, including without limitation such aspects of the system as its code, structure, sequence, organization, “look and feel,” programming language, and compilation of command names. Use of the Software unless pursuant to the terms of a license granted by Wolfram Research or as otherwise authorized by law is an infringement of the copyright. Wolfram Research, Inc. and Wolfram Media, Inc. ("Wolfram") make no representations, express, statutory, or implied, with respect to the Software (or any aspect thereof), including, without limitation, any implied warranties of merchantability, interoperability, or fitness for a particular purpose, all of which are expressly disclaimed. Wolfram does not warrant that the functions of the Software will meet your requirements or that the operation of the Software will be uninterrupted or error free. As such, Wolfram does not recommend the use of the software described in this document for applications in which errors or omissions could threaten life, injury or significant loss. Mathematica, MathLink, and MathSource are registered trademarks of Wolfram Research, Inc. J/Link, MathLM, .NET/Link, and webMathematica are trademarks of Wolfram Research, Inc. Windows is a registered trademark of Microsoft Corporation in the United States and other countries. Macintosh is a registered trademark of Apple Computer, Inc. All other trademarks used herein are the property of their respective owners. Mathematica is not associated with Mathematica Policy Research, Inc. Contents Notebook Interface Notebook Interfaces . 1 Doing Computations in Notebooks . 4 Notebooks as Documents . 7 Working with Cells . 12 The Option Inspector . 21 Notebook History Dialog . 23 Input and Output in Notebooks Entering Greek Letters . 28 Entering Two-Dimensional Input . 30 Editing and Evaluating Two-Dimensional Expressions . 36 Entering Formulas . 38 Entering Tables and Matrices . 43 Subscripts, Bars and Other Modifiers . 45 Non-English Characters and Keyboards . 47 Other Mathematical Notation . 48 Forms of Input and Output . 50 Mixing Text and Formulas . 53 Displaying and Printing Mathematica Notebooks . 54 Setting Up Hyperlinks . 55 Automatic Numbering . 56 Exposition in Mathematica Notebooks . 57 Named Characters . 58 Textual Input and Output How Input and Output Work . 61 The Representation of Textual Forms . 62 The Interpretation of Textual Forms . 64 Short and Shallow Output . 67 String-Oriented Output Formats . 70 Output Formats for Numbers . 74 Tables and Matrices . 79 Styles and Fonts in Output . 91 Representing Textual Forms by Boxes . 92 String Representation of Boxes . 97 Converting between Strings, Boxes and Expressions . 102 The Syntax of the Mathematica Language . 106 The Syntax of the Mathematica Language . 106 Operators without Built-in Meanings . 111 Defining Output Formats . 114 Low-Level Input and Output Rules . 116 Generating Unstructured Output . 118 Formatted Output . 121 Requesting Input . 135 Messages . 136 International Messages . 141 Documentation Constructs . 142 Manipulating Notebooks Cells as Mathematica Expressions . 145 Notebooks as Mathematica Expressions . 148 Manipulating Notebooks from the Kernel . 152 Manipulating the Front End from the Kernel . 166 Front End Tokens . 167 Executing Notebook Commands Directly in the Front End . 169 The Structure of Cells . 170 Styles and the Inheritance of Option Settings . 171 Options for Cells . 175 Text and Font Options . 181 Options for Expression Input and Output . 186 Options for Notebooks . 189 Global Options for the Front End . 193 Mathematical and Other Notation Mathematical Notation in Notebooks . 194 Special Characters . 199 Names of Symbols and Mathematical Objects . ..