added latex subfolder and moved definitions there