I would like to create E-R diagrams. It can be done with TikZ. But a whole set of commands have to be written. And every time I have to draw a E-R diagram, I have to write them back. I would like to create a package and using my \usepackage{} command I would like to use the new macros defined. How do I create a custom package and update my TeXlive according to it?
Asked
Active
Viewed 279 times
1
subham soni
- 9,673
-
There are two parts here. 1. How to write a package? For this you may search in this site. 2. How to make texline find your package? Again there are answers here suggesting you to make use of localtexmf folder. :) – Mar 04 '14 at 06:57
-
For the package, you might find some useful hints in Drawing relationships between elements of a database, Drawing a complete ER Diagram in Crow's foot style by TikZ and TikZ ER diagrams: really can't underline keys?. – Claudio Fiandrino Mar 04 '14 at 07:22
-
For creating a package: How do I create a LaTeX package?. for where to install it: Non-repository management of TeXLive packages on Ubuntu, Where do I place my own .sty files, to make them available to all my .tex files? – Ignasi Mar 04 '14 at 08:07
1 Answers
1
I did something similar for styles in graph theory.
Assuming you're on a UNIX-based system (or on Windows with Cygwin/MinGW installed),
you can use the install tool coupled with a lesser-known use of kpsewhich:
SONI_DIR=`kpsewhich -var-value TEXMFHOME`/tex/latex/soni/
install -m 755 -d $SONI_DIR
install -m 644 soni-er.sty $SONI_DIR
Just stick all of your TikZ styles into a proper .sty file (copy and paste will work fine) and run the above appropriately.
You'll then be able \usepackage your style from anywhere.
Sean Allred
- 27,421
-
I have a Ubuntu System. Can you please elaborate with your example. I can get more clear cut idea – subham soni Mar 04 '14 at 07:32