Skip to main content
better format
Source Link
AsukaMinato
  • 10.6k
  • 1
  • 20
  • 48

I want to protect generated inline cell (which contains TeX source) from attempts to edit, since any attempt to regenerate box structure will fail. In particular, suppose in a text cell one creates inline cell (with ctrl+9ctrl+9) in which, in turn, one tries to put some TeX formula (press ctrlctrl + dollar sign). For example, try simple input a\w b . Since at the moment there are no command \w after you exit the input box you will see just a b. Now if your edit ".../Mathematica/13.x.x/SystemFiles/IncludeFiles/TEXImport/latex.tnb".../Mathematica/13.x.x/SystemFiles/IncludeFiles/TEXImport/latex.tnb file (make a reserve copy!) and append in the end of it the line (I inserted it between lines \input datetime.tnc and \makeatother\makeatother of that file)

\def\w{\wedge}

\def\w{\wedge} 

and then once more enter and exit the inline cell, the content will be automatically reprocessed an nice a [Wedge] b structure will appear. Since I plan to share that notebook a user can accidentally enter the inline cell. After it exits the inline cell the output will be broken. How to protect from such an accident?

I want to protect generated inline cell (which contains TeX source) from attempts to edit, since any attempt to regenerate box structure will fail. In particular, suppose in a text cell one creates inline cell (with ctrl+9) in which, in turn, one tries to put some TeX formula (press ctrl + dollar sign). For example, try simple input a\w b . Since at the moment there are no command \w after you exit the input box you will see just a b. Now if your edit ".../Mathematica/13.x.x/SystemFiles/IncludeFiles/TEXImport/latex.tnb" file (make a reserve copy!) and append in the end of it the line (I inserted it between lines \input datetime.tnc and \makeatother of that file)

\def\w{\wedge}

and then once more enter and exit the inline cell, the content will be automatically reprocessed an nice a [Wedge] b structure will appear. Since I plan to share that notebook a user can accidentally enter the inline cell. After it exits the inline cell the output will be broken. How to protect from such an accident?

I want to protect generated inline cell (which contains TeX source) from attempts to edit, since any attempt to regenerate box structure will fail. In particular, suppose in a text cell one creates inline cell (with ctrl+9) in which, in turn, one tries to put some TeX formula (press ctrl + dollar sign). For example, try simple input a\w b . Since at the moment there are no command \w after you exit the input box you will see just a b. Now if your edit .../Mathematica/13.x.x/SystemFiles/IncludeFiles/TEXImport/latex.tnb file (make a reserve copy!) and append in the end of it the line (I inserted it between lines \input datetime.tnc and \makeatother of that file)

\def\w{\wedge} 

and then once more enter and exit the inline cell, the content will be automatically reprocessed an nice a [Wedge] b structure will appear. Since I plan to share that notebook a user can accidentally enter the inline cell. After it exits the inline cell the output will be broken. How to protect from such an accident?

edited title
Link
flinty
  • 26.3k
  • 2
  • 23
  • 98

How to protect generated inline cells from edditingediting?

edited title
Link
user64494
  • 1
  • 4
  • 29
  • 60

How to protect generated inline cells from edditing?

Source Link
Acus
  • 3.9k
  • 17
  • 22
Loading