MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why does mathematica randomly rewrite notebooks?

Josef Karthauser wrote:
> I'm trying to manage mathematica notebooks in a revision control system
> and it is really bugging me that mathematica writes notebooks with
> trivial changes seemingly randomly.  Does anyone know why?
> Here's an example:
> @@ -860,7 +862,7 @@
>      \(Tuu[i, j] Xd[j] // ToFlavor[natbasis]\), "\n",
>      \(\(\(% /.
>        x : Xd[_] \[RuleDelayed] \(TransformIndexFlavor[
> -            natbasis, {\[Lambda]form}]\)[x]\)\(\n\)\(\[IndentingNewLine]\)
> +            natbasis, {\[Lambda]form}]\)[x]\)\(\[IndentingNewLine]\)\(\n\)
>      \) (*\[IndentingNewLine]\(% // SumExpansion[natbasis /@ {i, j}]\) //
>          SumExpansion[\[Lambda]form[k]]\[IndentingNewLine]%%\[IndentingNewLine]*) \), "\
> The line starting with '-' shows what was there, and the line starting
> with '+' shows that change that mathematica made at the last save.
> Notice the at the order of the \n and the IndentingNewLine have been
> reversed.  This appears to happen at random.
> WRI, is there anything I can do to prevent this, or is it a bug/feature?
> Joe
> --
> Josef Karthauser (joe at
> FreeBSD (cvs meister, admin and hacker)
> Physics Particle Theory (student)
I am not sure if this will fix your problem, but there is a global 
option ShowShortBoxForm, which I always set to False. In that state, 
notebooks are written with normal RowBox notation rather than using the 
backslash notation for everything. If you are going to read the 
notebooks with anything other than Mathematica (which you are) this is a 
great help.

I don't suppose notebooks were really designed with revision control in 
mind. I don't know if anyone has explored the idea at all, but I think 
there are a lot of issues here. For example, if you are going to run 
difference comparisons between different versions of a notebook, that is 
going to be really hard to read! Perhaps there is a project for someone 

David Bailey

  • Prev by Date: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Next by Date: Re: Rearranging a data array containing calendrical as well as data entries.
  • Previous by thread: Re: Re: Re: Why does mathematica randomly rewrite notebooks?
  • Next by thread: Re: Re: Why does mathematica randomly rewrite notebooks?