From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Text and figure side by side
Date: Thu, 24 Apr 2014 16:20:21 +0200 [thread overview]
Message-ID: <CACyK-eqDOHYUajz=YPvweK85bju0afO0CL_Ssgh3mM-mVhRiJQ@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1397 bytes --]
Hi,
Is it possible to put side by side text and a figure created in a TikZ
environment
?
Thank you,
Fabrice
\usemodule[tikz]
\usetikzlibrary[calc]
\starttext
\def\smiley{%
\starttikzpicture[baseline=-0.75ex,black]
\filldraw[fill=orange] circle (2mm);
\node[fill,circle,inner sep=0.5pt] (left eye) at (135:0.8mm) {};
\node[fill,circle,inner sep=0.5pt] (right eye) at (45:0.8mm) {};
\draw (-145:0.9mm) arc (-120:-60:1.5mm);
\stoptikzpicture}
\placefigure[right,none]{}{
\starttikzpicture
\coordinate (c1) at (0,0);
\draw[thick,fill=darkgreen] ($(c1) + (0:30mm)$) arc (0:360:30mm)
($(c1) + (360:35mm)$) arc (360:0:35mm);
\draw[thick,fill=gray] ($(c1) + (0:3mm)$) arc (0:360:3mm);
\foreach \x in {0,36,...,180}
\draw[fill=red, draw=black](c1)--(\x:30mm) arc (\x:\x+36:30mm)--(c1);
\foreach \x in {216,252,...,324}
\draw[fill=blue, draw=black](c1)--(\x:30mm) arc (\x:\x+36:30mm)--(c1);
\foreach \x in {3,12,...,360}
\draw[fill=lightgray] (\x:28mm) circle (2pt);
\draw[thick,fill=white!30] ($(c1) + (0:3mm)$) arc (0:360:3mm)
($(c1) + (360:4mm)$) arc (360:0:4mm);
\draw[thick,fill=darkgray] ($(c1) + (0:3mm)$) arc (0:360:3mm);
\foreach \x in {18,54,...,198}
\node [white,rotate=\x] at (\x:17.5mm){\small \bf PERDU};
\foreach \x in {234,270,306,342}
\node [] at (\x:17.5mm) {\smiley};
\draw[darkgray,-latex,line width=4pt, line cap=round] (90:37mm) --
(90:26mm);
\stoptikzpicture}
\input knuth
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 1927 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2014-04-24 14:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 14:20 Fabrice Couvreur [this message]
2014-04-25 13:47 ` Fabrice
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACyK-eqDOHYUajz=YPvweK85bju0afO0CL_Ssgh3mM-mVhRiJQ@mail.gmail.com' \
--to=fabrice1.couvreur@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).