Here I present you the ultimate train and tram alignment file. It makes alignment ultra easy.
I have built it by observation and trial. The vehicle will do turns very nicely, just like all vehicles from the pak.
It's a PSD file (Photoshop) but you can open with GIMP. I saved as PSD because there seems to have more softwares that open psd than xcf.
How it works
There are four groups, one for every direction (NS, EW, Vertical and Horizontal). Each group has four layers, one with the tile, one with the length units, one with an example and one with the reference lines. Lets explain what does the reference and the length layers do:
The Length layer: Every space between a purple and green layer is one length unit, so if your vehicle has length=4 your vehicle will fill four spaces. The pink lines are the even length lines.
The Reference layer: The reference layer includes a set of blue lines which reference where the vehicle boundaries are. The drawing must always start from them, so in the first three views the front (or back when the vehicle is moving to the other direction) must be exactly in the blue lines intersection. They must be over the blue lines.
Exception (Horizontal): The horizontal tile is an exception of above, first because the vehicle must be exactly in the middle of the tile, that's why there's a reference line in the middle. The horizontal reference line is where the wheels must be.
Also, there's half length unit between purple and green lines. This is because if you use an even number for length you use the pink lines to align, if it's an odd number you use the green lines. The reason is exactly because the vehicle must be exactly in the middle.
Exception (Vertical): In the vertical tile you also place the drawing in the middle, but the middle of the lines, if you use an odd length number you place the start on the same line but end one line less (it's better explained in the image).
The text file have the offset values you must use for all lengths.
In the included example the vehicle have length=12.
Remember that you need to keep some pixels empty for spacing between convoys. Test it!
Edit: Seems to not be right, I'll update once I find the right spots.
Edit 2: Now it's perfect, I found the offset numbers.