Search found 9 matches

by frederic
Wed Jul 06, 2011 6:09 pm
Forum: Math & Science
Topic: Crossed-out underbracket
Replies: 4
Views: 3207

Crossed-out underbracket

Here is a modified version. It works in math mode (actually, whatever is given as an argument is automatically in mathmode. I fixed the alignment problem. I also added code to allow for nesting, but I'm not proud of that bit because it is not elegant: you must enter a second argument, indicating the ...
by frederic
Wed Jul 06, 2011 2:38 am
Forum: Math & Science
Topic: Crossed-out underbracket
Replies: 4
Views: 3207

Crossed-out underbracket

I know you asked for no other package, IF POSSIBLE. Unfortunately, I'm only able to solve your question using Tikz. There are certainly other ways; others can find them.

I defined two macros, one to underbrace and the other to "not-underbrace".

\documentclass{minimal}

\usepackage{tikz ...
by frederic
Mon Jul 04, 2011 1:57 am
Forum: Graphics, Figures & Tables
Topic: PGF and TikZ
Replies: 5
Views: 3023

PGF and TikZ

I think this is what you are looking for: You want to insert tikz code inside the braces that define the node content. To do this, create a tikzpicture (with begin{tikzpicture} and \end{tikzpicture} within the braces. Another way, shorter, is to use the \tikz command (as in my example). Keep in mind ...
by frederic
Fri Jul 01, 2011 5:50 am
Forum: Graphics, Figures & Tables
Topic: tikZ | '\foreach' Problem
Replies: 2
Views: 3878

tikZ | '\foreach' Problem

I find \foreach a little buggy when not looping over integers. For this reason I suggest the following code. I also modified the relationship between \width and \unit .

\begin{tikzpicture}

\def\width{2.5}
\def\unit{0.3}
\pgfmathtruncatemacro{\kmax}{div(\width,\unit)}

\foreach \k [evaluate ...
by frederic
Fri Jul 01, 2011 5:30 am
Forum: Graphics, Figures & Tables
Topic: Data Flow Diagrams (Tikz)
Replies: 1
Views: 3886

Data Flow Diagrams (Tikz)

You can try

\begin{tikzpicture}

\node[rectangle,inner sep=0pt,minimum height=0.5cm,minimum width=1cm,fill=gray] (a) {};
\draw[red,thick] (a.north west) -- (a.north east)
(a.south west) -- (a.south east);
\draw[blue,thick] (a.north west) -- (a.south west)
(a.north east) -- (a.south east);

\end ...
by frederic
Thu Jun 30, 2011 1:29 pm
Forum: Math & Science
Topic: Illustration of a mathematical progression
Replies: 3
Views: 2614

Illustration of a mathematical progression

One possibility is as follows:

\begin{tikzpicture}[xscale=0.5,yscale=4]
\draw[->] (0,0) -- (10,0) node[right] {$x$};
\draw[->] (0,0) -- (0,1) node[left] {$y$};

\foreach \n [evaluate=\n as \y using 1/\n^2] in {1,...,10}{
\node at (\n,\y) {\tikz{\fill[blue] (0,0) circle[radius=1pt];}};
}

\end ...
by frederic
Tue Jun 28, 2011 7:05 am
Forum: Math & Science
Topic: Drawing mathematical Figures
Replies: 8
Views: 11578

Re: Drawing mathematical Figures

How to get the latest version depends on your system.

If you are using MikTeX, it comes with a package updater. I can't say more because I don't use it.

If you are using TeXLive, there is also an updater. On Linux it is a command line utility (someone else can tell you what the command is, I don't ...
by frederic
Tue Jun 28, 2011 4:16 am
Forum: Math & Science
Topic: Drawing mathematical Figures
Replies: 8
Views: 11578

Drawing mathematical Figures

I tried it again and it compiles fine. It is probably the version of the pgf/tikz engine. I'm using version 2.1.

You should include the error message in your post.

To see what version you have installed, try the following:

\documentclass{minimal}

\usepackage{tikz}

\begin{document}

\pgfversion ...
by frederic
Mon Jun 27, 2011 7:30 pm
Forum: Math & Science
Topic: Drawing mathematical Figures
Replies: 8
Views: 11578

Drawing mathematical Figures

Using Tikz, one possible version is as follows.

\documentclass{minimal}

\usepackage{tikz}
\usetikzlibrary{calc}

\begin{document}

\begin{tikzpicture}
\draw[->] (-2,0) -- (2,0) node[right] {$x$};
\draw[->] (0,-2) -- (0,2) node[left] {$y$};

\draw (-2,-2) -- (2,2);
\draw (-2,2) -- (2,-2);

\draw ...