I have a large LaTeX project (my thesis) with a main TeX file (main.tex
) and many subfiles contained in their own sub-directory. All are interrelated with the subfiles
package.
Now I want to add a title page to appear on the first page of the compiled pdf file, with hebrew text: To include the thesis title, author name and institution name.
The preponderance of the project is best compiled with pdfLatex
, and therefore I wish to stick with this one and not change to XeLaTeX
.
I successfully compiled a .tex
file that contains hebrew AND english letters (titlepage.tex
).
I want titlepage.tex
to appear first, and after it all the series of chapter0*.tex
files.
Now comes the question - how to compile the project properly?
I tried to import the standalone
and import
packages to main.tex
:
\usepackage[subpreambles=true]{standalone}
\usepackage{import}
and then call for titlepage.tex
right after \begin{document}
:
\usepackage[subpreambles=true]{standalone}
\usepackage{import}
\begin{docment}
\import{./}{titlepage}
\end{document}
But nothing compiled - a multitude of errors concerning the standalone.sty
file.
Any help?
The hierarchical file structure is as follows:
root folder
├main.tex
├titlepage.tex
└───figures
| │ figure01
│ │ figure02
│ │ figure03
└───subfiles
| │ chapter01
| │ chapter02
| │ chapter03
The main.tex
file structure:
\documentclass{tufte-book} % Tufte-book format
\usepackage[utf8]{inputenc}
\usepackage[english]{babel} % Bibliography
\usepackage{biblatex}
\addbibresource{references.bib}
\usepackage{subfiles} % Best loaded last in the preamble
%%% Document %%%
\begin{document}
\chapter{Chapter 1}
\subfile{subfiles/chapter01}
\chapter{Chapter 2}
\subfile{subfiles/chapter02}
\chapter{Chapter 3}
\subfile{subfiles/chapter03}
\end{document}
The chpater0*.tex
files has just the same document preamble as main.tex
.
The Hebrew language file, to be used as a title page:
\documentclass{article}
%\usepackage[subpreambles=true]{standalone}
%\usepackage{import}
\usepackage[utf8x]{inputenc} % utf8x for hebrew letters
\usepackage[english,hebrew]{babel}
\selectlanguage{hebrew}
\begin{document}
כיתוב בעברית.
\selectlanguage{english}
English text.
\end{document}
Note: I compile the the project in overleaf.
titlepage.tex
I'd remove everything up to and including\begin{document}
as well as\end{document}
, and include the file frommain.tex
using\input{titlepage}
. Nostandalone
andimport
needed (any packages and definitions that are needed in the title page, put them into the preamble). There is probably no need to compile the titlepage separately. If there is, then use\subfile
to load the titlepage.