Showing posts with label Latex. Show all posts
Showing posts with label Latex. Show all posts

Thursday, January 15, 2015

Latex: Evaluate a partial derivative at a certain condition

Here is an example to do that:

\left. \frac{\partial f}{\partial x}\right|_{x_0, u_0} \Delta x +  \left. \frac{\partial f}{\partial u}\right|_{x_0, u_0} \Delta u

The resulting equation looks like the following.


Tuesday, September 23, 2014

WinEdit pdf viewer

Q: How to change the setting of WinEdt to open all newly generated PDF files in another PDF reader?

A: Go to main menu --> option-->executive mode --> select pdf viewer as the desired software  package.

Friday, February 14, 2014

Hyperref package

The objective is to obtain a pdf with bookmarks for each section and subsection.

Solution: 1) add this line \usepackage{hyperref}
2) above each section and subsection that you want a bookmark, type \maketitle
End results: The bookmark will be automatically generated. In addition, any place you use \ref or \cite in Latex, in the pdf file, a red box will appear.

This trick makes a pdf file have a more professional look.

For more info on hyperref, check this link.

Friday, January 10, 2014

Latex Tip -- How to incoroporate figures and references

Besides basic latex commands, to write a technical papers, the following two tips can save your time.
1) use google scholar or IEEE xplore to download citations in bib format. Note, after that, it is also needed to adjust journal titles. For example, IEEE xplore gives this kind of title: Power Systems, IEEE transactions. However, in IEEE journal format, it should be IEEE trans. Power Sys. What do we do? change title = IEEE_J_PWRS. The assumption is that the IEEE acronym bib file should be there. IEEEarv.bib defines the short names of each journal. For us, we need to remember the following one:
IEEE trans. Power Delivery == IEEE_J_PWRD
IEEE trans. Power Electronics = IEEE_J_PWRE
IEEE trans. Energy Conversion = IEEE_J_EC
IEEE PES magazine = IEEE_M_PES
IEEE trans. Power and Apparatus Systems = IEEE_J_PWRAS

For these three journals, the sequence is 
Power Delivery, no. 1, January
Power Systems, no. 1, February
Energy Conversion, no. 1, March
Power Delivery, no. 2, April
Power Systems, no. 2, May
Energy Conversion, no. 2, June
Power Delivery, no. 3, July
Power Systems, no. 3, August
Energy Conversion, no. 3, September
Power Delivery, no. 4, October
Power Systems, no. 4, November
Energy Conversion, no. 4, December

Also note that both google scholar or IEEE xplore do not give month information. This information has to be typed in. Again, remembering the predefined months will save time.
For example ( month = jan)  -- note there are no embraces or quotes.
feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec.
 
2) generate eps figures or pdf figures to be incorporated into latex main file. If you use eps file, compile the latex by Latex, dvi2ps, ps2pdf to get a pdf file. On the other hand, if you use pdf files for figures, just do pdflatex to get a pdf file. For eps file, we can also add a line to use package \package{epstopdf}. This way, pdflatex will work even there are eps figures.

Matlab figures can be directly saved as eps files. Just click "file" in the menu and "save as" --- eps file. Or they can be saved as pdf files. Eps files can be directly used in Latex. Pdf files, you need Adobe professional to open up the pdf file and do cropping to remove the white margins.

3) Full author name shown in reference
We'd like to have this reference such as IEEE SSR Working Group, “Second benchmark model for computer simulation of subsynchronous resonance,” vol. 104, no. 5, pp. 1057–1066, 1985.

In bib file, if we type author={IEEE SSR Working Group}, we get I. S. W. Group as the author. Instead, put an additional embraces will get us the full author name.
author = {{IEEE SSR Working Group}}

Similarly, when we want to have capitalized letters in title, putting additional embraces will tell Latex to comply the format.

Monday, August 26, 2013

Bao TaiLei's Latex book

This book was written by a friend Dr. Bao. The first version was published two years ago and this is the updated version. With many latex books around, is this book necessary? The answer is yes. This book is super cool. This is an advanced Latex book and however it starts from basic and guides the readers to the most advanced tips. In addition, the style of the book is unique. It is half comments and half technical notes. If you missed the anecdotes, you miss many of the great materials.

Technical wise, the feature of the book is several fold: the presentation of digital printing technology and history, the description of software packages that can make paper/dissertation writing easier (such as how to convert a pdf to an eps file), the collection of tricks that otherwise take long time to master.

The book has 12 chapters with two Appendices. With Chapter 1 as introduction of history and Chapter 2 as introduction of Latex as a whole from a "hello world" example, Chapter 3 s on fonts. This is a surprise arrangement and it showcases the author as an aesthete more than a software engineer. PS, Latex lovers are more or less aesthetes, aren't they? Mathematic expressions are described in Chapter 4 and Chapter 5 is on figures. The next three chapters are not usually seen in Latex books and they are: Metapost, PSTricks and PGF. Honestly speaking, I have not read these three chapters. Tables are mentioned in Chapter 9 and it is super useful. After reading Chapter 9, one knows how to rotate a table, how to make a long table, a wide table, etc. Chapter 10 is on structure. Chapter 11 is on printing. It gives a graphic explanation on page margins. Finally chapter 12 is on other applications such as Beamer for slides show, CV template, and letter template. The Appendices are of much use as well: Appendix A is about packages. Appendix B is on brief history of printing.

Nontechnical wise, the book is super funny with its anecdotes. The writing is in Chinese and many historical poems were re-shaped in preface. In Chapter 1, when history of digital printing was described, names and stories of computer scientists who devoted their energy in making Latex, Adobe and etc were told. The author was obsessed with each person's background, school and degree. In footnotes, you will see sth like this 1: Ph.D. from Cambridge or PhD from MIT, etc.

The only disadvantage of this book is it is in Chinese and thus, the language limits its readers. On the other hand, with English as second language, can a book in English be that funny?