Creating and editing new stylesheets

I'm trying to create a stylesheet, but the process has become painful. I'm sure that this has to do something w ith resetting something in Mathematica everytime I make changes to the stylesheet. To explain my problem better I w ill describe the steps I take to create a very simple stylesheet w ith only one style defined. In a new notebook enter the follow ing:
CreateDocument[{ Cell[StyleData[StyleDefinitions -> "Core.nb"]], Cell[StyleData["Title"], ConversionRules -> { "TeX" -> {"\title{", # &, "}"}, "HTML" -> {"<h1 class=###BOT_TEXT###quot;Title###BOT_TEXT###quot;\n>", # &, "\n</h1>"} }, FontSize -> 26, FontWeight -> "Bold", FontColor -> RGBColor[0, 0, 0] ] }, StyleDefinitions -> "StylesheetFormatting.nb", Editable -> True, Saveable -> True ]

The new notebook that appears w ill contain tw o cells. It w ill have the style as all the stylesheets that you have seen and you w ill be able to edit and save it. Save this notebook in $UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets/ . I name this notebook Style01.nb . Once you have this enter this command:
MathLink`CallFrontEnd[FrontEnd`ResetMenusPacket[{Automatic, Automatic}]]

I found that command here, this command resets the menu so that Mathematica can list your stylesheet in the menu. At this point w e are ready to use the stylesheet. Open a new notebook and create a Title cell. Save this notebook as TestNb.nb in a directory of your choice. Go to Format > Stylesheet > Style01 .

Test 1:
The current view should be this:

Now w e select the Title cell in Style01.nb and w e show the expression by going to Cell > Show Expression . The next screenshot show s the view w ith the modifications:

The angle bracket should have been on the top.nb in the same directory as TestNb. Now w e see that the changes took effect. No problem there. In any case.nb . I made a mistake (purposely made w hen I created the style sheet). "FullDocument" -> False] This is w hat I obtained after evaluating those commands: The conversion rules took effect. let us correct this mistake: . ExportString[nb. But. Put the follow ing in it: nb = NotebookOpen[NotebookDirectory[] <> "TestNb. Lets create a new notebook called ExportNb. "HTML".Now w e change back the title cell to how it w as originally by doing Cell > Show Expression again. In a mac w e can press command + shift + E . Test 2: Now lets see if our conversions rules w ork.nb"]. We can repeat this procedure to keep adjusting the Title cell.

Seems usef ul. I have found that if I quit the Kernel by going to Evaluation > Quit Kernel > local and then I run the commands again then it w orks: Conclusion and Questions: It seems that if w e w ant to the w ay your notebook looks like you can create styles and you w ill see how the changes take effect after you modify your stylesheet as I described in Test1. the changes in the ConversionRules do not take effect. – jmlopez May 28 '12 at 16:43 . is there a command to restart it? I'm getting tired of having turning it off and on all the time manually. Unfortunately. w e try to see if the new conversion rules w ill w ork. I guess at this point the best is to just ev aluate the quit command and then ev aluate the code I showed.860 5 22 Hav e y ou tried ClearSystemCache[] ? If it does not help y ou could try to f ind af f ected sy mbols by monitoring the ByteCount (or ev en OwnValues and DownValues ) f or the all non-protected sy mbols in all contexts using something like the code I prov ided here. I'm sure you w ill keep making many mistakes w hen you change the ConversionRules but you w ill not be able to see the change of this unless you restart the kernel. But. then you better bew are of the ConversionRules . – Alexey Popkov May 28 '12 at 5:27 @Alexey Popkov. front-end kernel conversion asked May 26 '12 at 21:38 jmlopez 1.nb . and save Style01. Questions: Is there any w ay for Mathematica to know that there has been changes in the conversion rules? Is there something that w e need to restart other than the Kernel to see that this changes have been made? If restarting the kernel is the only w ay. I tried ClearSystemCache[] but that does not work.After w e revert back. I'll look more into y our f unction later. if you are to export your notebook as an HTML file or Tex.

but now it takes a f ew millisecs to restart the whole thing and hav e a clean slate. Quitting and restarting used to be a slow and painf ul process with the f irst v ersions of MMA. it seemed like y ou were not aware of the Quit command. f rom y our question. you simply type Quit and the kernel stops. Any way. In my opinion this is wrong.840 4 24 I f igured that much but it just seems like a little too much to restart ev ery thing when there's probably something else that takes care of the sty le def initions. – magma Oct 17 '12 at 22:41 @magma as f ar as I know Quit[] closes the master kernel and so also all slav e kernels. while CloseKernels closes all open kernels. partly because PCs were comparativ ely slow back then. – RMMA Oct 19 '12 at 12:27 . But I just wondered if there is a dif f erence between Quit[] and CloseKernels[]. +1 f or answering.1 Answer Instead of going to Evaluation > Quit Kernel > local. Other ideas? I also f ind strange that Quit and CloseKernels are not related in the documentation. but my imression is that Quit only closes one kernel. so why bother? – magma May 28 '12 at 8:46 @magma may be here is not the right place to post a question. – RMMA Oct 17 '12 at 12:02 @Frink good question! I am not sure since I nev er really experimented with parallel computations. – jmlopez May 27 '12 at 14:58 I answered this way because. That's it! answered May 27 '12 at 13:42 magma 1. then run the commands again in the new session.