• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1702
  • Last Modified:

LaTeX include file in TexMaker doesn't work?

I'm trying to write a larger LaTeX based document and therefore I want to split the source into different files. I have this construction as an initial document:

\documentclass[10pt,onecolumn,twoside,portrait,a4paper,english,danish]{report}
\title{DocTitle}
\author{Author}

\begin{document}
% generates the title
\maketitle

Small is beautiful.
\include{Introduktion.tex}
\end{document}

Problem is that the text inside "Introduktion.tex" is not included at all. The file exists at the same level and in the same folder as the main document. Any idea as to why I can't include files?
0
Jane Noesgaard Larsen
Asked:
Jane Noesgaard Larsen
  • 2
  • 2
1 Solution
 
larsrohrCommented:
Try it as
\include{Introduktion}

(the .tex should be automatic, so your code has it looking for Introduktion.tex.tex)
0
 
Jane Noesgaard LarsenCRM Application SpecialistAuthor Commented:
You might have a point but it did not solve the problem.

I've changed the include statement but in the compile log it states:
No file Introduktion.tex.

How can I get TexMaker to see all the files? I've done this before (but with another front end and on a windows based PC (Working on a Mac at the moment)
0
 
larsrohrCommented:
Ah, perhaps input would work better in this case:
\input{Introduktion}

According to http://www.personal.ceu.hu/tex/input.htm
\input will work on its own, but \include works in the document in conjunction with \includeonly in the preamble.
0
 
Jane Noesgaard LarsenCRM Application SpecialistAuthor Commented:
hmmm... for some odd reason there were no .tex file for that file causing the problem even if I had  saved the file and other file extensions of that name existed.

Now both include and input works like a charm.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now