Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am not able to show the caption at the bottom of figure. I always get in the middle. I would appreciate your help. Below is the code.

\documentclass[fleqn,12pt,a4paper]{article}
\usepackage{fontspec,xltxtra,xunicode}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{color}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage{cmll}
\usepackage{tabularx}
\usepackage{pifont}
\usepackage{amstext, amsmath}
\usepackage{enumerate}
\setmainfont[Script=Devanagari]{Sanskrit2003}
%
\begin{document}
\begin{figure}[htb]
\begin{center}
{\setlength{\unitlength}{6mm}
\begin{picture}(13,13)(0,0)
\put(-2,-0.5){\framebox(6,3){ What are Pragruhya}}
\put(8,-4){\framebox(7,3.2){
\shortstack{A monosyllabic \\with the exception of }}}
\put(4,1){\vector(1,2){4}}
\put(8,0){\framebox(7,3){
\shortstack{that come\\ after the of }}}
\put(4,1){\vector(1,1){4}}
\put(8,4){\framebox(7,3){
\shortstack{ or \\are called }}}
\put(4,1){\vector(1,-2){4}}
\put(8,-8){\framebox(7,3){
\shortstack{ A ending in \\are called }}}
\put(4,1){\vector(1,-1){4}}
\put(8,8){\framebox(7,4){
\shortstack{ in when \\followed by the \\word in the }}}
\put(4,1){\vector(1,0){4}}
\end{picture}
}
\end{center}
\caption{Some More Sutras}
\end{figure}
\end{document}
share|improve this question
1  
Welcome! A formatting tip: begin each of your TeX lines with four spaces—or highlight it and hit the 101010 button, which does the same thing—to preserve the formatting of your code. –  Antal S-Z Nov 25 '10 at 19:23
1  
Also, while I must commend you for providing a complete source file, I wish you had also made it minimal. As it was, it used all sorts of packages that are irrelevant to the problem at hand, and some of which will not even load in a plain latex. Before asking your next question, please try trimming some more fat from your sample files. –  Harald Hanche-Olsen Nov 25 '10 at 21:01
    
Just a small tip which is especially true when you have collaborators: Whitespace is not your enemy, while having a source file that is a block of continuous text might seem compact(hell you can have the entire document on one line ) it makes it completely unreadable to anyone else. Try to put extra lines to seperate code into logical blocks, especially in the header and in areas with heavy markup (like in figure declarations or tables) –  crasic Nov 26 '10 at 8:25
add comment

1 Answer

You need to tweak the parameters of the picture environment:

\begin{picture}(13,21)(-2,-8)

I may have gotten it slightly wrong. The first pair is the size of the picture, and the second pair is the coordinates of the bottom left corner. By setting the latter to (0,0) and using negative coordinates, you were drawing outside the box reserved for the picture.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.