Build your tunnel with a straight entrance but don't connect any track to it externally. Align a basic portals with the entrances to the tunnels and connect your track to them. Slide 98% the portals into the entrance of each end of the tunnel and align them. By keeping a little of the portal outside the tunnel provides a reference point for their height. If necessary lower the entrance to the tunnel by 0.1 - 0.2 to hide any tunnel track below that of the portal track. Configure the portals in the normal manner, there is a good tutorial on Trainz TV to do this if you need more help.
You can stack portals in tunnels. Connect the first from points a short distanc before the tunnel using normal track and the others using invisible track which will make the portal invisible. Align each carefully on top of each other. Use an invisible points lever to hide the points. Route your trains to the various portals to achieve completely different outcomes. Peter