text:
Pro for Adobe InDesign MacWin Main Features Version History Pro for QuarkXPress Mac Main Features Version History Personal Edition MacWin Main Features Version History XT for QuarkXPress 3~4 Main Features Version History Prime Edition Fonts Others Feature Comparison Chart

[Math+Magic]™ Personal Edition
Version History

v6.83 - December 23, 2009

• Added: "Close All" command added to File menu, which was only possible by option-clicking on the Close box of window title.
• Added: "Close All Detached Palettes" command added to Window menu, which was possible by option-clicking on the Close box of window title.

• Fixed: Some Greek symbols not converted by LaTeX converter.
• Fixed: Show/Hide all Detached Palettes status under Window menu fixed when launched again after quitting with hidden.

v6.82 - November 23, 2009

• Changed: Font activation message and Drag and Drop message revised.
• Fixed: multiple Clipboard error messages displayed when Drag and Dropped an unknown format.

v6.81 - November 10, 2009

• Added: Import/Export options dialog: General pane has "White Background if transparent" option for better compatibility with some applications.
• Changed: Default selection of reading file format in Convert... dialog changed to "All readable files".

• Fixed: User defined fonts in Define Style dialog not maintained after reading equations saved in EPS or PICT format.
• Fixed: Over or Under Horizontal braces had a wrong vertical height when exported in EPS.
• Fixed: StyleSet of Factory Setting in Batch Convert... dialog not applied.
• Fixed: Exporting in Gray PICT exported in color PICT.

v6.8 - October 15, 2009

• Added: Copy As Google Docs equation, Copy As Zoho equation commands added to Edit menu so that MathMagic equation can be pasted into Google Docs Equation editor window or Zoho Equation Editor window.
• Added: Google Doc equation can be drag and dropped to MathMagic window to re-edit. Or, its LaTeX expression can be copied from Google Doc Equation box, and then pasted into MathMagic window.
• Added: The URL of Google Docs equation which contains its LaTeX expression can be pasted into MathMagic window. MathMagic parses the URL to extract the LaTeX expression.
• Added: MathMagic equation can be drag and dropped to MathType window.
• Added: Equations saved in GIF format can be opened for editing if saved by MathMagic v6.8 or newer.
• Added: Equations saved in JPEG format can be opened for editing if saved by MathMagic v6.8 or newer.
• Added: MathMagic equation can be drag and dropped to TextEdit utility and OmniOutliner, or vice a versa. Some other RTFD capable Mac OS X applications may work as well.

• Changed: System ID now uses the Mac hardware Serial Number first.
• Changed: Some FactorySetting values in Import/Export Options dialog changed.
• Changed: "Copy and Export rate" field moved to Import/Export Options dialog from Preferences dialog.

• Fixed: LaTeX or MathML expressions could not be Copy and Pasted or Drag and Dropped from some Web pages with non-Roman encoding.
• Fixed: LaTeX \sum now has better handling of its under over script box.
• Fixed: Font style name of some OpenType fonts, saved in the Preferences file not recognized if replaced by its TrueType font or vice a versa.
• Fixed: Imports Plain TeX better.

v6.71
- October 3, 2009

• Changed: Bold face can be applied to Root symbol to make the line thickness look thicker.
• Changed: Bold face can be applied to Negate lines(slash, backslash, cross, horizontal and vertical lines).

• Fixed: Bold and Italic face of MM~ TrueType fonts were not compatible with their OpenType face.
• Fixed: The 2nd Fence Alignment option of Base-aligned could not be specified.
• Fixed: Some File extensions not recognized in the Batch Conversion dialog.
• Fixed: Reading incomplete LaTeX file or large LaTeX file now works better.
• Fixed: Vec arrow accent not displayed on screen.

v6.7 - September 16, 2009

• Changed: Shortcut key assigned to Export menu(command-option-E), selecting PICT format for Personal Edition, EPS format for Pro Edition.
• Changed: \top and \bot symbols are now handled as Relational Operator symbol in TeX spacing rule.

• Fixed: Mid-bar fences now work better with fence alignment options.
• Fixed: Fixed issues with multiple Spot colors in one equation.

v6.51 - September 2, 2009

• Changed: The Default text color for New document now gets the first color from the Application-wide color list instead of assigning a factory default black color.
• Changed: Font name field in the Main toolbar expanded to show longer font names better.
• Changed: Some Factory setting values changed in the Define Spacing dialog (Fence and Fraction) to improve equation shape.

• Fixed: Overprint setting fixed for EPS files.

v6.5 - August 27, 2009

• Added: Color format and interface enhanced to support CMYK, RGB, Gray color separately, including the support for Process color and Spot color in EPS.
• Added: New fence alignment(Fixed height) option added to Fence alignment dialog.
• Added: "MathMagic User Data" folder automatically installed into ~/Documents/ folder when MathMagic is first launched.
• Added: "Minimum Gap Below" field and "Nested Bar/Arrow Gap" field added to Defined Spacing -> Over/Under Templates(Bar/Arrow) pane.

• Changed: MathMagic Fonts folder can now be automatically installed across volumes.
• Changed: Line spacing now feeds from baseline to baseline to make the line spacing remain same as much as possible.
• Changed: 'man' and 'mid' are removed from Function name table.
• Changed: Do not use color definitions in StyleSet files so applying a new StyleSet does not add any unexpected colors.
• Changed: "MathMagic User Data" folder renamed to "MathMagic User Data2" from v6.5 to maintain the backward compatibility.
• Changed: Sample clips and sample StyleSet files revised.

• Fixed: Could not open a .mmf file if the file is locked or on a locked volume.
• Fixed: Some OpenType fonts did not recognize the change of font face to Bold or Italic.
• Fixed: When StyleSet dialog is dismissed, the current window's setting returned to the Default setting regardless of the selection in the StyleSet dialog.
• Fixed: A few MM~ default font names revised to use OpenType style name instead of TrueType format.
• Fixed: Baseline of Harpoon arrows adjusted to align with normal arrows.
• Fixed: Variable Upper/Lower Horizontal fence templates had fences too close to the body when the fence extended.
• Fixed: When Copy as LaTeX selected from Edit menu for a colored part of an equation, there was an error message.
• Fixed: Some cosmetic changes and minor bug fixes.

v6.4 - July 23, 2009

• Added: Automatic font activation or installing of "MathMagic Fonts" folder into the 'Fonts' folder supported when MathMagic fonts are not installed.
• Added: Supports Custom file name with Macros in Export dialog and Save As dialog. Macros include: {DOCNAME}, {Y} for Year, {M} for Month, {D} for Date, {H} for Hour, {m} for Minute, {S} for Second, {#} ~ {#5} for auto increased number. {Y2} {M2} {D2} {H2} {m2} {S2} also available for fixed 2-digit values.
• Added: User defined default Path supported for 'Export' and 'Save As' dialogs, which can be specified in the Import/Export options dialog - 'Paths' pane.

• Changed: Default Space width popup menu rearranged in Preferences - Shape pane.
• Changed: Accents can be applied to a selected character or template, which was only possible for a non-selected one on the left side of cursor.

• Fixed: MMCenturyOldGreek fonts did not work with the Greek palettes for some symbols.
• Fixed: The height of Subscript or Superscript was lost when a space is inserted between the previous template and script itself.
• Fixed: Importing MathML improved.
• Fixed: MathMagic Personal Edition had OpenType fonts handled improperly with Bold and Italic faces in Define Style dialog.
• Fixed: Show Bounds option displayed the bound of Accents in a wrong place.

* NOTE: Please note that new OpenType format MM~ fonts may not be exactly same as their original TrueType format MM~ fonts. Please make sure you have a proof printing if you have decided to migrate to OpenType format. Or, you may just stay with TrueType format MM~ fonts if they are fine with you. Both OpenType and TrueType versions are available on the installer disk image.
MathMagic equations or StyleSet files created with v6.4 or newer version may not be displayed correctly in v6.1x or older version due to the default font changes.

v6.14 - May 24, 2009

• Fixed: Superscript next to a template(such as fence) sometimes positioned on a wrong place vertically when the Automatic option is selected from Format - Script alignment dialog and the script height is higher than the template.
• Fixed: Pro Editions did not open a new editor window on a certain network environment when "New Equation" command is called from InDesign or QuarkXPress.
• Fixed: Last UserItem could not be deleted.

v6.13 - May 5, 2009

• Changed: Default value for "Remember Editor Window Location & Size" changed to OFF.
• Changed: Format menu -> Add Line Below command is enabled only when there is another line followed.
• Fixed: Nudge control window did not display field title arrows on Intel Mac.
• Fixed: Some MathML conversion fixed.

v6.12 - April 16, 2009

• Changed: Some error messages changed.
• Fixed: Some Low memory condition handled better.

v6.11 - March 13, 2009

• Fixed: Shortcut keys for Greek symbols (command-G followed by a character key) remapped to match to the new Greek palettes

v6.1 - March 5, 2009

• Added: Symbol order in Greek palettes rearranged. A few more Greek symbols added to Upper Case and Lower Case Greek palettes.

• Changed: Default value for OverBar height and minimum gap of OverBar changed.

• Fixed: Handles Windows created MathMagic equation better when converting OpenType font names defined in the Style list.
• Fixed: Could not open equation in some cases if a wrong symbol is included.
• Fixed: Height or width of Accent and Prime symbols applied to a character was incorrect in some cases.

• Added: Revised MMa fonts added. Previous MMa~ fonts should be replaced with these revised ones.

v6.07 - February 9, 2009

• Changed: Default setting values for Define Spacing changed, such as Line Thickness, Root slope.
• Changed: Bold face can be applied to TeX styles such as Fraktur and Blackboard Bold.

• Fixed: Some Greek symbols were not handled as GREEK style on Intel Macs.

v6.05 - January 30, 2009

• Changed: Default value for Fence vertical alignment changed to "Base aligned, Height fixed".

• Fixed: On Mac OS X 10.5, the cursor moved to near the last clicked position when clicking on a pop sub palette.
• Fixed: MathMagic .wmf file created on Windows OS could not be opened on Intel Mac.
• Fixed: More file extensions are recognized when opened or drag&dropped on to the application icon.
• Fixed: Large Operator alignment dialog now shows guide images.
• Fixed: Root symbol in PICT format has a better slope line.
• Fixed: Two byte characters could not be typed on Intel Macs(Asian versions).

v6.04 - January 23, 2009

• Added: Japanese and Korean translations added so user can select its User Interface and message from Finder -> Get Info of MathMagic application or System Preferences -> International.

• Fixed: MathMagic on Intel Mac could not get the correct Postscript font name from some fonts.
• Fixed: Blackboard Bold and Calligraphic TeX styles works only for the available characters in each font.

v6.03 - January 12, 2009

• Added: MathMagic equations inserted in MS Word on Windows can be drag&dropped or copy&pasted into MathMagic window.
• Added: MathType(tm) 6 equations inserted in MS Word 2008 Mac can be drag&dropped or copy&pasted into MathMagic window.
• Changed: Clipboard PDF format improved to make it work better with Adobe InDesign.
• Fixed: DVORAK and other European keyboard layouts are supported for Magic control shortcut key.

v6.02 - January 7, 2009

• Added: Various files can be drag&dropped from Finder to MathMagic window to open: MathML(.mml or .xml), TeX or LaTeX(.tex or .txt), PICT, EPS, PDF, GIF, JPEG, WMF.
• Added: supports Drag & Drop of PDF equation(from other applications) and Wiki equation(from a web browser) to MathMagic editor window.

• Fixed: Missing font message displayed unexpectedly when a Style is selected from Style menu.

v6.01 - January 1, 2009

• Changed: PDF format in the default clipboard format is turned OFF for better compatibility with automatic baseline feature when copy&pasted into a text line of a few word processors.

• Fixed: The baseline of Inline PICT image was not automatically aligned on Intel Macs.
• Fixed: \mathbb, \mathcal, \mathfrak TeX styles were not maintained when a TeX expression is pasted.

v6.0 - December 31, 2008

• Added: Universal Binary version. Runs fast on both Intel based Macintoshes and PowerPC Macs.
• Added: PDF supported for Exporting and Copying. So high quality MathMagic equations can be pasted in modern Mac OS X applications more conveniently.
• Added: Blackboard Bold, Calligraphic, and Fraktur styles supported from the Symbol palette and Style -> More TeX Styles sub menu. Default font "MMa Fermat" for 'Blackboard Bold', "MMa Pascal" for 'Calligraphic', "MMa Fraktur" for 'Fraktur' should be installed to display those symbols correctly. Future version will allow user to set these fonts.
• Added: MathType MTEF annotation in MathML data can be imported.
• Added: Clipboard format for Copy or Cut command can be selected by user from Import/Export options dialog.
• Added: Editor window now displays both Template and Symbol buttons in each row for fast selection without switching.

• Changed: Magic control key now supports control-arrow keys to navigate thru the palettes(left, right, up, down) as well as control-tab and control-shift-tab keys.

• Fixed: MathType conversion improved, especially when more than multi colors used.
• Fixed: Magic key of control-shift-1 or a few other UserItem items entered a series of items, which was used for internal testing purpose.

v5.87 - December 15, 2008

• Added: Copy&Paste or Drag&Drop MathType equation onto MathMagic window to convert MathType equation on the fly.
• Added: MathType v5.x ~ 6.0 generated EPS, PICT, or WMF equation files can be opened from File menu or dragged onto MathMagic application icon.
• Added: MathMagic WMF file created on Windows can be opened in MathMagic Mac versions.
• Added: "Use Minimum Bounding Box instead of Full sized Frame box when exporting" checkbox added to Import/Export options dialog for EPS and PICT export.

• Changed: Two more TeX packages added to LaTeX export option.

• Fixed: When no detached floating palettes available, palettes detached from the previous version of MathMagic were displayed.
• Fixed: Clicking a Nudge palette button now properly set the document changed status to make it save.
• Fixed: Each new release now extends the trial period correctly even if the previous trial period has been expired.

v5.86 - December 1, 2008

• Changed: The order of Template palettes are rearranged to match to the latest MathMagic Windows versions.
• Changed: Package options of AMS LaTeX, specified in TeX pane of Import/Export Options dialog, can also be applied to LaTeX now.
• Changed: Window title is not saved in MathML or LaTeX anymore not to cause encoding issues with 2-byte name.

• Fixed: When inserting a UserItem, equation was not refreshed correctly sometimes.
• Fixed: Incorrect equation version alert fixed.

v5.85 - November 10, 2008

• Added: A new Angled Division template added to the Fraction template palette.
• Added: Checking missing fonts can be turned ON or OFF from Preferences-Misc dialog pane.

• Changed: Line drawing method for Angle and Slash in EPS file changed for better accuracy.
• Changed: The height of Space adjusted to make it selectable easily.
• Changed: Fence alignment option of "Base Fixed" now aligns fences to the box content.

• Fixed: User defined font info was reset to the Default when pasting MathMagic equation.
• Fixed: Detached Fraction template palette window had the button image incorrectly positioned.
• Fixed: Tab key works with Western/Eastern order option for Long double Arrows/Harpoons.
• Fixed: Some European characters were not displayed in EPS file.
• Fixed: Double-clicking on the beginning of a box did not select the box content.
• Fixed: Some other minor issues fixed.

v5.84 - October 17, 2008

• Changed: Left arrow moves the cursor to the previous main box in templates, instead of script box.
• Changed: When the Postscript font name is not found from a font while saving in EPS, MathMagic will try to compose it.
• Changed: Trial period is extended to 40 times and Auth nagging dialog is less displayed during the trial period.

• Fixed: '+', '-', '=' operators are not set to Operator style when imported by MathML import filter.
• Fixed: Subbox height of some integral templates fixed when its main box height is tall.
• Fixed: Pasting Plain TeX did not work in low memory condition.
• Fixed: Memory overflow bug while reading StyleSet file or copying an equation to clipboard.

v5.83 - October 1, 2008

• Added: WIKI equation image can be pasted into MathMagic window from any MediaWIKI enabled web page, including Wikipedia.org. In Safari, by selecting "Copy Image" menu on an equation PNG image via Contextual menu from right-mouse-button click. In FireFox, with two steps of selecting "Properties" menu item from right-button-clicked Contextual popup menu and copying TeX string in "Alternate text" field in the "Element Properties" window.
• Added: "Paste as Text" command added to Edit menu, as an option to paste the raw text string from clipboard without automatic TeX conversion

• Changed: shift-return after inline typing of TeX expressions now converts LaTeX as well as Plain TeX.
• Changed: Edit menu has some items re-ordered.

• Fixed: LaTex is imported and exported better for multi-lined equations.
• Fixed: A crashing bug while importing MathML or LaTeX when there is a single sided fence.
• Fixed: MathType 6 EPS files can be read better.

v5.82 - September 19, 2008

• Added: MathType 6 EPS files can be opened now.
• Changed: Math default style is applied when pasting or importing MathML or TeX files.
• Fixed: crashing bug when quitting.

v5.81 - September 17, 2008

• Added: AMS LaTeX is supported for importing and exporting, and copying and pasting.
• Added: PICT and GIF files saved by MathType 6 can be opened or dragged onto MathMagic application icon, or pasted into MathMagic window.
• Added: MathType 5 or 6 equations can be directly pasted into MathMagic window.

• Fixed: Copying as Plain TeX from MathType, and pasting into MathMagic window, now works better for multi-lined equations.
• Fixed: crashing bug when pasting a Unicode string from clipboard.
• Fixed: crashing bug when pasting a certain MathML expressions from clipboard.

v5.8 - August 25, 2008

• Added: LaTeX is supported - reading LaTeX files(.tex, .latex), exporting to LaTeX, Copying&Pasting of LaTeX expressions.
• Added: User can specify the resolution of PICT image in the File->Import/Export options dialog.
• Added: The baseline of PICT can be shifted by user in the File->Import/Export options dialog.
• Added: Multiple &lt math &gt tags can be opened simultaneously when importing MathML files.

• Changed: Some layout and options changed or added in Import/Export options dialog.
• Changed: Displays some European characters or non-7bit ASCII code characters better, using Text font specified in Define Style dialog.

• Fixed: crashing bug with option-click Selection and Nudge Undo/Redo.

• Added: MathMagic XT for QuarkXPress 8 is added. "Default Baseline" menu command is added to set the baseline of inline equation to Default value quickly.

v5.74 - July 17, 2008

• Added: MathML output Entity can be selected from MathML Export options dialog.
• Added: Multiple [itex] tags can be imported when opening xml files.
• Added: 'MMF' data can be copied into the Clipboard if copied using mouse from Edit->Copy menu item while pressing control key.

• Changed: Size info floating window now can display the smallest bounding box size of the equation as well as the frame box size.
• Changed: A new License option supported in the License code to handle a revised license policy.

• Fixed: Baseline info in the PICT image copied into the Clipboard works better when pasted into AppleWorks or Mellel as an Inline graphic.
• Fixed: Compatibility with OS X 10.6 Snow Leopard is improved.

v5.73 - June 12, 2008

• Fixed: MMGreek and MMaGreek fonts were treated as System's Symbol font which caused non-matched display for some Greek characters.

v5.72 - June 2, 2008

• Changed: Edit -> Convert TeX to Equation has a new shortcut key of shift-return, for easier conversion. And it converts TeX expression to the current cursor location even without prior selection.

• Fixed: Some memory leaking and crashing bugs fixed.
• Fixed: Edit -> Convert to TeX was not working when multi lines were selected by Select All. Space character in the TeX expression was not handled correctly.
• Fixed: Subscript gap after a Greek or symbol character followed by an accent was not proper.

v5.71 - April 29, 2008

• Added: New option added to the Import/Export Options dialog to let user ignore DTD path when importing MathML for fast reading or when Internet is not connected.
• Added: Some more TeX tags supported.
• Added: Matrix setting dialog has more options to set Align and Same width for Column.

• Changed: MathMagic Pro application stores its port number(
10025) of local TCP/IP address 127.0.0.1 in the following file so that user can change it if necessary. This Port number is used only by MathMagic Pro application(not by MathMagic Personal Edition) when communicates with MathMagic plug-ins or MathMagic XTensions.
~(user home)/Library/Preferences/MathMagic PortNum.pref

• Fixed: Matrix horizontal/vertial grid lines fixed.
• Fixed: File format version warning displayed when importing MathML.

v5.7 - April 5, 2008

• Added: MathML(.xml or .mml or .mathml) is supported in multiple ways: via File -> Open, drag&drop to MathMagic application icon, or by pasting MathML data in [itex] tags into MM editor window. Exporting to MathML is also supported via File -> Export or Edit -> Copy As MathML.
• Added: Hyphen, en-dash, em-dash, 'n'-width dash, 'M'-width dash, and figure dash('0'-width dash) are supported in Spacing template palette. 'n'-width dash, 'M'-width dash, and figure dash are using hyphen('-') character and enlarge the width to match the width of the corresponding character. 'MM~' fonts do not have en- or em-dash so MathMagic converts to 'n'-width or 'M'-width dash for 'MM~' fonts.
• Added: option key based special character typing, such as • § ™, are supported when a proper font is specified in Preferences->Style->Math.
• Added: Size and Location info of Main Toolbar floating window is now remembered, and Windows menu has a new menu item for reseting the location and size of floating windows.
• Added: New compact MMF file format and Web savvy Compressed format added, as well as backward compatibility option.

• Changed: Some Main Toolbar items relocated and resized for convenience.
• Changed: Some Image export options are moved from Preferences->Misc dialog pane to File->Import/Export options dialog.

• Fixed: Some memory leaks fixed while exporting in EPS.
• Fixed: The char width and position was incorrect for Type 1 PS fonts, especially when saved in EPS.
• Fixed: The height of subscript box invaded upward too much when tall contents inserted in Large Op templates with Subscript.

v5.65 - January 8, 2008

• Fixed: StyleSet was not applied when selected from StyleSet popup menu on the Main toolbar.

v5.64 - December 18, 2007

• Added: Convert TeX to equation command added to Edit menu. This menu is enabled when TeX delimeter('$' or '\') is found in the beginning of the selection. It converts the selected TeX expression into equation so user can directly type TeX expressions inside MathMagic editor window if fluent in TeX. • Added: TeX expressions is automatically converted into equation when Pasted into the editor window with correct delimeter of '$' on both ends.

• Changed: TeX syntax error message is handled better.
• Changed: TeX equation is displayed by the default style after importing.
• Changed: Copy As TeX and Convert TeX to equation items are grouped and a few menu items are rearranged in Edit menu.

• Fixed: A few TeX symbol expressions were not converted correctly.

v5.63 - November 28, 2007

• Changed: TeX files can be drag&dropped onto MathMagic application icon to open directly without going thru Import process.
• Changed: StyleSet... item added to StyleSet popup menu on the Main toolbar for easier StyleSet management.
• Changed: Personal Edition's Default fonts for Operator&Symbol, and FactorySetting are now set back to MM~ fonts from MMa~ fonts.
• Changed: Factory Default value of "Keep LSB~" check box is now ON.

• Fixed: Line spacing for multi-lined equation was incorrect when non % unit is specified in Define Spacing -> Line Spacing pane.
• Fixed: Crashes when undo after deleting, typing, or pasting on a backward selection.
• Fixed: Some dialogs did not accept 'return' or 'enter' key for the default OK button.
• Fixed: TeX files were not selectable from Open or Import dialog on Mac OS X 10.5 Leopard.
• Fixed: Line thickness of diagonal fraction and slash fraction were incorrect in a certain places.
• Fixed: Saving font name for empty boxes in EPS file handled better.

• Note for OS X 10.5 Leopard users regarding Magic Control key: Magic control keys on Mac OS X 10.5 Leopard may conflict with 'Spaces' feature if you use the default control-1~4 shortcut keys of Spaces. This can be avoided by assigning a new modifier key from "System Preferences" -> "Expose & Spaces" -> Spaces tab. Even after this reassigning, control-3 or control-4 may not work properly as a magic control key. In this case, please open "System Preferences" -> "Keyboard & Mouse", then uncheck "Screen Shots" group, then check it again. This will forward the control-3 and control-4 magic key to MathMagic.

v5.62 - October 31, 2007

• Changed: Personal Edition now can change the TeX spacing rule in Preferences->Spacing dialog, which was available only for Pro & Prime Editions.

• Fixed: Magic control key for Template & Symbol palettes was not working correctly on Mac OX X 10.5 Leopard.
• Fixed: Changes in Preferences -> Spacing -> TeX spacing rule pane were not reflected in the current document after closing the dialog window.
• Fixed: More compatibility check done with the current OS version while MathMagic is launched.
• Fixed: Improved screen refresh speed while typing for some complex equations.
• Fixed: A certain tall characters in a Matrix template might be turncated at the bottom.

v5.61 - August 17, 2007

• Added: MathMagic now support the baseline of inline equations for Pages v3.0 in iWork '08.

v5.6 - August 8, 2007

• Changed: Selecting Show Bounds command from View menu while pressing both shift and command key displays the ourter frame of each component, rather than the smallest bound.
• Changed: Factory setting value of Integral Subbox shift value is changed to the relative unit in Define Spacing -> Large Op & Integral pane.
• Changed: Show Nesting Level option from View menu improved more.

• Fixed: Better line thickness when copy&pasted into Illustrator with 100% Copy&Export Rate setting from the Preferences -> Misc., although 200% or higher rate will still result in better result.
• Fixed: TeX spacing rule was not applied for all Sub/Superscript boxes when "Do not apply in Sub/Superscript box" is checked in Spacing for Function style.
• Fixed: In Define Spacing panes, some fields with Minimum value criteria did not accept any number if it is lower than minimum value and giving no way to enter any two or more digit numbers, which forced to Factory setting.
• Fixed: Define Spacing -> Radical Shape 2 pane had two mis-matched field names and values at the bottom fields.
• Fixed: Undo or Redo after Nudge actions(Left, Right, Up, Down) caused incorrect moving when the view rate was changed.
• Fixed: MMaCenturyS-Bold.otf and MMaCenturySS-Italic.otf fonts had some minor bugs.

• NOTE: When the Clips floating window has many clips listed or a certain complex equation displayed, MathMagic is getting very slow. In this case, close the Clips window, quit MathMagic, then relaunch. Or, delete unused clips as many as possible.

v5.54 - April 23, 2007

• Fixed: fixed the height of Space chars to let mouse clicking work better.
• Fixed: Some Postscript commands in EPS file improved.
• Fixed: Some preview images on the Define Spacing dialog have minor retouches.
• Fixed: Show Nesting Level option from View menu works better with multi-lined boxes.

v5.53 - March 7, 2007

• Added: Remember Size and Location of Editor Window items added to Window menu. Empty New window's location and size can be set by specifying its location and size for an empty window and then just closing it.

• Changed: Legacy MathMagic Fonts(MM~ fonts) are set as default symbol fonts so these fonts are required to install in most cases..

• Fixed: Superscript template items of Superscript with value 2 or 3(square or cubic) was not displayed sometime.
• Fixed: Last two items in Set(or Cup) symbol palette had wrong mapping.
• Fixed: Some shortcut keys followed by cmd-T or cmd-K assigned correctly again.

v5.52 - January 8, 2007

• Added: (Prime Edition only) Embedding 2-byte fonts in EPS can be turned ON or OFF from Preferences->Misc pane.
• Added: (Pro Edition only) New fonts(name followed by -SS) specially designed for sub-subscript box added.

• Changed: "Register Shortcut..." dialog window has a improved layout.
• Changed: Registered buttons in the UserItem Toolbar are now stored in the new file in the following path, for easier sharing with others.
/user's home/Documents/MathMagic User Data/UserItem Toolbar.pref
• Changed: Authorization dialog can accept machine-locked License code.

• Fixed: (Pro Edition only) MathMagic Pro application crashed when saving equations in InDesign or QuarkXPress document on a cirtain environment.
• Fixed: Some minor user interface changed.

v5.51 - December 18, 2006

• Added: Added a few "Negate Set" symbols to Not Set Symbol palette.

• Changed: Factory Setting Symbol font set has been switched to "MM~" fonts from "MMa~" fonts.
• Changed: When the Postscript name for a font face is not found, MathMagic just saves its Plain style Postscript name, instead of its Screen name.
• Changed: Maintain the color when a selected part is auto inserted into the new template box or Style -> Math Default is applied.
• Changed: Some Factory Setting values changed in Preferences->Spacing.

• Fixed: Right side Accents followed by Subscript box now has better distance to its mother character on the left.
• Fixed: The width and gap of Left or Right accents are more accurately calcuated.
• Fixed: Cursor moved to the end of the line when deleting an accent to a template.
• Fixed: Crashes when closing a window sometimes.
• Fixed: Option-click on a accent or some parts of equation did not select anything.
• Fixed: Accents to a template(to non-Character) could not be copied or saved.
• Fixed: Wrong calculation of Box height found in v5.5 fixed.
• Fixed: Mis-matched symbols in Not Set symbol palette re-arranged.
• Fixed: Mis-matched accents(Double Accute and Back Prime) in the Accents template palette re-arranged.

v5.5 - December 1, 2006

• Added: User can change RGB or CMY values directly in the "Edit Color Name and Value" dialog after New Color/ReAssign command from the Color floating window.
• Added: "Keep LSB and RSB" option is added to Preferences -> Spacing -> Line Spacing & Box property pane, to help use some fonts that have glyphs outside bounds when exported in EPS format.
• Added: New checkbox added to Preferences->Misc pane for selecting Character by Character vs. Word by Word when saving in EPS. This may help some fonts with incorrectly designed width table that result in incorrect overall width on the rightmost edge of the EPS image.
• Added: 'Operator' style is added in Preferences -> Style pane. This will allow user to specify a separate font for commonly used '+', '-', '=', '<', and '>' binary or relational operators.
• Added: When user remove the license from a computer, License Removal Confirmation code can be directly emailed from the confirmation dialog or copied to Clipboard.
• Added: Added a new Baseline location option for multi-line equation to the Export pane.

• Changed: "StyleSet dialog..." item is removed from StyleSet popup menu in the main toolbar. This command is available from Edit menu.
• Changed: Re-authorization is needed when the previously licensed hardware configuation is changed.
• Changed: 'Demo' watermark string is added in EPS files when the software is running in Trial mode.

• Fixed: When 'Show Nesting Level' is ON, Nudged part was not displayed.
• Fixed: Better handles opening newer version documents.
• Fixed: Cursor moving order with tab, shift-tab, left or right arrow keys is better handled.
• Fixed: A few TeX symbol name fixed.
• Fixed: User specified font name to '-', '+', '=' operator symbols was not saved in MMF.

v5.44 - Octorber 27, 2006

• Changed: Floating palettes can now support their locations for mulple display environment.
• Changed: When exporting in TeX, font index table is not generated.
• Fixed: The baseline location of the exported, copied, or dragged out PICT equation was incorrect.

v5.43 - Octorber 17, 2006

• Added: Mighty mouse and other 360º scroll devices supported on OS X 10.4(Tiger) or later.
• Added: User can choose the Color format between RGBColor and CMYKColor for the EPS files from Preferences->Misc pane.
• Added: MathMagic displays alert messages while opening a document if any used fonts are not found from the system. Main toolbar does not display the Font name if the font for the current cursor point is not available from the system.

• Changed: Unlimited Undo/Redo supported so the Maximun Undo/Redo setting field is removed from Preferences->Misc pane.
• Changed: All Template and Symbol palettes now have better color image.
• Changed: 4 new Angle with Underbar symbols added to Triangle Symbol palette. 4 triangle symbols moved from Misc Symbol palette to Triangle palette.
• Changed: Bitmap based PICT for Copy & Export now supports 300dpi resolution instead of 600dpi to save memory and be more compatible with low memory systems.
• Changed: Exporting in Color GIF format supported.

• Changed: Preference file name is changed and old settings stored in the previous Pref file is discarded.

• Fixed: MathMagic crashed when Math Default style applied to a certain templates.

• Fixed: One of Preference resource is repeatedly added.
• Fixed: Two templates of variable wide tilde and variable wide hat over Box had wrong height to tilde and hat.
• Fixed: Variable Over tilde, Variable over hat, Fixed over hat, and fixed over triangle did not work with the minimum gap and height setting.

v5.42 - September 20, 2006

• Added: A few new StyleSets with old MathMagic fonts setting added for those who prefer MM~ fonts to new MMa~ fonts, for the compatibility with older equations or Windows versions.

• Added: When there is no bold face style available for a certain font used in the equation, MathMagic now manually generate a Fake Bold face by writing the char one more time with shifted 2% to the right. This value can be customized in the Preferences->Define Spacing->Export Margin & Others pane. 0% turns off this Bold face generating feature.
• Added: PICT format can now be either Vector based(default) one or Bitmap based(new). This can be set Preferences->Misc pane. The setting applies to all PICT images in Copying, Dragging, and Exporting. Bitmap based PICT does not require the used fonts on the target system to display the equation. But the file size is bigger and the printing quality is limited.(It has 600dpi resolution so it should work fine with most display and printers.) Vector based one needs fonts on the system to display the euqation correctly. But the file size is more compact and there is no zagging even though you enlarge it.
• Added: Align at Comma(,) is added under Format menu mainly for (many European) countries using Comma as Decimal Separator instead of Period.
• Added: "Treat Comma as a Decimal Separator" checkbox is added in Preferences->Spacing->TeX Spacing rule pane. When checked, Comma(,) is treated as a Decimal Separator like Period(.) when used in-between numbers so that the leading or trailing space is managed as an Ordinary character instead of Punctuation.

• Changed: Exporting in Gray EPS format now supports better matched gray conversion.
• Changed: About box dialog is improved.
• Changed: A few of Show ~ menu items under View menu are rearranged.
• Changed: More than triple clicks remain as triple click selecting a full line so user does not have to pay attention whether it is the 3rd click or the 4th.
• Changed: The file format version is not recorded in the equation if dragged out while pressing option key. This may be useful for making equation clips so it does not complain about the file format difference when dragged-in later from a different version of MathMagic application.

• Fixed: A few screen update bugs fixed.
• Fixed: The right side margin of the Exported PICT equation had 1 extra pixel, which is now fixed. Exported EPS file also had somewhat wider width.

v5.41 - July 26, 2006

• Fixed: Exporting EPS Gray had a color preview although EPS image itself was in gray.

v5.4 - July 25, 2006

• Added: For multi-lined equaitons, Leading & Trailing Line spacing can now be set per each line via Format menu or by clicking on Main Toolbar's Line spacing up/down arrow while shift or option key is pressed.
• Added: "Bold Italic" font style is added as a separate menu item for convenience and clear display in the Style pop-up menu on Main toolbar.

• Fixed: Math style, such as Function or Vector, is not maintained when its font style is changed.

• Fixed: When Bold or Italic font style is applied for the first time, the original style cleared.
• Fixed: The Size unit was not stored as a Default value although "Make Default" button was clicked in the "Change Size Unit" dialog.
• Fixed: Vertical alignment always set to Base in the Format menu.

v5.34 - June 29, 2006

• Added: Frequently used Square & Cube superscripts added in the Script template palette for faster input.
• Added: Some more intuitive feedback messages provided during the Authorization.

• Fixed: Bug in reading equations with backslash('\') character.
• Fixed: Reads MathMagic EPS files created from Windows environment better.
• Fixed: Some style changes such as from Italic to Plain, were not applied when exporting as EPS.
• Fixed: Leading spaces in the fields of Authorization dialog are handled without alert.

v5.33 - April 18, 2006

• Added: Align Left, Center, Right under Format menu now has its corresponding shortcut key: Cmd-option-L, Cmd-option-J, Cmd-option-R.
• Added: Align at '=', Align All Lines at '=' and Align at '.' added under Format menu.

• Changed: During the trial period(DEMO), Delay time is reduced when opening a new window.
• Changed: Some images in the Preferences->Spacing panes are improved for more intuitive representation.

• Fixed: Variable length Integrals(inserted by shift-click on a Integral template) used OP-Box gap value from Large Operator gap instead of Integral Box gap.
• Fixed: Variable length Integrals now work with the Integral Subbox shift value, specified by Preferences->Spacing->Under/Over Large OP & Integrals pane.
• Fixed: Large operator templates, such as Integral or Summation, with a multi-lined box now align its box to the center, instead of the baseline.
• Fixed: Large operator templates, such as Summation, Product or Set, now work with Max. Height In-Between script boxes spacing value, as well as Integral.
• Fixed: The Subscript box of Large operator templates had a wrong further down location when the template had multi-lined box.

• MMa Fonts Changed: All MMa OpenType fonts were revised to make QuarkXPress PDF engine work well with MMa OTF fonts.

v5.32 - March 28, 2006

• Added: Exported or copied equation can include the baseline in red color by checking 'Insert Baseline when Exporting' item from View menu.

• Changed: MathMagic Personal Edition user now can select the symbol font set to old MathMagic Fonts as well as new MMa Fonts in the Preferences->Style pane, at the bottom of the window.
• Changed: EPS file size is more compact.
• Changed: The default value for "Alert Different File Format when opening" in the Preferences->Misc. pane is set to OFF.

• Fixed: Multi-lined equation had wide left and right margin even if the Line Betwen Lines is not turned on.
• Fixed: User name & Email address checking is improved in the Authorization dialog when either one is not enterred.
• Fixed: The baseline location of Multi-lined equation was not displayed correctly in the Preference->Spacing->Export Margin & Others pane.

v5.31 - Feb. 15, 2006

• Added: In the Authorization dialog, License can be removed from a computer by pressing option key if the user want to move the License to other computer.

• Changed: Greek characters are now considered as Alpha character in TeX Spacing Rule, as well as Ordinary Character.
• Changed: Script box alignment dialog now holds the shift value separately for both Superscript and Subscript.

• Fixed: Some European 8-bit ASCII characters are handled better now.
• Fixed: Bounding box of Exported EPS and PICT images now has better margin calculation and baseline position, especially when there is a nudged part outside the normal frame.

v5.3 - Jan. 9, 2006

• Added: Long arrow templates now include more arrows and harpoons.
• Added: Baseline location for multi-lined equations can be selected by user from Preferences->Spacing->Char & Line setting pane(Pro & Prime Editions).
• Added: Special flag added in EPS file when Relational Symbols are used within the equations.(Prime Editions only).
• Added: Horizontal Paren/Brace/Bracket templates with under or over sub-box are added.
• Added: A new defining spacing field added for gap between Integral Large Operator and its factor box to allow user set it separately from general Large operators.
• Added: A new defining spacing field added for gap with Subscript followed by Superscript box.
• Added: Scroll by mouse-dragging has faster speed when the mouse point is far outside from the window frame.
• Added: More than 100 of MMa~ fonts and styles(in OpenType & TrueType) are included by default.

• Changed: New MMa~ fonts are used in the Factory setting Style values, instead of MM~ fonts.
• Changed: With option key pressed, the mouse clicking selects better to the position from the beginning of the box. This option-click works as well with accents, fences, and other variable operator symbols embeded in a template, which eables user to move the selection with Nudge feature(option-arrow keys), apply Color, or change Size and Style for the specific selection.(Some actions for specific components are limited to prevent any unexpected mistakes.)
• Changed: When clicking mouse on a character or template, it determins the position by the width ratio of 1/3 : 2/3, instead of half vs. half, whether to put in front or back. This is to improve the user experience. And the clicking on a subbox or small character finds the position more acurately as well.
• Changed: If the Line Spacing unit is an absolute unit(not %) in Preferences->Spacing and the Min. Gap is 0, the equation now use the fixed value for the line height.
• Changed: Persona Edition has more Nudge movement(up to 5pt at 100%).
• Changed: Factory Settings of Arrow lines are a bit thicker now.
• Changed: The location of the script box of "Root Of" template now positions better when the height of root is big.
• Changed: The location of Space template, Align template, and Phantom template popup palettes are relocated for easier use.
• Changed: The minimum gap for Under or Over Large Operator templates now takes the value from the normal Under/Overscript.
• Changed: The minimum gap between Under or Overscript templates is now able to accept 0, without its internal minimum 1pt.
• Changed: Improved the screen drawing of Horizontal Strut bars showing left, center, and right alignment mark.
• Changed: Binary "bot" symbol is changed to Relation "perp" symbol from Symbol palette.
• Changed: Italic overhang for overbar templates or over-arrow templates now check the font style of the last character instead of the first character of the box below the line.

• Fixed: Crashes when runing on Mac OS Classic environment.
• Fixed: The equation size and baseline location of exported EPS and PICT was incorrect when there is a Nudged part outside to the top or left of the equation edge.
• Fixed: Clicking or option-clicking on a Nudged box recognizes it correctly.
• Fixed: A crash when Style -> Make Default menu is applied to accents fixed.
• Fixed: The height of Long Arrows in subscript or sub-subscript boxes was incorrect.
• Fixed: The line thickness of Long Arrows fluctuated by view rates on screen display.
• Fixed: Fence overhang adjusted for Base alignment fences.
• Fixed: 0(zero)pt space width fixed when it is inserted at the end of a box.
• Fixed: Ceil fence had a wrong fence symbol matching to angled-bracket.
• Fixed: Horizontal Strut bars followed two or more characaters caused wrong position for the following characters.
• Fixed: Some Define spacing Unit popup menu did not cover the value when switching uint.
• Fixed: Screen update bug after Fence alignment changes.
• Fixed: The height of sub/superscript box was wrong when followed by a MATH STRUT bar.
• Fixed: Italic overhang for overbar templates or over-arrow templates did not work automatically sometimes when user does not specify the font style to Italic.
• Fixed: Define spacing fields now work same for both Horizontal Paren/Brace/Bracket templates and those with a sub box.
• Fixed: When saving in EPS format, crashed with some incorrect fonts in low memory condition.

v5.2 - Nov. 21, 2005

• Added: New set of Integral symbol with vertical design added to Preferences->Shape pane, and in the MMVariable and MMa Variable fonts.
• Added: "Demo" watermark added in the exported EPS image for some Demo builds.

• Changed: The factory setting value of the increasing unit for Fences with fixed Alignment has changed from 25% to 0% to make fixed fences remain unchanged.
• Changed: The minimum 1pt gap between templates is now set to 0, plus the value set by TeX spacing rule in the Preference dialog.
• Changed: The minimum size of zoom size of the editor window changed.
• Changed: The thickness of the cursor line is now variable depending on the current view rate.
• Changed: Non-Turkish versions of MathMagic may not work on Turkish Mac OS. Turkey customers should use Turkish versions.

• Fixed: Some fonts with different PS name in FOND resource from sfnt name table caused wrong Postscript font name when saving in EPS formats, due to the bug of Mac OS X. This is fixed by not relying on Mac OS X font manager API.
• Fixed: Round-off error that caused wrong fence height between low view rate and high view rate including EPS saving.
• Fixed: After-image from some of window resizing and a few other redrawing.
• Fixed: The tail part of square root is displayed better on screen and PICT image and drawing outside the window contents area is fixed.
• Fixed: MathMagic saved as MMF format instead of the selected graphic format if there is a duplicate file name while exporting although Replace is selected.
• Fixed: Top left bottom right margin values specifed in Define Spacing dialog were not correctly applied to the exported EPS file.
• Fixed: Top margin from Square root line was narrower when exporting in EPS.
• Fixed: could not read the color value correctly for files created by Windows versions of MathMagic.
• Fixed: Allowed canceling further missing font checking.
• Fixed: Serial # checking bug fixed for a certain cases.

• More Integral symbols are added in MMa MathMagic Fonts.

v5.1 - July 18, 2005
• Added: New input interface supported in entering a template when there is a selection. The selected part is maintained in the first box of the entered template rather than deleting the selection. This new behavior can be turned ON/OFF at Preferences->Misc pane.
• Added: Document color list stored in the StyleSet file is now applied with StyleSet switching.

• Changed: Glyphs in 8-bit(over 128) code area of MMRelation font are relocated to those in MMBinary.
• Changed: MathMagic Personal no longer support the baseline information when exporting as EPS.

• Fixed: The shape of Integral did not work with StyleSet.
• Fixed: Undo after deleting a selection of more than one line a screen update bug.
• Fixed: Undo after deleting with Delete key caused crash when there is just one character left in the box.
• Fixed: Bold face for Vertical line and Angle fences was not working.
• Fixed: When opening an empty mmf file, a while blank area is displayed sometimes on the left top corner of the window.
• Fixed: Main toolbar now allows some buttons to work even when no editor window is open.
• Fixed: When inserting or editing more than 30 equations in Adobe InDesign or QuarkXPress documents, an error message displayed, saying that it could not make another window. And in the case, the MathMagic Plugin or XTension keeps waiting for the MathMagic Pro application to respond.
• Fixed: Shortcut keys for a few fraction templates and a few other palette items were mismatched.

v5.04 - June 22, 2005

• Added: Show Max. Equation Width item under View menu, which will be enabled when a value(1~1000mm) is set in Max. Equation Width setting field in Preferences->Spacing->Bounding pane.
• Added: Separate character-spacing setting popup menu added for Function name spacing in Preferences->Spacing->TeX rule pane->Function style part.
• Added: Separate gap settings for curved Fences(closing paren ')', brace '}', and angle '>', followed by a Sub/Subscript box) in Preferences->Spacing->Template Sub/Superscript pane
• Added: Align tab is supported for Right aligned multi-boxes.

• Changed:
Changed the Fence alignment's default value: Base -> Base Fixed. (English build only)
• Changed: Some PRIME Edition only features in Preferences dialog are enabled for PRO Edition as well.
• Changed: Allowed to enter continuous multiple Aligns(tab) by command-option-Tab key.

• Fixed: Insufficient memory alert when opening a new window is now less displayed even though many windows are opened.
• Fixed: Matrix line was not displayed correctly when the column or row is reduced over the original line length without first clearing or reducing the line.
• Fixed: The fraction numerator gap was not working correctly in the Reverse Division template when the numerator has multi-lines.
• Fixed: When multi-lines inserted in the Vertical division template, the first line's baseline and gap to the next line was incorrect.
• Fixed: Left/right arrow keys did not move the cursor over boxes in a certain templates when there were multi-lined boxes.
• Fixed: Square root in a script sized box caused a problem in exporting as a EPS file.
• Fixed: Multi-box rows had wrong baseline displacement.
• Fixed: Superscript template to a template had a wrong height.

• Fixed: Symbol fonts in MMa MathMagic Fonts and MMa MathMagic Fonts S-SS are fixed.

v5.03 - May 3, 2005

• Added: New MMa MathMagic fonts are included.(Body text fonts are in OpenType format. Symbol fonts are in TrueType format)

• Added: 'Symbol' font and other Greek fonts(non-MMGreek keymapped) are now supported in L.C. Greek and U.C. Greek styles.
• Added: Left & right circled arrow integral templates in the Integral template palette.
• Added: Size of Circle or circled arrows for circled integrals can be adjusted in Define Spacing dialog.
• Added: MathMagic Fonts now include a full set of vertical integral symbols including variable sizes.
• Added: Vertical integral symbol supports for variable size integrals.
• Added: Integral sub-box location can now be shifted left or right in Preferences->Large Operator(Sum, Integral, ...) setting pane.
• Added: Different file format(newer or older) alert can now be on or off in Preference->Misc. pane.
• Added: Accents to subscript/superscript templates is now supported.
• Added: Available fonts are checked when a document is opened and it alerts when any used fonts are not available.

• Changed: The default font that MathMagic refers to the em ('M') size for spacing is changed from "Times" to "MMTimes" because some OS X users do not use Times any more. The em size of MMTimes is a little narrower than that of Times. So there might be some layout reflow if you used some space values based on em size. If this is a problem for you please contact customer support team.
• Changed: The common MathMagic Preference file is devided into versions and named as: MathMagic Personal 5 Pref, MathMagic Pro 5 Pref, and MathMagic Prime 5 Pref.
• Changed: 'q' size items changed in Size for frequently used items.
• Changed: Default space character selection moved to Shape pane from Misc pane in the Preference dialog.

• Fixed: When pasted in Adobe Illustrator, the equation's left-top corner was far-left.
• Fixed: Binary operator symbols were not recognized as Single operators when they come after some of Relational symbols.
• Fixed: The values of "Superscript After Gap" and "Subscript After Gap" were not applied when a template is followed.
• Fixed: The height of superscript that comes after subscript box was not correct.
• Fixed: Embellishments/upper accents on a Greek character moved to the center for MMGreek font and TS Greek font.
• Fixed: The circle size of variable integrals(entered with shift key pressed) was smaller than regular integral's.
• Fixed: The double or triple variable O-integrals did not have correct width of the circle.
• Fixed: Character accents inside a template accent did not displayed correctly.
• Fixed: Line spacing Increase/Decrease button on Main toolbar now refers to its original unit, rather than Display Unit.
• Fixed: Subscript box location displayed wrong when inserted from Useritem toolbar.
• Fixed: The preview image of EPS export Overprint black setting in Preferences->Spacing -> Export margin pane was wrong.
• Fixed: Bigger/Smaller size button(up/down triangle) clicks now increase or decrease by the same unit which is specified in Size menu.
• Fixed: Deleting template accents and Undo/Redo of the deleting action did not work properly when more than one components are in the box.

v5.02 - March 4, 2005

• Added: 4 new small spaces added to Space template and space menus: 1/16 Em, 1/16 Absolute size, 0.5pt, 0.5q.
• Added: New vertical type Integral symbol is supported and can be selectable from Preferences->Shape dialog.(Pro & Prime Edition only)
• Added: Black Overprint can be ON/OFF in the Define Spacing -> Bounding box pane for EPS export (Pro & Prime Edition only)
• Added: 8 smaller Set symbols added to the Set Theory Symbol palette.

• Fixed: Height calculation of sub/superscript is improved, especially for multi-depth.
• Fixed: Single operator followed by a binary operator or relation operator is recognized correctly.
• Fixed: ITC TT fonts had wrong Postscript font name when saved as EPS.
• Fixed: Preview of Preferences dialog does not update correctly for Sum or Integral symbol changes.
• Fixed: Screen update bugs after inserting some templates or deleting some templates.
• Fixed: Refresh(cmd-D) sometimes did not refresh all.
• Fixed: Accent color is set to the first state of its root character and a color change for accents thereafter is not applied when exported in EPS.

v5.01 - January 20, 2005

• Added: Separate Size fields for Integral symbol with On/Off check box. (Prime Edition only.)
• Added: Accents now works on Templates.
• Added: 3 spacing fields added in Define Spacing dialog for Template Accents.
• Added: Automatic Spacing rule(TeX rule) can be selectively ON or OFF for each Size of Full, Sub/Superscript, Sub-Subscript, Symol, and so on, from Define Size dialog. Personal Edition has some limtation.
• Added: MathMagic unique feature of Second double-clicking. First double-click just selects a word or continuous templates. Second double click on the selection area selects a whole box or line, same as a continuous triple click.

• Changed: Function name followed by a sub/superscript now uses Before Sub/Superscript gap, instead of Function space.
• Changed: Factory setting value for Prime location changed.
• Changed: Sub box of Integral templates moved a little to the right.
• Changed: Some other Define Spacing values changed to make equations look better.

• Fixed: Under/Over integral's main box location was incorrect when a Max. in-between gap value was specified.
• Fixed: Wrong calculation of a Template + Sub/Superscript combination gap when applying TeX spacing rule.
• Fixed: Accent at the end of function name caused not to recognize auto function style.
• Fixed: Bold face of Fraction lines and Under/Over bar lines returned to plain face after saving as EPS.
• Fixed: Bold face of Under/Over symbols was not saved.
• Fixed: Some other minor bugs fixed.

v5.0 - December 25, 2004 - Merry Christmas!
• Added: 3 fields added to Accent setting for better control of Prime location in Preferences->Spacing pane.
• Added: Left/Right overhand and Italic Overhang fields for Under/Over bar templates added to Preferences->Spacing pane.
• Added: Min. Box Height setting items are added under Format menu to allow users set the minimum box height for each Full Sized box.

• Changed: MMF File format version and Preference file version increased.
• Changed: Several Factory setting values changed.
• Changed: Min. Ascent & Min. Descent for boxes are now not applied to Subscript boxes and Sub-subscript boxes.
• Changed: allowed minus value for Radical script horizontal location.
• Changed: Function space(before & after) is now applied to leading/trailing Ordinary characters only.

• Fixed: Sub-Super paired script to some italic style character like 'W' or 'L' invaded to the left side of character.
• Fixed: Superscript After Gap & Subscript After Gap were not applied when they are followed by a Function style string..
• Fixed: Nudged parts were not correctly included in the bounding box area when saving as EPS or PICT.
• Fixed: Undo was not working with Reset Nudge from the Format menu.

v5.0b57 - November 25, 2004
• Added: Shortcut key added for menu items: Style->User 1 & User 2, Size->User 1 & User 2.
• Added: CMYK color value(%) of the currently selected color displayed on the floating Color window.
• Added: More meaningful message in the Authorization dialog when the computer is authorized already.

• Changed: Fence height calculation changed for better accuracy for Base Fixed & Center Fixed alignments.
• Changed: + - = symbols are now allowed for changing font.
• Changed: Authorization dialog message changed for Authorized user.
• Changed: '<' & '>' are considerred as Relation symbols instead of binary operator in applying the TeX spacing rule.

• Fixed: Mouse-clicking does not update the current color list on the floating Color window, while cursor moving with keyboard does.
• Fixed: EPS export bug with cutting out of characters near the bottom or right margin side when using some fonts.
• Fixed: Superscript After Gap and Subscript After Gap was not working(after Ordinary is devided into Character & Number additionally).

v5.0b50 - November 9, 2004
• Added: More than 30 new setting fields added to Preferences->Spacing dialog for accurate adjustment of gap, thickness, and shape.
• Added: Better support for OpenType fonts in Preferences->Style list, and bold/italic font face switching from menu.
• Added: Nudge movement(option+arrow keys) for selection and Nudge floating window.
• Added: Many more symbols added to Symbol palettes and Symbol popup palettes reordered.
• Added: Change Size Unit dialog added for other size units(q, mm, in) than pt.
• Added: Subscript/Superscript box and Sub-subscript box can have new font style settings separately.
• Added: User configurable TeX spacing rule for each Left/Right part combination in Preferences->Spacing.
• Added: Summation large symbol can be changed between Western shape & Eastern shape.
• Added: Bold faced template can be added by pressing option key while clicking on a template button.

• Changed: Factory Setting values of Define Spacing dialog have been changed to make better equation quality.
• Changed: MMF file format is changed and may cause some problem with backward compatibility for some templates and settings.

• Fixed: StyleSet pop-up menu item matching with the current window fixed & improved.
• Fixed: Trailing space characters handled for Customer # and Serial # fields in Authorization dialog.
• Fixed: File export & export process is more stabilized against unexpected situation.
• Fixed: Many other bugs fixed.

v4.31 - August 7, 2004
• Added: +100% & -100% items added to the View menu for an easier change of view rate.
• Fixed: a few bugs related to File Open/Save are fixed.
• Fixed: Preview button on the Define Spacing dialog does not redraw the window correctly somtimes and Undo count increased too often.

v4.3 - March 1, 2004

• Added: MathMagic fonts are revised to v2.4 and some new symbols are added in the MathMagic fonts. New fonts has some additional symbols and some of the font information including baseline position have been adjusted to align symbols better with characters. So, please be aware of using these new fonts(v2.4) when you need to print previously created equations since they might have some layout reflow. The new MathMagic fonts are compatible with previous versions of MathMagic application, and previous versions of MathMagic application work with the new v2.4 MathMagic fonts.
• Added: 2 new Fence Alignment options are added: Fence height is not variable but fixed.
• Added: Equation from MathMagic XTension window can be copied and then pasted into MathMagic application window directly, without saving it as an external .MMF file.
• Fixed: Size conversion loss is minimized over unit conversions in the Spacing dialog.
• Fixed: Two empty boxes were overlapped a little when they were adjacent.
• Fixed: 8-bit 1-byte character, like special characters for European, is handled better in the MathMagic editor window.
• Fixed: Superscript/Subscript box is now closer to its left base character.
• Fixed: Message for missing fonts is fixed.

v4.21 - January 30, 2004

• Fixed: crashed while launching v4.2 application direclty without opening a previous document on a certain environment
• Fixed: StyleSet popup menu items were accumulated whenever opening a document from Finder.
• Fixed: A few of the last two rows of Fence template items could not be registered to UserItem list

v4.2 - January 26, 2004

• Added: MathMagic Pro for QuarkXPress has been added to MathMagic product line.
• Added: MathMagic Windows file(.mmf) format is opened directly on Mac by double-clicking(on Mac OS X).
• Changed: Some layout of the main toolbar is changed.
• Changed: Confirmation dialog is added when deleting a StyleSet in the StyleSet dialog.
• Fixed: Undo after changing any of Font, Size, or Style of Accented or Negated character(s) causes crash.
• Fixed: File Open dialog now enables other MathMagic file formats('PICT', 'EPSF', 'MMCL') than 'MMFF'.
• Fixed: Undo/Redo count on the main toolbar is not updated when switched to a new document or other document window.

v4.1 - December 8, 2003

• Added: "Show Baseline", "Show Bounds" and "Show Empty Slots" are added to View menu so that user can visually see the baseline of equations. The Master baseline is a red line and each slot's baseline is a dotted red line.
• Added: +1pt, +0.1pt, -1pt, -0.1pt items are added to Size menu with each keyboard shortcut key for fast keyboard based resizing for the current selection.
• Added: Angstrom, degree, double acute accents are added to Accent template.
• Added: Tab or cursor movement order for fractions and arrow templates that have two slots vertically, can now be adjustable between Western order and Eastern-Asian options in the Preferences -> Misc. dialog now.
• Added: Minimum line gap fields are added to Define Spacing dialog -> Line Spacing pane. If the minimum value is 0(zero), it allows line overlap which is minus value.
• Added: Drag&Drop of MathMagic equation or Text from other applications to MathMagic editor window is now supported.
• Added: "Rotate Fence alignment", "Rotate Root alignment" are added to the Format menu so that user can change the alignment easily without opening a dialog.
• Changed: Each new version comes with additional 5 times of trial period even though the previous trial was over.
• Changed: Maximum Undo/Redo count is increased up to 50, while the default value is still remaining as 10.
• Changed: supports additional graceful trial count for each new version so that user can try the latest version a little more all the time.
• Fixed: When saving as EPS(Black or Color), the PICT preview did not include the baseline information and bounding margins.
• Fixed: Magic control key did not display the shortcut key tool tip on the pull-down menus of Template or Symbol on Mac OS X 10.3(Panther).
• Fixed: The left nose end of Root or Square Root template drawing was too small when the line thickness was thicker.
• Fixed: Fraction is in subscript or superscript position as a Script size, the thickness of horizontal line is that of Full size and too thick.
• Fixed: Upper accent was not properly positioned when the base character style is Italic. It should be moved to right side a little more to be in the center.

v4.0.7 - November 11, 2003 (the 7th Anniversary of InfoLogic, Inc., the developer of [Math+Magic]™ )

• Added: Paste the equation PICT back from other software into the MathMagic editor window so that it can be edited again.
• Added: added more function names to be recognized automatically as Function style. All function names are now:
Im, Pr, Re, arccos, arcsin, arctan, arg, bmod, cos, cosec, cosh, cot, coth, cov, csc, deg, det, dim, exp, gcd, glb, hom, imz, inf, injlim, int, ker, lg, lim, liminf, limsup, ln, log, max, min, mod, pmod, projlim, rez, sec, sin, sinh, sup, tan, tanh, varinjlim, varliminf, varlimsup, varprojlim
• Added: 600% ~ 3200% view rate items are added the View menu so user can select it from menu bar as well.
• Added: "Define Style", "Define Size", "Define Spacing" items are added to Style, Size, Format menu accordingly to make the settings more easily. These was removed since v3.0 but now restored them as v2.x.
• Added: Color floating window now displays the RGB value of the selected color. The New color dialog displays both RGB(0~65535) and CMYK(0.0~100.0%) values for hight end users who need to handle exact color values.
• Fixed: Preview and OK buttons were not working in StyleSet dialog window since v4.0.5 build.
• Fixed: When exporting TeX names for functions were mismatched.
• Fixed: Negate templates that are applied to characters had narrow gaps between neighbors.
• Fixed: when Copying as PICT and pasting it into AppleWorks, the bounding box margin was not applied to the baseline information.
• Fixed: Style information(like Function, Vector, Number, or so) is not maintained when copied if user manually apply other styles than MathMagic engine's default style.
• Fixed: The gap between the first character and the left side in the vertical division templates stays same even though the view rate is changed.
• Fixed: In the Misc tab window of Preferences dialog, the Copy&Paste rate is not saved when the application quits.
• Fixed: when drag&drop a selection from the MathMagic window, the visually dragged image is enlarged when the Preferences->Misc->Copy rate is more than 100%.
• Fixed: crashes when openning a document created with MathMagic XTension if the document contains any Negated template.

v4.0.6 - October 16, 2003 (the birth month of [Math+Magic]™, 5-year old now after the first commercial release of MathMagic XTensions in 1998. )

• Fixed: Document saved with new space kinds added in v4.0.5 can not be opened. And copy&Paste does not work with new spaces as well
• Fixed: Spacing and Style settings were not recovered when called from InDesign. Instead the default settings were applied.
• Fixed: MathMagic crashes when opening MathMagic EPS file modified by other application
• Fixed: Crashes when exporting to EPS format after changing the StyleSet from the StyleSet dialog.
• Changed: Color style name changed - removed space in the name

v4.0.5 - September 15, 2003

• Added: More kinds of space width are available from Space template: 1/8, 1/6, 1/4, 1/3, 1/2, and Full Em space. 1/8, 1/6, 1/4, 1/3, 1/2, and Full size of the Full body text size.
• Added: Auto-Recovery is now supported by default when crashed without closing the working windows and it can be turned On/Off by user from the Preferences->Misc pane. Uncovered files can also be discarded temporarily by holing down shfit key during the application launch.
• Added: Factory setting and Make Default buttons added in Fence Alignment dialog and Root Alignment dialog.
• Added: The location of Preferences dialog window and its lastly used pane is remembered, instead of auto-positioning on the center of the parent window.
• Changed: Factory Setting values are changed to improve the equation quality.
• Changed: The height of braces and vertical bars are now assigned separately from the Spacing preference dialog -> Fence tab, and can also be set with minus(-) value to reduce the size further.
• Changed: Magic shortcut key is changed from option to control key. User now can turn On/Off the Magic shortcut key from Edit menu as well. control-tab and control-shift-tab is supported. option-tab switches between Template and Symbol tab. All shortcut keys are working with non-English keyboard layout.
• Changed: When copy&pasting or drag&drop'ing colored equations, only used color list is inserted instead of inserting all color list of document color list.
• Changed: The shape of Arrow head is improved further and the arrow line is thinner.
• Changed: The default value for Fence Alignment is changed from Normal to Base alignment.
• Changed: The install location for MathMagic fonts on Mac OS X is changed to Classic System folder to make the created equations compatible with Classic applications as well.
• Fixed: Minimum gap between the text head and the horizontal line of Square Root was unexpectedly applied to the bottom side as well.
• Fixed: MathMagic Preferences file was broken if 70 or more items of Template/Symbol are added to the UserItem toolbar.
• Fixed: Crashes when an empty file or corrupted file is opened.
• Fixed: Crashes when exporting to EPS format after changing the StyleSet from the StyleSet dialog.
• Fixed: The Fence Alignment setting for Vertical middle line and Vertical double middle line templates in Fences were not saved.
• Fixed: In-between lines of variable Matrix templates were wrong positioned or dispeared when exported as EPS format.
• Fixed: The line width of Root template is thinner than the setting when exported as EPS format

• Some other minor bugs fixed.

v4.0.3 - August 9, 2003

• Changed: The shape of Arrow head is improved.
• Changed: The gap between fences and superscript/subscript got closer for better view.
• Added: Side length of long horizontal arrows can now be specified by user from Spacing preference dialog.
• Added: The height of Line fences can be specified separately from other fences from Spacing preference dialog.
• Added: The before/after gap of Superscript and Subscript can now be specified separately from Spacing preference dialog.
• Fixed: Horizontal over/down-braces were broken when exported in EPS.

v4.0.2 - July 31, 2003

• Fixed: Application crashes when exporting color equation as TeX format.
• Fixed: Application crashes when UNDO after deleting characters.
• Fixed: Application crashes with arrow keys after undo'ing.
• Fixed: Fences, integrals, and horizontal braces keep expanding if the size is specified as non-predefined size and then the View rate is changed.
• Fixed: The jointing points of Fences, integrals, and horizontal braces were broken if the size is specified as non-predefined size and the width or height is big.
• Fixed: Shift-clicking in the editor window does not select the bounding area.
• Fixed: Keyboard typing does not override the selection when it is selected by double-clicking.
• Fixed: "Before gap" or space before of the subscript/superscript value on the "Preferences -> Spacing -> Sub/Superscript" does not work when it comes after a fence.
• Fixed: The location of subscript or superscript is wrong(moved to center) when there is a space in front of it.
• Changed: The current color style of the previous line is applied to the next line or box when entering a return key, instead of resetting to the default black color forcely.
• Changed: The default gap between fences and supperscript(or subscript) is moved closer.
• Changed: The length of Color Style name is limited to 31 bytes instead of 255 bytes.
• Changed: The default location of MathMagic Fonts by the installer has been changed to Classic OS's Fonts folder when installing on OS X so that the classic applications can also see the equations correctly.
• Some other minor bugs fixed.

v4.0.1 - June 27, 2003

• Gray scale EPS is supported under Export menu when exporting gray or color equations in EPS format.
• Trial count is changed from 50 to 30.
• Color style name is supported separately for each localized MathMagic.
• Fixed: Baseline was not correct in EPS format when some mathematical operators were used in the equation.
• Fixed: Reassigning a color name on Mac OS 9 not working.
• Fixed: Font size -> Other Size item of Main toolbar did not bring the custom setting dialog box.
• Some other minor bugs fixed and some error message improved.

v4.0 - May 30, 2003

• Authorization engine and interface is changed from a third party InterLok® Engine to its own.
• Color is supported. Color floating window and Color menu are added.
• Printing equations from MS Word document works well without jagged.
• TCP/IP error handling has been changed when launched together with MathMagic Pro Edition.
• Control-clicking on both line spacing icons(wide, narrow) on Main Toolbar now changes the spacing gap in 1/10 unit of the regular unit. And its minimum value and maximum value range is checked.
• MathMagic now can read its Preference file even if it is opened by other version or locked.
• StyleSet is supported on Mac OS Classic.
• File icon is added for EPS format and changed for PICT format.
• Exporting color equation in GIF and EPS format will be limited to Black&White image. Color exporting is not supported for those formats.

• User Guide is updated to cover Color features.

v3.5.1 - March 28, 2003

• Fixed a bug that causes application crash when exporting in EPS or PICT, ....
• Demo nagging frequency is revised.

• User Guide is updated for MathMagic Plug-in

v3.5 - February 28, 2003

• supports StyleSet management under Edit menu: Spacing, Style and Size settings are stored as a StyleSet file and can be switched easily. StyleSet files can be shared with other people to share the same working environment, which is located in the user/Documents/MathMagic User Data/StyleSets/.
• supports TeX import.
• Many predefined Shortcut keys for frequently used Templates and Symbols are changed and added.
• Shortcut keys for Greek characters are supported by Command-G followed by a~z and A~Z.
• Cmd-T, Cmd-K, Cmd-G shortcut keys added under Edit menu for Template input mode, Symbol input mode, and Greek input mode.
• Equations exported as EPS & PICT formats can be edited later with MathMagic again. Creator is changed to MathMagic so that double-clicking on an exported(EPS or PICT) equation will open it with MathMagic application.
• Wheel mouse is supported for scrolling(OS X only) mainly window, Clips window, and User item toolbar. Shift-scroll will move the scrollbar horizontly.
• In the Spacing tab of Preferences window, user can set the margins between bounding frame and the real equation frame when exported. This will save users from manually specifying spacing between character and equation object when entering equations as inline graphics.

• MathMagic Pro Edition is newly branched from the Personal Edition.

• Fixed: when exported as EPS format on Mac OS X, the PostScript font name information is corrected.

• Fixed: Application crashed when pressed the Tab key in a New window
• Fixed: Application crashed when Undo -> Redo -> Tab key and/or cursor movement
• Improved: Authorization engine(PACE InterLok) is updated.
• User Guide document is updated.

v3.0.2 - November 20, 2002

• MathMagic document file name adds its extension(.mmf) when saving.
• Tab order of Fraction templates is adjusted for English version

• Fixed: When the MathMagic application is launched by double clicking on a MathMagic document icon, an empty document window is also opened.

• Fixed: When there is no open document window, opening and closing the Preference window with cmd-; shortcut key causes crash.
• Fixed: Clicking on a MathMagic document window does not bring it to front on OS X.
• Fixed: Space character sometimes display thick garbage line in certain templates.
• Fixed: The scrollbar movement of User Item toolbar is not natural.
• Fixed: Kernel extension security message displayed during installation in Mac OS X 10.2(Jaguar). InterLok® engine is updated to 4.11.

v3.0.1 - October 11, 2002

• Arrow head is improved, especially when the size is small.
• Thin arrow line is no more disapeared: bug fixed.
• MathMagic’s own clipboard is now preserved even after the application quits .
• Equation clips were not displayed when drag&droped from Clips windows directly onto other application: bug fixed.
• A few factory settings values of Spacing preference have been adjusted.
• Install locations have been fixed when installing on OS X.

• User Guide document has been updated.

v3.0
- August 23, 2002

• v3.0 is a commercial version that requires an authorization to run after the demo period of 30 times of launch.
• Carbonized for Mac OS X, which also works on Mac OS 8.6 or later.
• Factory settings values are optimized for better equation shapes.
• Main toolbar buttons are rearranged and Undo/Redo counts are displayed.

• Clips are saved in System Disk:Documents:MathMagic User Data:Clips:Default: directry as a PICT format.
• Control-click on Font Size Up/Down buttons finely adjust in 0.1pt unit.
• Option-click on the close box of a document window or floatting Template/Symbol window closes all opened windows.
• MathMagic application and document icons are changed.
• Memory leaks are fixed in several actions.
• Crashes in low memory condition are fixed on Mac OS Classic environment with more strick memory checking.
• View scale supports 100% ~ 3200%.
• Printing on Mac OS Classic is improved.
• Many bugs fixed and cosmetic retouch made on the user interface.

 More detailed Version History for older versions(v1.1 ~ v2.9 ) is available as a text file when you install MathMagic. [Math+Magic], MathMagic, MathMagic Pro Edition, MathMagic Personal Edition, MathMagic Prime Edition, MathMagic XTensions, MathMagic logo, and InfoLogic are trademarks or registered trademarks of InfoLogic, Inc. All other trademarks may be the properties of their respective owners.


text:
# Conway's Game of Life (follow-up)

I asked for a review of my code, and after making the suggested changes I feel that now the OOP version is clearer in its meaning and overall the code looks cleaner.

"""Object oriented implementaition of Conway's Game of life"""
import random
import time
import os

class GameOfLife():
FILE_NAME = "grid.txt"
ROWS = 22
COLS = 62
DELAY = 0.2
GENERATIONS = 200

def __init__(self, rows=ROWS, cols=COLS, delay=DELAY,from_file=False, \
"""
Initializes a GameOfLife Object with the provided values
"""
self.generations = num_generations
self.alive_cell = alive_cell
if from_file:
else:
self.cur_gen = self.init_grid()
self.rows = len(self.cur_gen)
self.cols = len(self.cur_gen[0])

"""
Reads a given grid from a text file and sanitizes it to be used with the
script.
"""
array = []
with open("grid.txt", "r") as f:
for line in f:
temp = []
for char in line:
if char == "*":
temp.append(1)
elif char == ".":
temp.append(0)
array += [temp]

for i in range(len(array)):
for j in range(len(array[0])):
if (i == 0 or j == 0 or (i == len(array) - 1) or (j == len(array[0]) - 1)):
array[i][j] = -1
return array

def init_grid(self,rows=ROWS, cols=COLS):
"""
Returns an array filled with random alive and dead cells of the given
dimensions
"""
array = []
for i in range(rows):
single_row = []
for j in range(cols):
if(i == 0 or j == 0 or (i == rows - 1) or ( j == cols - 1 )):
single_row.append(-1)
else:
ran = random.randint(0,3)
if ran == 0:
single_row.append(1)
else:
single_row.append(0)
array.append(single_row)
return array

def process_next_gen(self):
"""
Iterates over each element of the current generation and processes their
neighbors.
"""
for i in range(1, self.rows-1):
for j in range(1, self.cols-1):
self.next_gen[i][j] = self.process_neighbors(i, j)

def process_neighbors(self, x, y):
"""
Returns the value for a given cell in the next generation

Keyword arguments:
x -- row coordinate of the current cell
y -- column coordinate of the current cell
"""
neighbor_count = 0

# range() method in pyhton is exclusive
for i in range(x-1, x+2):
for j in range(y-1, y+2):
if not(i == x and j == y):
if self.cur_gen[i][j] != -1:
# The count is incremented by whatever value is contained by the
# neighboring cell.
neighbor_count += self.cur_gen[i][j]

# Checking the 4 rules of game of life.
if self.cur_gen[x][y] == 1 and neighbor_count < 2:
return 0
if self.cur_gen[x][y] == 1 and neighbor_count > 3:
return 0
if self.cur_gen[x][y] == 0 and neighbor_count == 3:
return 1
else:
return self.cur_gen[x][y]

def print_gen(self, gen):
"""
Function to handle printing each generation

Keyword arguments:
gen -- the number of the current generation
"""
os.system("clear")
print("Conway's game of life simulation. Generation : " + str(gen + 1))

for i in range(self.rows):
for j in range(self.cols):
if self.cur_gen[i][j] == -1:
print("#", end = " ")
elif self.cur_gen[i][j] == 1:
print(self.alive_cell, end = " ")
elif self.cur_gen[i][j] == 0:
print("\n")

def start_simulation(self):
"""
This function runs the simulation.
"""
self.next_gen = self.init_grid(self.rows, self.cols)
for gen in range(self.generations):
self.print_gen(gen)
self.process_next_gen()
time.sleep(self.DELAY)

self.cur_gen, self.next_gen = self.next_gen, self.cur_gen
input("Simulation finished. Press any key to exit")

def user_input(prompt):
"""
Only accepts an input of values either 1 or 2
"""
while True:
try:
choice = int(input(prompt))
except ValueError:
print("Please enter either 1 or 2")
continue
if choice < 0 :
print("Please enter a non negative number")
continue
else:
break
return choice

def main():
"""
Single entry point for our module
"""
print("Select choice : ")
print("1: Read initial grid from file 'grid.txt'")
print("2: Generate random grind of size 11X40")

choice = user_input("Option: ")

# Reading the grid from file
if choice == 1:
simulation = GameOfLife(from_file=True)
simulation.generations = 2
simulation.start_simulation()
elif choice == 2:
simulation = GameOfLife()

# Unicode for Black Square : http://www.fileformat.info/info/unicode/char/25a0/index.html
simulation.alive_cell = u"\u25A0"
simulation.start_simulation()
if __name__ == '__main__':
main()

I have a few questions regarding OOP in python though. When are we supposed to use classmethods? For example, in this script, when would a classmethod be appropriate?

• I already made some suggestions about the use of classmethods in my previous answer (which would replace simulation = GameOfLife(from_file=True) with simulation = GameOfLife.from_file(filename) and simulation = GameOfLife() with simulation = GameOfLife.from_size(rows, cols)). If you're unclear on that, you can comment on my answer and I'm happy to expand on that. See also stackoverflow.com/a/682545/3001761 – jonrsharpe Feb 27 '15 at 9:38
• pedant alert you've defined a "constant" FILE_NAME, but then used the string literal "grid.text" in init_grid . – psaxton Jul 7 '15 at 4:34

First off, the line class GameOfLife(): should be changed to class GameOfLife:.

Secondly, using os.system("clear") isn't very portable. A more portable method would be os.system("cls" if os.name == "nt" else "clear"). If you want re-usability, you can also put this into a function, like this:

def clear():
os.system("cls" if os.name == "nt" else "clear")

You also don't need to surround conditions in if statements with parentheses. For example if(i == 0 or j == 0 or (i == rows - 1) or ( j == cols - 1 )): should be changed to i (i == 0 or j == 0 or (i == rows - 1) or ( j == cols - 1 ):.

Finally, some of your variable names aren't so great. For example, i, j, or array are not so great. Variable names like these should be more descriptive and describe what the purpose of the variables are.

First of all I would like to show what a typical GoL code separation in Python looks like :

## Setup

import random
from collections import defaultdict

maxgenerations = 3
cellcount = 4,4
celltable = defaultdict(int, {
(1, 2): 1,
(1, 3): 1,
(0, 3): 1,
} ) # Only need to populate with the keys leading to life

## Start States

u = universe = defaultdict(int)
u[(1, 0)], u[(1, 1)], u[(1, 2)] = 1, 1, 1

## Main loop

for i in range(maxgenerations):

### User interface

print "\nGeneration %3i:" % ( i, )
for row in range(cellcount[1]):
print "  ", ''.join(str(universe[(row,col)])
for col in range(cellcount[0])).replace(

### Creating a new Generation

nextgeneration = defaultdict(int)
for row in range(cellcount[1]):
for col in range(cellcount[0]):
nextgeneration[(row, col)] = celltable[
( universe[(row, col)],
-universe[(row, col)] + sum(universe[(r, c)]
for r in range(row-1, row+2)
for c in range(col-1, col+2) )
) ]
universe = nextgeneration

## Results

You can run this demo online at : http://www.skulpt.org/ with results :

Generation   0:
----
###-
----
----

Generation   1:
-#--
-#--
-#--
----

Generation   2:
----
###-
----
----

Second of all, to

# When are we supposed to use classmethods?

Come to a compromise between writing GOD object or no methods at all. A good way is to implement code skeleton that does the minimum and then look what else is required.

In typical OOP language your class is a data structure first. Methods give it's data desired behavior ex: describe how to compare items or serialize them.

## For example, in this script, when would a classmethod be appropriate?

It is important that you reuse existing patterns. For example it would be natural to assume that if you have a GoL universe statespace class and you wanted to print it out, then you could just by doing print gol. This is archived with overwriting class method str.

def __str__(self):
return "foo"

Overall I think your code looks good, but I have some more small suggestions:

• Define constants for "magic" values that appear throughout your code, e.g. ALIVE, DEAD and INVALID for 1, 0 and -1 (in the appropriate contexts, of course).
• Be consistent in how you use spaces. For example, you use both x+1 and x + 1, and in one place you put spaces on the inside of parentheses.
• Simplify the nested loops. Some of them are inefficient and some could be written so that the communicate their purpose more clearly:

For example this:

for i in range(len(array)):
for j in range(len(array[0])):
if (i == 0 or j == 0 or (i == len(array) - 1) or (j == len(array[0]) - 1)):
array[i][j] = -1

could be turned into this:

for i in range(len(array)):
array[i][0] = -1
array[i][len(array[0])] = -1

for j in range(len(array[0])):
array[0][j] = -1
array[len(array)][j] = -1

And this:

for i in range(x-1, x+2):
for j in range(y-1, y+2):
if not(i == x and j == y):
if self.cur_gen[i][j] != -1:
# The count is incremented by whatever value is contained by the
# neighboring cell.
neighbor_count += self.cur_gen[i][j]

into this:

neighbor_count = sum(self.cur_gen[i][j]
for i in [x - 1, x + 1]
for j in [y - 1, y + 1]
if self.cur_gen[i][j] != -1)

format: plain


text:
# Positive integers less than 1000 without repeated digits

How many integers from 1-999 do not have any repeated digits?

The answer is explained in this link, but why is the last set 9*9*8? Why not 9*9*9?

-

In the link, they claim that $9\cdot 9\cdot 8$ gives the number of integers from $100$ to $999$ with no repeated digits. You have three digits $d_1d_2d_3$ to work with. Begin with the first digit $d_1$: it can be any number in $\{1, \ldots, 9\}$. When choosing the second digit $d_2$ you must avoid repeating $d_1$, but you can now use $0$, so you select from $\{0, \ldots, 9\} - \{d_1\}$. So while the first two factors of $9 \cdot 9 \cdot 8$ are the same, there is an interesting difference between picking $d_1$ and picking $d_2$. Similarly, the the last digit must come from $\{0, \ldots, 9\} - \{d_1, d_2\}$, and this set has size $8$.


text:
# Widths of functions (2.2)

1. Feb 9, 2016

### ognik

(corrections edited in)
1. The problem statement, all variables and given/known data

Assume $\psi(x, 0) = e^{-\lambda |x|} \: for \: -\infty < x < +\infty$. Calculate $\phi(k_x)$ and show that the widths of $\phi, \psi$, reasonably defined, satisfy $\Delta x \Delta k_x \approx 1$

2. Relevant equations
$\phi(k_x) = \frac{1}{\sqrt{2 \pi}} \int \psi(x) e^{-ik_x x} dx$

3. The attempt at a solution
$\phi(k_x) = \frac{1}{\sqrt{2 \pi}} [ \frac{1}{(\lambda - i k_x)} e^{(\lambda - i k_x)x} |^0_{-\infty} - \frac{1}{(\lambda + i k_x)} e^{-(\lambda + i k_x)x} |_0^{\infty} ]$

$= \frac{1}{\sqrt{2 \pi}} [\frac{1}{(\lambda - i k_x)} + \frac{1}{(\lambda + i k_x)} ]$

$= \frac{1}{\sqrt{2 \pi}} \frac{2\lambda}{\lambda^2 + k_x^2}$

What does the width of $\phi, \psi$ mean here? They are $\Delta k_x, \Delta x$?

Last edited: Feb 9, 2016
2. Feb 9, 2016

### blue_leaf77

I believe, the wavefunction in position should be $\psi(x,0) = e^{-\lambda |x|}$.
Check again the last line whether a factor of two should appear or not.
There are several ways to define the width of a function. The two most common ways are using full-width at half maximum (FWHM) and the standard deviation.

3. Feb 9, 2016

### ognik

Sorry, yes.

Again sorry, yes

Reading between the lines they are thinking of FWHM - do I take half of $|\psi \psi^*|$ etc.?

4. Feb 10, 2016

### blue_leaf77

Yes, try that. Actually the difference in the form of the uncertainty relation $\Delta x \Delta k_x$ for different definition of the width is on the constant on the RHS, and they do not differ more than one order of magnitude.

5. Feb 10, 2016

### ognik

Hi - off course that is the magnitude not the maximum, please critique the following:

$\psi(x,0) = e^{-\lambda |x|}$ is even around 0, ie it has a max. at $x = 0, \therefore \psi_{max} = 1, \therefore \frac{1}{2}\psi_{max} = \frac{1}{2}$
Therefore at half max, $x = \pm \frac{1}{\lambda}ln2, \therefore FWHM \Delta x = \frac{2}{\lambda}ln2$ ?

Similarly $\phi(k_x) = \frac{2 \lambda}{\sqrt{2 \pi}} \frac{1}{\lambda^2 + k_x^2}$ is even around 0, therefore max at $k_x = 0, \therefore \phi_{max}= \frac{2}{\sqrt{2 \pi}} \frac{1}{\lambda}, \therefore\frac{1}{2}\phi_{max} = \frac{1}{\lambda \sqrt{2 \pi}} = \frac{2 \lambda}{\sqrt{2 \pi}} \frac{1}{\lambda^2 + k_x^2}, \therefore \Delta k_x = 2\lambda$

Something is not quite right above, 'cos I expect $\Delta x \Delta k_x \approx 1$ but I get $\frac{2 ln 2}{\lambda} 2 \lambda = 4 ln 2$?

(Side point, I assume I could also have found the maxes by setting the 1st differential to 0?)

6. Feb 11, 2016

### blue_leaf77

You should calculate the width of the probability functions $|\psi(x)|^2$ and $|\phi(k_x)|^2$, not the wavefunctions.
Not always, sometimes the probability function has more than one maxima, or worse no first derivative at all like $\psi(x)$ in your case.

7. Feb 11, 2016

### ognik

Thanks for being patient, I have a few gaps to find as my degree was over 20 years back ...
I think there is a derivative for $\psi(x,0), \frac{-x e^{-|x|}}{|x|}$ ? (checked on Wolfram)

Why the width of the probability functions? My text seems to look at the function widths, Ex: " ...it follows that the widths of $\psi$ and $\phi$ are effectively related by $\Delta x \Delta k_x \approx 1$

Worked those out anyway, got $|\psi|^2 = e^{\lambda^2 x^2}, \Delta x = \frac{2}{\lambda} ln \frac{1}{2};... |\phi|^2 = \frac{4 \lambda^2}{(\lambda^2 + k_x^2)^2}, \Delta k_x = 2 \lambda (\sqrt{2} - 1)$ but then $\Delta x \Delta k_x$ gives a negative value (-1.148) ?

I think $\Delta x , \Delta k_x$ should always be positive real?
Thanks
-------------------------------------
I hope I am not breaking any rules below ...
Understanding all this clearly will help me with my other current posts, especially https://www.physicsforums.com/threads/fourier-analysis-of-wave-packet.855706/.
https://www.physicsforums.com/threads/wave-packet-expansion.855999/ is slightly different, would appreciate some help with my last query please?

Much appreciated

8. Feb 11, 2016

### blue_leaf77

It doesn't have a first derivative at $x=0$.
Because the quantity which is directly related to the measurement is the probability density, not the wavefunction. Remember that the uncertainty principle tells you the uncertainties in the measurement outcomes.
That's not correct, remember you are squaring $\psi$, which means
$$|\psi(x)|^2 = e^{-\lambda |x|}\cdot e^{-\lambda |x|} = ?$$
I am assuming $\lambda$ is real.
I am sure you are forgetting some constants.

9. Feb 11, 2016

### ognik

Just exploring this a bit further - it is multivalued at x=0, so there is a maximum (and a minimum) at x=0?
Oops $e^{-\lambda |x|} \cdot e^{-\lambda |x|} = e^{-2\lambda |x|}$ ?
but $\frac{1}{2} |\psi|^2 = \frac{1}{2}$ still, then I get $\Delta x = \frac{ln 0.5}{- \lambda}$ ? Is that right so far?

10. Feb 12, 2016

### blue_leaf77

The wavefunction itself is single valued at the origin, so there can be either only maximum or minimum, to decide which one, one can check the limit of the derivatives when approached from left and from right. For example if it turns out that
$$\lim_{x\rightarrow 0^-} \frac{d}{dx}f(x) > 0 \\ \lim_{x\rightarrow 0^+} \frac{d}{dx}f(x) < 0$$
then $f(x)$ must have a maximum at $x=0$, otherwise it's a minimum.
Yes.
That's right and also note that $\Delta x = \frac{\ln 0.5}{- \lambda} > 0$.

11. Feb 12, 2016

### ognik

Yay! Feeling a bit stoopid at this point....

So $| \phi |^2 = \frac{1}{2 \pi} \frac{4 \lambda^2}{(\lambda^2 + k_x^2)^2},$
$\therefore \frac{1}{2}| \phi |^2_{max} = \frac{1}{\pi \lambda^2} = \frac{1}{2 \pi} \frac{4 \lambda^2}{(\lambda^2 + k_x^2)^2}$

$\therefore (\lambda^2 + k_x^2)^2 = 2 \lambda^4,$
$\therefore k_x = \pm \lambda (\sqrt{2} - 1)^{\frac{1}{2}},$ (at half width)
$\therefore \Delta k_x =2 \lambda (\sqrt{2} - 1)^{\frac{1}{2}}$ ?

$\therefore \Delta x \Delta k_x = \frac{ln .5}{- \lambda} 2\lambda (\sqrt{2} - 1) ^{\frac{1}{2}} = 0.89$?

A bit lower than 1, but > 0.5 so I think it's ok?

12. Feb 12, 2016

### blue_leaf77

You are asked to show that $\Delta x \Delta k_x \approx 1$, therefore as long as your result does not deviate by more than one order of magnitude, that should be fine.