tags:

views:

76

answers:

4

Okay, I'm a real LaTeX noob. But I will have to use it. And a friend who knows it (as a student who writes his diploma with it) said, there is a Listings package to put source code into a document. Well, after I saw that listings package, I realized that's not really what I want. So I'm curious if it's possible to develop something like that listings package. I have no idea what sort of thing such a "package" actually is. Right now I'd bet it's some kind of program.

So: How could I write a module or package (or whatever the LaTeX folks call that) to extend LaTeX with custom functionality? What programming language must I use there? And are there any helpful tutorials online?

+1  A: 

LaTeX is a program suite developed in the language known as TeX :)

Kornel Kisielewicz
+2  A: 

Look at The latex class and package authors guide. Also look at this rather similar SO question, in particular, the implementation of texments gives you another avenue for implementing things.

Charles Stewart
+1  A: 

You can look into the source code of the listings package if you're interested in its workings but beware. Writing LaTeX packages yourself isn't easy.

Joey
+2  A: 

For simple things you can define your own environments and commands. See how to use \newcommand and \newenvironment. Look at some examples here. It is easy.

Putting your commands and environments in a separate package is the next step.

Programming TeX (engine which LaTeX is based upon) is more complicated. The TeXbook [1], [2] is your friend.

jetxee