Search found 4 matches

by stietz
Fri Feb 27, 2009 1:03 am
Forum: General
Topic: Define own environment with the option to drop its content
Replies: 3
Views: 3448

Define own environment with the option to drop its content

The idea is that I have an enviroment like that:


\begin{myenv}[line width=5pt,scale=3]{myoptions}
\draw (-1.5,-1.5) -- (1.5,1.5);
\end{myenv}


Depending on myoptions that should either expand to:


\begin{tikzpicture}[line width=5pt,scale=3]
\draw (-1.5,-1.5) -- (1.5,1.5);
\end{tikzpicture ...
by stietz
Sun Feb 22, 2009 9:21 pm
Forum: Document Classes
Topic: Passing options to self-written Package
Replies: 3
Views: 4641

Passing options to self-written Package

I got it working with xkeyval:


\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{externaltikz}%
[22/02/2009 (rev. 2) Externalize TikZ environments to PDFs.]

\RequirePackage{ifthen,xkeyval}

\newif\ifDraft
\newcommand{\filename}{default}

\DeclareOptionX{draft}{\Drafttrue}
\DeclareOptionX{final ...
by stietz
Sun Feb 22, 2009 4:40 am
Forum: General
Topic: Include name of file into the document itself
Replies: 1
Views: 1358

Include name of file into the document itself

If I call pdflatex using

pdflatex.exe --jobname=one two.tex


I can use \jobname inside the document to print "one", but how do I get the name of the original file ("two.tex") printed in my document?

I want to print the original filename in the footer, but don't want to have it to adjust it (so ...
by stietz
Sun Feb 22, 2009 4:34 am
Forum: Document Classes
Topic: Passing options to self-written Package
Replies: 3
Views: 4641

Passing options to self-written Package

I have created my own package, looking something like that.


\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{thename}

\RequirePackage{ifthen}

\newif\ifDraft
\newcommand{\filename}{default}

\DeclareOption{draft}{\Drafttrue}
\DeclareOption{final}{\Draftfalse}
\DeclareOption{filename}{\renewcommand ...