Anuschka Schmitt | 1 Jan 14:26

\input{file} from within a \calendar

Hello folks,

happy new year to you all!

I am trying to typeset a calendar and want to include some code stored
in a different file by using \input{extracode}. But I am getting the
error <I can't find file 'extracode' Please type another input file name>.

Here is an example (I omitted the code for the calendar grid, so it's
only the basics):

\begin{tikzpicture}
 \calendar[dates=2010-01-09 to 2010-01-10,day code={\node[text

width=5.5cm]{\textbf{\tikzdaytext}~\scriptsize\tikzmonthtext\hfill\%wt};}]
  if (Saturday){\pgftransformxshift{3.05cm}\pgftransformyshift{7.2cm}}
  if (Sunday){\pgftransformxshift{8.95cm}\pgftransformyshift{7.2cm}}
 %if (equals=2010-01-09) {\node[text width=5.5cm] at (0,-0.6){\hfill
    \scriptsize \textbf{Test}$^{\star}$};}
\input{Test}
;
\end{tikzpicture}

The file Test contains only the commented line above, it is intended to
hold all birth- and holidays. It works as expected when the % and the
\input{Test} line are removed.

Does someone have an idea how I can include the extracode?

Any hints are greatly appreciated!
(Continue reading)

André Valentin | 3 Jan 23:02
Picon
Favicon

matrix of math nodes in a parbox...

Hello everybody,

Consider the following:
-------------8><------------------
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\begin{document}
\parbox{5cm}{
\begin{tikzpicture}
\matrix[matrix of math nodes]{A&B\\C&D\\};
\end{tikzpicture}}
\end{document}
-------------8><------------------

When processing this file, I get:

! Package pgfbasematrix Error: Single ampersand used with wrong catcode.

See the pgfbasematrix package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.8 \end{tikzpicture}}

I know this has been discussed: If you get rid of the \parbox, all is OK, why?
Also I know the "ampersand replacement=\&" option, but I would like to use a lot of such constructs, so is
there a better/global solution?

I am using  mactex 2009, and I get the same result with the version of pgf contained there, or with the pgfCVS-12-05.
(Continue reading)

Mark Wibrow | 3 Jan 23:19

Re: matrix of math nodes in a parbox...

Hi,

You can change the category code of the ampersand before the arguments
are parsed (once they are parsed the category codes are fixed):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows}
\begin{document}

\def\myparbox{%
	\begingroup%
		\catcode`\&=\active
		\myparboxi}

\def\myparboxi#1#2{%
	\parbox{#1}{#2}%
	\endgroup}
	
\myparbox{5cm}{
\begin{tikzpicture}
\matrix[matrix of math nodes]{A&B\\C&D\\};
\end{tikzpicture}}

\end{document}

Regards
(Continue reading)

André Valentin | 4 Jan 09:09
Picon
Favicon

Re: matrix of math nodes in a parbox...

Thanks, here we can meet the true experts!

André

Le 3 janv. 2010 à 23:19, Mark Wibrow a écrit :

> 
> Hi,
> 
> You can change the category code of the ampersand before the arguments
> are parsed (once they are parsed the category codes are fixed):
> 
> \documentclass{article}
> \usepackage{tikz}
> \usetikzlibrary{matrix,arrows}
> \begin{document}
> 
> \def\myparbox{%
> 	\begingroup%
> 		\catcode`\&=\active
> 		\myparboxi}
> 
> \def\myparboxi#1#2{%
> 	\parbox{#1}{#2}%
> 	\endgroup}
> 	
> \myparbox{5cm}{
> \begin{tikzpicture}
> \matrix[matrix of math nodes]{A&B\\C&D\\};
> \end{tikzpicture}}
(Continue reading)

Alain Matthes | 4 Jan 10:55
Picon
Gravatar

Re: matrix of math nodes in a parbox...

Le 4 janv. 2010 à 09:09, André Valentin a écrit :
> 
> Thanks, here we can meet the true experts!
> 
> André
> 
> Le 3 janv. 2010 à 23:19, Mark Wibrow a écrit :
> 
>> 
>> Hi,
>> 
>> You can change the category code of the ampersand before the arguments
>> are parsed (once they are parsed the category codes are fixed):
>> 
>> \documentclass{article}
>> \usepackage{tikz}
>> \usetikzlibrary{matrix,arrows}
>> \begin{document}
>> 
>> \def\myparbox{%
>> 	\begingroup%
>> 		\catcode`\&=\active
>> 		\myparboxi}
>> 
>> \def\myparboxi#1#2{%
>> 	\parbox{#1}{#2}%
>> 	\endgroup}
>> 	
>> \myparbox{5cm}{
>> \begin{tikzpicture}
(Continue reading)

André Valentin | 4 Jan 12:58
Picon
Favicon

Re: matrix of math nodes in a parbox...


Le 4 janv. 2010 à 10:55, Alain Matthes a écrit :

> [...]
> and why not a minipage ?
> 
> \documentclass{article}
> \usepackage{tikz}
> \usetikzlibrary{matrix,arrows}
> \begin{document}
> \begin{minipage}{5cm}
> \begin{tikzpicture}
> \matrix[matrix of math nodes]{A&B\\C&D\\};
> \end{tikzpicture}
> \end{minipage}
> \end{document} 
> 
> Best Regards
> 
> Alain Matthes

Well, ...er..., because I never used the minipage environment. And why? I dont know...
So, from now on, I shall say "Yes, I can".

Many thanks

André

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
(Continue reading)

Picon
Favicon

pgfplots 1.3 has been released

Dear pgf users,

you might be interested in the new version 1.3 of the pgf-based package 
pgfplots which has been released last week-end.

The new version 1.3 provides
- improvements for two dimensional visualization, among them
axis equal, color bars, nodes near coords, jumps in plots, improved 
description
positioning, reverseable axis directions, simpler alignment of adjacent 
axes,
units and a simplified user interface,

- new three dimensional line, scatter, mesh and surface plots,

- an improved manual enhanced with a lot of pdf cross references

and many detail improvements and bug fixes.

Versions are available on CTAN at
http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=pgfplots
and on sourceforge under
http://sourceforge.net/projects/pgfplots/
and will be available in MikTeX soon.

Best regards

Christian Feuersaenger

------------------------------------------------------------------------------
(Continue reading)

Markus Neher | 7 Jan 09:47
Picon
Picon

Bounding the range in a tikzpicture plot?

Hello,

is there a way to use tikz for plotting several functions on the same
domain, and with a common user-defined range bound?

Sample problem:

\begin{tikzpicture}[scale=1.2]
   \draw[domain=-1.5:3, range=-3:3, red]
        plot[id=f, samples=50] function{x**3-2*x**2-x+2};
   \draw[domain=-1.5:3, range=-3:3, green]
        plot[id=df, samples=50] function{3*x**2-4*x-1};
   \draw[domain=-1.5:3, range=-3:3, blue]
        plot[id=ddf, samples=50] function{6*x-4};
\end{tikzpicture}

Unfortunately, the range bound [-3:3] is ignored when the plot is compiled.

To solve the problem, I tried modifying tikz.code.tex to pass the yrange
argument to gnuplot. This worked such that the gnuplot file for the
first function read

set terminal table; set output "myfile.f.table"; set format "%.5f"
set samples 50; set yrange [-3:3]; plot [x=-1.5:3] x**3-2*x**2-x+2

The first 6 lines of the table became

#Curve 0 of 1, 50 points
#x y type
-1.50000 -4.37500  o
(Continue reading)

Clemens Helfmeier | 7 Jan 12:00
Picon
Gravatar

Re: Bounding the range in a tikzpicture plot?

Hi,

you can use [ymin=3, ymax=3] as parameter to the tikzpicture environment. See 
the manpage for more trimming, also check "enlarge limits" key.

On Thu, Jan 07, 2010 at 09:47:09AM +0100, Markus Neher wrote:
> \begin{tikzpicture}[scale=1.2, ymin=-3, ymax=3]
>    \draw[domain=-1.5:3, range=-3:3, red]
>         plot[id=f, samples=50] function{x**3-2*x**2-x+2};
>    \draw[domain=-1.5:3, range=-3:3, green]
>         plot[id=df, samples=50] function{3*x**2-4*x-1};
>    \draw[domain=-1.5:3, range=-3:3, blue]
>         plot[id=ddf, samples=50] function{6*x-4};
> \end{tikzpicture}

Clemens
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
pgf-users mailing list
pgf-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgf-users
(Continue reading)

Matthew Mah | 7 Jan 13:48
Picon
Favicon

Re: Bounding the range in a tikzpicture plot?

I've had success using clipping.

\clip (-1.5,-3) rectangle (3,3);

Add that after the beginning of the tikzpicture environment, before the first 
plot. 

Best of luck, 
Matt

On Thursday 07 January 2010 03:47:09 am Markus Neher wrote:
> Hello,
> 
> is there a way to use tikz for plotting several functions on the same
> domain, and with a common user-defined range bound?
> 
> Sample problem:
> 
> \begin{tikzpicture}[scale=1.2]
>    \draw[domain=-1.5:3, range=-3:3, red]
>         plot[id=f, samples=50] function{x**3-2*x**2-x+2};
>    \draw[domain=-1.5:3, range=-3:3, green]
>         plot[id=df, samples=50] function{3*x**2-4*x-1};
>    \draw[domain=-1.5:3, range=-3:3, blue]
>         plot[id=ddf, samples=50] function{6*x-4};
> \end{tikzpicture}
> 
> Unfortunately, the range bound [-3:3] is ignored when the plot is compiled.
> 
> To solve the problem, I tried modifying tikz.code.tex to pass the yrange
(Continue reading)


Gmane