Showing posts with label LaTeX. Show all posts
Showing posts with label LaTeX. Show all posts

Thursday, October 13, 2011

Landscape table or image in LaTeX

A thumb rule for landscape table or image in LaTeX:
  1. If you are using latex+dvips+ps2pdf, use the sidewaystable or sidewaysfigure or just sideway environment in rotating package.
  2. If you are on pdflatex, use the landscape environment in pdflscape package instead. sideway prodices a sideway table/figure, but has problem to produce a right landscape view of the page in the pdf file.
For the second option, you might also need the afterpage package to have a properly floating page for the landscape table/figure without a half-blank page before it. The environment is like
\afterpage{
\clearpage
\thispagestyle{plain}
\begin{landscape}
\begin{table}[htp]
% your table here
\end{table}
\end{landscape}
\clearpage
}

Monday, July 7, 2008

Solution for latex2html not generating images

Recently I updated GhostScript and NetPbm on my Windows box, and found the latex2html started to report errors when generating images. The error messages said "bad file descriptor" when executed pstoimg.bat. Google gave several pages that contains exactly the same symptom of this problem but no solutions. Some suggested to use the debug mode of latex2html to see more detailed tracks. It really helps! I found the NetPbm executable file was trying to locate a file named rgb.txt, and it tried several places that are the directories on Linux systems, but failed. It also suggested a RGBDEF environment variable. The file is in the misc directory of the NetPbm I installed. After I set the environment variable, the problem is fixed.

It seems that all applications better have a DEBUG mode.

Sunday, May 18, 2008

Two font problems causing EPS cannot appear in LaTeX document

I am working on Windows XP, using Visio for drawing. My procedure to produce an EPS graphics is printing Visio page to PS -> PS to EPS using GSView. There are many other ways to get EPS out of Visio drawing. MetafileToEPSConverter is a good tool highly recommended, and remember to adjust its printing quality to higher than 600 dpi to get nice figures in PS file.

If you have adjusted your system DPI setup recently for your new big LCD, then you may find your old EPS files cannot be displayed correctly any more in a new PS file. The symptom is that the graphics just flashes and disappears, and leaves a blank space. The solution is just to change the DPI setup to the old value.

The other problem I encountered was that the font in EPS files looked weird and some characters were even missing. When embedded them in LaTeX documents, the graphics was simply not there. Later I figured out that that might caused by the Ghostscript, it was solved when I updated both GSview and Ghostscript to the latest versions.