Hla Hla Htay’s Notes


LaTex : TrueType font installation
August 21, 2008, 12:54 pm
Filed under: Latex, University, Writing | Tags: , ,

I want to write Myanmar fonts in LaTex. Since May, I kept on trying to install in Vista. If you follow the exactly what is written in http://www.radamir.com/tex/ttf-tex.htm, you can easily install in Window XP. In Vista, the font can show in PS only, not in PDF. I feel relax after it shows in PS :P I have to solve it.

No need to solve it. :) Fortunately, it works well in this way. First, covert LaTex to ps , and go to that folder and in command line, type ps2pdf input.ps output.pdf

The example declaration in Tex header.


\newcommand\wininnwa{\usefont{T1}{tnr}{m}{it}}
\DeclareTextFontCommand{\textwin}{\wininnwa}

Whenever you need in the text , call in this way \textwin{vSvSaX;}

I wrote how to do for Myanmar fonts in http://www.mmgeeks.org/forum/viewtopic.php?f=19&t=56&p=337&hilit=miktex&sid=cc78a2e0949138e07ac51da8b57d55cb#p337



Latex : Table across two columns
August 13, 2008, 11:37 am
Filed under: Latex, Writing | Tags: , , ,

Normally, papers has to be prepared in two column mode. The following code will allow you the table across two columns.

\begin{center}
\begin{table*}[ht]
{\small
\hfill{}
\begin{tabular}{|l|l|c|c|c|c|c|c|c|}
\hline
\textbf{Hello}&\textbf{Hello}& \multicolumn{7}{|c|}{\textbf{Hello}}\\
\cline{3-9}
\hline
AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA\\
BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB\\
AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA&AAAAA\\
BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB&BBBBB\\
\hline
\end{tabular}}
\hfill{}
\caption{Table Name}
\label{tb:tablename}
\end{table*}
\end{center}

I copy their comments for those who has the same problem. @Thanks you, Chus”.@ :)

Liz said that “This code produces a line spacing of 3 lines in my document. Is it possible to avoid that?”
Chus solved this problem by introducing the center environment inside the table environment.



LaTex : changing font size for the whole table entries
August 6, 2008, 6:02 am
Filed under: Latex, Writing | Tags: ,

font size command such as \Large , \large, \tiny etc just before tabular.
{\Large \begin{tabular}{|c|l|l|} …. \end{tabular} }

The original example can be found in the following URL http://www.cqf.info/forum/viewtopic.php?t=3850

\usepackage{subfigure} are required to place side by side . \subfigure{} and \subtable{} commands are used.


\begin{figure}
\centering
\subtable{
\centering
\renewcommand{\arraystretch}{1.2}
{\Large
\begin{tabular}{|c|l|l|}
%\toprule
\hline
Region & nMOS & pMOS\\
%\midrule
\hline
A & cutoff & linear\\
B & saturation & linear\\
C & saturation & saturation\\
D & linear & saturation\\
E & linear & cutoff\\
\hline
%\bottomrule
\end{tabular}}}
\subtable{
\centering
\renewcommand{\arraystretch}{1.2}
{\tiny\tt
\begin{tabular}{|c|l|l|}
\hline
Region & nMOS & pMOS\\
\hline
A & cutoff & linear\\
B & saturation & linear\\
C & saturation & saturation\\
D & linear & saturation\\
E & linear & cutoff\\
\hline
\end{tabular}} }
\end{figure}



LaTex : Pstricks, flowchart example by HHH
July 26, 2008, 5:22 am
Filed under: Latex, Writing | Tags: , ,



\documentclass{article}
\usepackage{pstricks}
\usepackage{pst-node}
\usepackage{pst-blur}
\definecolor{Pink}{rgb}{1.,0.75,0.8}
\pagestyle{empty}
\begin{document}
\vspace{0.5cm}
\small
\begin{psmatrix}[rowsep=0.6,colsep=0.5]
\psovalbox[fillstyle=solid,fillcolor=yellow,shadow=true]{Begin} \\
\psdblframebox[framearc=.4,fillstyle=solid,fillcolor=pink]{row2col1}\\
\psframebox[shadow=true]{row3col1}&\psframebox[shadow=true]{row3col2} \\
\psdiabox[shadow=true]{row4col1}&\psframebox[shadow=true]{row4col2} \\
\psframebox[shadow=true]{row5col1}&\psframebox[shadow=true]{row5col2}\\
\psframebox[shadow=true]{row6col1}&\psframebox[shadow=true]{\bf row6col2}&row6col3 \\
\psdblframebox[framearc=.4,fillstyle=solid,fillcolor=pink]{row7col1}&\psframebox[shadow=true]{\bf row7col2}&row7col3\\

%top frame
\psframe[linestyle=dashed](-1,5.3)(2.35,2)
\rput{0}(-1.3,4.5){\rotateleft{TopFrame}}
\psframebox[shadow=true]{row8col1}&\psframebox[shadow=true]{\bf row8col2}&row6col3\\
\psframebox[shadow=true]{\begin{tabular}{c}row9col1-line1\\row9col1-line2\end{tabular}}&\psframebox[shadow=true]{\bf row9col2}&row9col3\\
\psframebox[shadow=true]{row10col1}&\psframebox[shadow=true]{row10col2}\\
row11col1\\
\psovalbox[fillstyle=solid,fillcolor=yellow,shadow=true]{end} \\

\ncline{->}{1,1}{2,1}
\ncline{->}{2,1}{3,1}

\ncline{->}{3,1}{4,1}}{3,1}{3,2}
\ncline{}{4,2}{5,2}
\ncline{->}{4,1}{4,2}
\ncline{}{4,1}{5,1}
\ncline{->}{5,1}{6,1}
\ncline{->}{5,1}{6,2}

\ncline{->}{6,1}{7,1}
\ncline{->}{6,1}{6,2}
\ncline{->}{7,1}{8,1}
\ncline{->}{8,1}{9,1}
\ncline{->}{9,1}{10,1}
\ncline{->}{10,1}{11,1}
\ncline{->}{11,1}{12,1}

\ncline{->}{12,1}{12,2}

\ncline{->}{7,2}{8,2}
\ncline{->}{8,2}{9,2}
\ncline{->}{9,2}{10,2}

\psline[linecolor=blue]{->}(5.2,7)(6.5,7)(6.5,8.3)(5.2,8.3)
\psline[linecolor=blue]{->}(6.5,8.3)(6.5,5.8)(5.2, 5.8 )
\psline[linecolor=blue]{->}(6.5,5.8)(6.5,4.4)(5.2,4.4)

\end{psmatrix}
\end{document}



Latex: Drawing, Pstricks and LaTexDraw
July 24, 2008, 2:57 pm
Filed under: Drawing, Latex, Writing | Tags: ,

If we use jpg and eps, the image quality is reduced. It is better that we use the latex code. Image quality will be the best. Here is PStricks example for *.tex. LaTeXDraw is a free PSTricks code generator or PSTricks editor for LateX distributed under the GNU GPL. LaTeXDraw is developed in java, so it’s independent of the OS. It’s available in English, in Spanish and in French.

http://tug.org/PSTricks/main.cgi?file=examples

http://latexdraw.sourceforge.net/>http://latexdraw.sourceforge.net/

Flowchart

http://tug.org/PSTricks/main.cgi?file=psmatrix/psmatrix#flowchart

Tree

http://tug.org/PSTricks/main.cgi?file=pst-tree/pst-tree#dir

Pie chart

http://tug.org/PSTricks/main.cgi?file=Examples/Charts/chart#pie0