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 have a file

\documentclass[10pt]{article}
\usepackage{pstricks-add}
\usepackage{esvect}
\pagestyle{empty}
\begin{document}
\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-1,-1)(10,4)
\psline{->}(1,1)(0,0)
\psline{->}(1,1)(3,1)
\psline{->}(1,1)(0,3)
\psline{->}(7,1)(5,0)
\psline{->}(7,1)(9,0)
\psline{->}(7,1)(7,3)
\rput[tl](0.61,0.59){$\vv{a}$}
\rput[tl](1.72,1.5){$\vv{b}$}
\rput[tl](0.68,2.38){$\vv{c}$}
\rput[tl](8.14,0.78){$\vv{a}$}
\rput[tl](5.47,0.82){$\vv{b}$}
\rput[tl](6.4,1.97){$\vv{c}$}
\end{pspicture*}
\end{document}

I want to write some texts like the picture. How to get them? enter image description here

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

I assume you would place it the same way that you placed the labels, just need to choose where it is to go. I used:

\rput[tl](0.0,-1.0){Some Text}
\rput[tl](6.0,-1.0){Some More Text}

enter image description here

Code:

\documentclass[10pt]{article}
\usepackage{pstricks-add}
\usepackage{esvect}
\pagestyle{empty}
\begin{document}
\psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}
\begin{pspicture*}(-1,-2)(10,4)
\psline{->}(1,1)(0,0)
\psline{->}(1,1)(3,1)
\psline{->}(1,1)(0,3)
\psline{->}(7,1)(5,0)
\psline{->}(7,1)(9,0)
\psline{->}(7,1)(7,3)
\rput[tl](0.0,-1.0){Some Text}
\rput[tl](6.0,-1.0){Some More Text}
\rput[tl](0.61,0.59){$\vv{a}$}
\rput[tl](1.72,1.5){$\vv{b}$}
\rput[tl](0.68,2.38){$\vv{c}$}
\rput[tl](8.14,0.78){$\vv{a}$}
\rput[tl](5.47,0.82){$\vv{b}$}
\rput[tl](6.4,1.97){$\vv{c}$}
\end{pspicture*}
\end{document}
share|improve this answer
add comment

enter image description here

\documentclass[pstricks,10pt]{standalone}
\usepackage{esvect}
\psset
{
    arrowsize=3pt 2,
    arrowinset=0.25,
    arrows=->,
}
\begin{document}
\begin{pspicture}[showgrid](-1,-1)(10,4)
\psline(1,1)(0,0)
\psline(1,1)(3,1)
\psline(1,1)(0,3)
\psline(7,1)(5,0)
\psline(7,1)(9,0)
\psline(7,1)(7,3)
\rput[tl](0.61,0.59){$\vv{a}$}
\rput[tl](1.72,1.5){$\vv{b}$}
\rput[tl](0.68,2.38){$\vv{c}$}
\rput[tl](8.14,0.78){$\vv{a}$}
\rput[tl](5.47,0.82){$\vv{b}$}
\rput[tl](6.4,1.97){$\vv{c}$}
\uput[-90](1,-0.25){Some Text}
\uput[-90](7,-0.25){Some More Text}
\end{pspicture}
\end{document}

Explanations:

  • Use standalone document class to get a tight PDF output.
  • Remove unnecessary packages.
  • Remove unnecessary settings.
  • Don't use starred pspicture if you have no objects beyond the specified canvas region.
  • Repetitive {->} for multiple consecutive \psline can be removed and defined as a common settings before \psline.
  • Use either \rput or \uput to put a label.

Edit:

It will be more convenient if you use \pcline followed by \n*put as follows,

enter image description here

\documentclass[pstricks,10pt]{standalone}
\usepackage{pst-node}
\usepackage{esvect}
\psset
{
    arrowsize=3pt 2,
    arrowinset=0.25,
    arrows=->,
}
\begin{document}
\begin{pspicture}[showgrid](-1,-1)(10,4)
\pcline(1,1)(0,0)\naput{$\vv{a}$}
\pcline(1,1)(3,1)\naput{$\vv{b}$}
\pcline(1,1)(0,3)\nbput{$\vv{c}$}
\pcline(7,1)(9,0)\naput{$\vv{a}$}
\pcline(7,1)(5,0)\nbput{$\vv{b}$}
\pcline(7,1)(7,3)\naput{$\vv{c}$}
\uput[-90](1,-0.25){Some Text}
\uput[-90](7,-0.25){Some More Text}
\end{pspicture}
\end{document}
share|improve this answer
    
How can I get the file 'standalone.sty'? I have standalone.dtx. –  minthao_2011 Nov 9 '12 at 10:41
    
@minthao_2011: Why do you need standalone.sty? My code above used standalone.cls that should be installed when you install TeX Live or MikTeX. –  I am who I say I am Nov 9 '12 at 10:51
    
My computer can not run your code. I do not understand why. This is the *.log fiel, I uploaded here mediafire.com/?gqluwrr7ce0ad4p Please help me. Thank you very much. –  minthao_2011 Nov 9 '12 at 14:37
    
@minthao_2011: Please install the latest MikTeX. Your current PSTricks package did not recognize arrowsize option, you can try to remove the arrowsize. –  I am who I say I am Nov 9 '12 at 14:43
    
Thank you for your help. I wil install the latest MikTeX. –  minthao_2011 Nov 9 '12 at 14:45
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.