2
$\begingroup$

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?

$\endgroup$
  • 2
    $\begingroup$ Duplicate: mathematica.stackexchange.com/q/7779/5 $\endgroup$ – rm -rf May 15 '14 at 12:40
  • $\begingroup$ 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 $\endgroup$ – Gonzalo May 19 '14 at 18:18
  • $\begingroup$ @ Gonzalo There is a way to quench a custom style into a CDF document. Would it be of interest to you? $\endgroup$ – Alexei Boulbitch May 22 '14 at 8:07
  • $\begingroup$ @Gonzalo Instead of answering your question inside the question, can you please post an answer? :) $\endgroup$ – Öskå May 22 '14 at 10:33
1
$\begingroup$

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

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.