I have a custom style called style1.nb and I want to install it into a notebook Class01.nb so I can send only the notebook file to my students with the style of style1.nb. Is that possible?
Asked
Active
Viewed 144 times
2
-
2Duplicate: http://mathematica.stackexchange.com/q/7779/5 – rm -rf May 15 '14 at 12:40
-
It's not the same, i made a style from empty notebook and now i want to merge the stlye in the notebook soo the stlye.nb it's not needed anymore something like Stylisher["style.nb"] run the function and then the notebook don't need the stlye file – Gonzalo May 19 '14 at 18:18
-
@ Gonzalo There is a way to quench a custom style into a CDF document. Would it be of interest to you? – Alexei Boulbitch May 22 '14 at 08:07
-
@Gonzalo Instead of answering your question inside the question, can you please post an answer? :) – Öskå May 22 '14 at 10:33
1 Answers
1
Here is the code used by the OP to solve its issue:
nb=NotebookOpen[NotebookDirectory[]<>"style1.nb"];
tmp=NotebookGet[nb];
estilos=Cases[tmp,Cell[StyleData[x_,y___],z__],∞];
NotebookClose[nb];
SetOptions[EvaluationNotebook[], StyleDefinitions -> Notebook[estilos]]
style1.nb is my own style with 1 style cell per type of cell

Öskå
- 8,587
- 4
- 30
- 49