## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Psbrace isn't working

Information and discussion about graphics, figures & tables in LaTeX documents.
Handerb
Posts: 2
Joined: Fri Mar 28, 2014 3:04 pm

### Psbrace isn't working

Hi together,

I am desperately trying to get a small brace into a pspicture, bu it just doesn't work. I have already installed the pstricks-add package, but as soon as I want to add \psbrace, nothing works anymore. Here is what I have:

\documentclass[12pt,a4paper]{article}\usepackage{amsmath}\usepackage{amsthm}\usepackage{amsfonts}\usepackage{tikz}\usepackage{pst-plot}\usepackage{pstricks-add}\usepackage{graphicx}\usepackage{caption} \begin{figure}         \centering         \begin{subfigure}{0.5\textwidth}               \begin{pspicture}*(-1.5,-1.5)(8,8)         \psaxes[labels=none,ticks=none]{->}(0,0)(0,0)(5.5,5.5)			\psplot[linecolor=black,plotstyle=line]       {0}{2.8}{x 1.9 add}			\psplot[linecolor=black,plotstyle=line]       {0}{4}{x} 			\psplot[linecolor=black,plotstyle=line]       {0}{5}{x 2 exp -0.25 mul 1.5 x mul add 1.65 add}      \rput(0,5.8){$Q(r_0)$}     \rput(5.8,0){$r_0$}		\rput(1,-0.5){$\widehat{r}$}		\rput(1,0){$|$}		\rput(1.75,-0.5){$\underline{r}$}		\rput(1.75,0){$|$}						\rput(3,-0.5){$r^T$}						\rput(3,0){$|$}								\psline[linestyle=dashed](1.75,-0.25)(1.75,5)								\psline[linestyle=solid](1,-0.25)(1,5)								\psbrace(3,3)(3,3.9)   \end{pspicture}	\caption{Text.}         \end{subfigure}%         ~          \begin{subfigure}{0.5\textwidth}               ...         \end{subfigure}         \caption{}\label{figure2}\end{figure}
Last edited by Stefan Kottwitz on Tue Apr 22, 2014 2:57 pm, edited 1 time in total.
Reason: code marked

Johannes_B
Site Moderator
Posts: 4186
Joined: Thu Nov 01, 2012 4:08 pm
According to the documentation, psbrace is defined with a text label.

\documentclass[12pt,a4paper]{article}\usepackage{pstricks-add} \begin{document}\centering\begin{pspicture}*(-1.5,-1.5)(8,8)	\psbrace(3,3)(3,3.9){TEXT}\end{pspicture}\end{document}

The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am
Handerb wrote:I am desperately trying to get a small brace into a pspicture, bu it just doesn't work. I have already installed the pstricks-add package, but as soon as I want to add \psbrace, nothing works anymore. Here is what I have:

You can simplify a lot of the code:

\documentclass[12pt,a4paper]{article}\usepackage{amsmath}\usepackage{amsthm}\usepackage{amsfonts}\usepackage{pstricks-add}\begin{document}    \begin{pspicture}*(-1.5,-1.5)(8,8)   \psaxes[labels=none,ticks=none]{->}(0,0)(0,0)(5.5,5.5)[$r_0$,0][$Q(r_0)$,90]   \psplot[algebraic]{0}{2.8}{x+1.9}   \psplot{0}{4}{x}   \psplot[algebraic]{0}{5}{-0.25*x^2+1.5*x+1.65}   \psxTick(1){\mathstrut\widehat{r}}   \psxTick(1.75){\mathstrut\underline{r}}   \psxTick(3){\mathstrut r^T}   \psline[linestyle=dashed](1.75,0)(1.75,5)   \psline(1,0)(1,5)   \psbrace(3,3)(3,3.9){}%% it has a text argument  \end{pspicture} \end{document}