Graphics, Figures & TablesAdvice on Package Writing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
AurelienC
Posts: 1
Joined: Tue Sep 17, 2013 8:07 pm

Advice on Package Writing

Post by AurelienC »

Hello everyone!

I come to you because I would like to create a package that uses TikZ to figures for TP. Here's a start but it does not work: s Could you help me out?

Code: Select all

\NeedsTeXFormat{LaTeX2e}[1999/01/01]
\ProvidesPackage{Figs}[2013/09/17]
  
%chargement des extensions requises au bon fonctionnement de l'extension et des documents
\RequirePackage{tikz} % TikZ
\RequirePackage{ifthen}
 
%déclaration des options de l'extension
\ProcessOptions
  
%commandes et/ou environnements personnalisés
 
% Cuve
\newcommand{\cuveY}[6]{
%1 PositionX
%2 PositionY
%3 Largeur
%4 Hauteur
%5 Nom
%6 Vanne

\begin{tikzpicture}
\draw(#1,#2) -- (#1,#2+1); 		% Pt1 à Pt2
\draw(#1,#2+1) -- (#1-1,#2+2); 	% Pt2 à Pt3
\draw(#1-1,#2+2) -- (#1-1,#2+2+4); 	% Pt3 à Pt4
\end{tikzpicture}
}
 
\endinput
Thank you in advance ! :D
Last edited by localghost on Tue Sep 17, 2013 8:32 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Advice on Package Writing

Post by Johannes_B »

Would it be possible to tell us what's not working? Additionally, I don't know the acronym TP and your code is commented in french.

Can you provide a minimal working example using filecontents?

Please also have a look at clsguide

Best regards
Johannes
Last edited by cgnieder on Wed Sep 18, 2013 10:59 am, edited 1 time in total.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply