Tag Info

Hot answers tagged

7

Define a circle with 3+4+5=12 degrees: \documentclass[pstricks]{standalone} \usepackage{pstricks} \begin{document} \begin{pspicture}(-3,-3)(3,3) \degrees[12] \pspolygon[showpoints](2;1)(2;4)(2;8) \pscircle[showpoints](0,0){2} \uput[1](2;1){A}\uput[4](2;4){B}\uput[8](2;8){C} \rput(1.7;2.5){3}\rput(1.5;6){4}\rput(1.25;11){5} \end{pspicture} \end{document}


6

As an alternative, here's some nice code for you in Metapost: prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); for i=0 upto 11: z[i] = 60 right rotated 30i; endfor draw for i=0 upto 11: z[i] .. endfor cycle withcolor .67 red; draw z0--z3--z7--cycle; label.rt (btex $A$ etex, z0); label.top(btex $B$ etex, z3); label.lft(btex $C$ etex, z7); ...


6

Here is another variant (via TikZ) with a random starting angle (each compilation gives a different result): \documentclass[tikz,margin=2mm]{standalone} \usetikzlibrary{calc,positioning} \pgfmathsetseed{\pdfuniformdeviate 10000000} \begin{document} \begin{tikzpicture} % constants \pgfmathsetmacro\unit{360/(3+4+5)} \pgfmathsetmacro\radius{2cm} ...


6

What you are looking for is the tkz-euclide package. Look at the following example: \documentclass[10pt]{standalone} \usepackage{tkz-euclide} \usetikzlibrary{angles,positioning,quotes,decorations.markings} \begin{document} \begin{tikzpicture} \path (135:3) coordinate (A) (45:4) coordinate (B) (0:0) coordinate (C); \draw (A) -- (B) node [at start, ...


6

You can decorate the circle with the markings that accept distances on the path. Then you can rotate or label so on as you wish. \documentclass[tikz]{standalone} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture} \pgfmathsetmacro\myradi{12/2/pi} \draw[decoration={markings, mark=at position 3cm with \coordinate (c3);, mark=at ...


5

The only obstacle is TeX. Postscript is used to do the heavy lifting and the linear algebra but we don't have the luxury to rely on some big brother using PGF. Your best bet is to find a library that understands both the Z-buffer and solid reflections in another language and call it within. pgfplots don't know that yet using only TeX. Even if this was ...


5

As answered by @percusse, TeX is the obstacle here. I avoided TeX by creating a (rough) SAGE/python script that will take a SAGE 3d picture, already triangulated, and translate it to tikz 2d polygons, with some sort of light/shade computations. You do need SAGE to create the tikz file though. It is available in github, in case you want to experiment with ...


5

Here is a code in psTricks: \documentclass[pdf, x11names, dvipsnames]{article}% \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc } \usepackage{fourier} \usepackage{nccmath} \usepackage{pstricks-add}% \newpsobject{bluedot}{psdot}{linecolor=RoyalBlue3, dotsize=4pt} \begin{document} \psset{llx=-5mm,lly=-5mm,urx=5mm,ury=5mm, arrowinset=0, % psgrid, ...


4

In psvectorian.tex it should most probably read couleur instead of couleurTexte. Looking into bclogo.sty, there is no couleurTexte key, so this most probably a typo in psvectorian.tex. The compilation must be done with latex, not with pdflatex, since pstricks is PostScript-oriented, not designed for pdf mode. The code from psvectorian.tex is taken from the ...


4

\documentclass[tikz, border=2mm]{standalone} \begin{document} \begin{tikzpicture} \begin{scope}[shift={(-2,0,0)}] \draw[->] (0,0,0)--(1,0,0) node[right]{$x$}; \draw[->] (0,0,0)--(0,1,0) node[above]{$z$}; \draw[->] (0,0,0)--(0,0,1) node[below left]{$y$}; \end{scope} \foreach \i in {1,...,5}{ \draw[fill=yellow!80!black] (0,\i,0) -- ...


4

And here's a solution in Asymptote. unitsize(1cm); real L1 = 3.0; real L2 = 4.0; real L3 = 5.0; real diameter = (L1 + L2 + L3) / pi; path circle = scale(diameter/2)*unitcircle; pair A = arcpoint(circle,0.0); pair B = arcpoint(circle,L1); pair C = arcpoint(circle,L1 + L2); draw(circle, blue); draw(A--B--C--cycle, red); dot(Label("$A$"), A, dir(A)); ...


4

This time with the mfpic package. At the basis, the same idea as proposed by Herbert and Thruston. Not the same implementation of course. \documentclass{scrartcl} \usepackage[metapost, mplabels, truebbox]{mfpic} \mfpverbtex{%&latex \documentclass{scrartcl} \begin{document}} \setlength{\mfpicunit}{1cm} \opengraphsfile{\jobname} \begin{document} ...


3

I know that you want pstricks answer. Hence this answer using tikz is just for academic purposes (please don't upvote). \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.symbols} \tikzset{report/.style={tape, draw, tape bend top=none} } \begin{document} \begin{tikzpicture} \node[report] {Print text}; \end{tikzpicture} \end{document} ...


3

A solution with pst-node. With its \psDefBoxNodes command, which defines 12 nodes for any bounding box of an object, I define a \mypsframe command: \documentclass[pdf, x11names]{article}% \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc } \usepackage{fourier} \usepackage{erewhon} \usepackage{pst-node}% \newcommand\mypsframe[1]{% ...


2

Set the correct area of the picture as (-3,-3)(21,3). Also, consider placing the nodes (A',B',...) in a good location to be easily read. \documentclass{standalone} \usepackage{pst-optic} \begin{document} \begin{pspicture}(-3,-3)(21,3) \rput(5,0) ...


1

\lens uses internally a pspicture* environment which clips the outside of the predefinied area. Use option xLeft for the first lens to modify the border: \documentclass[pstricks]{standalone} \usepackage{pst-optic} \begin{document} \begin{pspicture}(-5,-3)(21,3) \rput(5,0)% {\lens[lensType=CVG,lensHeight=5,lensWidth=0.5,lensGlass, ...


1

use \psaxes[labelFontSize=\scriptstyle,Dx=5,]{->}(130,0)(122,-2)(182,11.) the first pair of coordinates defines the intersection of the axes.


1

Maybe you are interested in a pgfplots solution which is quite short: % arara: pdflatex \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} \begin{figure} \centering \begin{tikzpicture} \begin{axis}[ymin=0, xmin=122, xmax=182,axis x line=bottom,axis y line=left,font=\scriptsize] ...


1

<shameless plug> May I suggest the paper Leyla and I wrote some time ago about inclusion of plots generated by outside programs in LaTeX? Here is it: http://www.tug.org/TUGboat/tb34-3/tb108veytsman.pdf </shameless plug>


1

For the sake of completeness, here is a MetaPost version of AboAmmar's figure (same labels bar one, slightly different triangle). Since MetaPost is now part of LuaTeX, I've included my code in a LuaLaTeX program, but it could have been created and executed independently. NB: the following code needs the latest version of the luamplib package (2.10.1), ...


1

It looks... well... basically, awful in my opinion but anyway... \documentclass[tikz, border=15]{standalone} \usetikzlibrary{decorations.text} \usepackage[nopar]{lipsum} \UnpackLipsum[1] \begin{document} \tikz\draw [gray, thick, postaction={decoration={text along path, text/.expanded=\lipsumexp}, decorate}] (0,0) \foreach \i in {0,...,20}{ -- ...



Only top voted, non community-wiki answers of a minimum length are eligible