Hello,
I am writing a document about laws and I wanted to have a file to keep all singular laws together in any way, such as:
Law-1-500{
Murder is forbidden.
}
So I could quote it later in any place in the document by writing a quotecommand that could work like:
\includeLaw{Law-1-500}
So I get:
Murder is forbidden.
That way I could change the law in just one file and have it updated through all the document. I've searched the forum and the internet but I can't find a way to do it. I think I can manage to define the new command, but I can't imagine how to retrieve the law item from a file.
Thank you.
General ⇒ Include items from file
NEW: TikZ book now 40% off at Amazon.com for a short time.

Include items from file
Hi,
you could create a .sty file and then store all the laws using commands; then you can load the file as usual in the preamble of your document and invoke the corresponding commands. A little schematic example:
the file MyLaws.sty:
the .tex document:
you could create a .sty file and then store all the laws using commands; then you can load the file as usual in the preamble of your document and invoke the corresponding commands. A little schematic example:
the file MyLaws.sty:
Code: Select all
\newcommand\Lawid{Murder is forbidden.}
\newcommand\Lawiicvi{Theft is forbidden.}
Code: Select all
\documentclass{article}
\usepackage{MyLaws}
\begin{document}
\Lawid
\Lawiicvi
\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...