also set mode to "latex" when session is created, to avoid setting mode to "text" (default) and then to "latex" which causes the text worker to be unnecessarily created and destroyed.