if using SW on windows and want to add a package not included by SW, then first download it from CTAN and put the .sty file here
and from inside SW, follow instructions as given here
or you can simply edit the preamble and add
This is tricky. But just do this and do not follow any other instructions given in other places, they are all very confusing. Here is the deal.
When you write
To make main.tex as master document, create a file called empty.tex in the same folder and type in it exactly the following (using a text editor)
That is all, the one line above. Now go back to main.tex, and open that in a text editor (not in SW) and go to the end of the file just before end of the document, and add these lines, including the comments! this is important.
Now, close everything. Now main.tex is a master document. Now you can write
So, for each latex file that is meant to include input files, we must have an empty.tex file there, and add it at the bottom of the document itself as shown above.
sometimes I have a need to insert Latex code into the .tex file while using SW, but do not want SW to
look at this code. This is code used by htlatex for example. One way to do that is by using encapsulated
tex field. This field can be added either from the SW GUI, or directly in source code. To add it in source,
let assume we want to add
Notice what we did. The code has to be put in 2 places. In the comment and inside the
That is the only reliable way to insert Latex code for use by tex or tex4ht without having SW see it. Otherwise, SW can change it or move it around, or worst, comment it out. Now, the above can be processed OK by htlatex, since the TexField is a comment, but the code is still there in the second block.
When adding a frame in SW, around math equation such as displayed formula, it will add
Thanks for http://tex.stackexchange.com/