I have written a template for a personal diary. The main tex file \input a file called entries.tex, which will \input all the diary entries, which are in a subdirectory, as well as write the title of the entry and the date it is in (both of which it gets from the path and filename)
entries.tex is generated by a python script called entries.py, the output of this script looks like this:
\textbf{This is the title} \hspace*{\fill} \textbf{2018-11-16}\\
\input{entries/2018/11/16 - This is the title} \bigskip
\textbf{This is another entry} \hspace*{\fill} \textbf{2018-11-18}\\
\input{entries/2018/11/18 - This is another entry} \bigskip
And the main.tex file looks like this:
\documentclass{article}
\usepackage[margin=4cm,left=2cm,right=2cm]{geometry}
\title{\huge{}Personal Diary}
\author{\LARGE{}Author name}
\date{Last written \today}
\begin{document}
\maketitle
\newpage
\input{entries}
\end{document}
The directory tree looks like this:
Diary
├── entries
│ └── 2018
│ ├── 01
│ ├── 02
│ ├── 03
│ ├── 04
│ ├── 05
│ ├── 06
│ ├── 07
│ ├── 08
│ ├── 09
│ ├── 10
│ ├── 11
│ │ ├── 16 - This is the title.tex
│ │ └── 18 - This is another entry.tex
│ └── 12
├── entries.py
├── entries.tex
├── main.tex
└── makefile
However, when I try to compile main.tex, it seems to find entries.tex, but not the files that entries.tex includes. The output of it looks like this:
python3 entries.py
pdflatex main.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2018-04-01> patch level 5
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty
(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty))
No file main.aux.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./entries.tex
! LaTeX Error: File `entries/2018/11/16 - This is the title.tex' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)
Enter file name:
I'm sure that entries/2018/11/16 - This is the title.tex exists. Does anyone have any idea why LaTeX wouldn't be finding it?
I have made a github repo with all the code on for anyone who wants to try it out: https://github.com/ventlion/latexdiary
\includebut your example code does not use that command, it uses\input, but either way it is far simpler if you do not use spaces in file names. – David Carlisle Nov 18 '18 at 19:26\input{"entries/2018/11/18 - This is another entry"}with double quotes but I would not use spaces. – David Carlisle Nov 18 '18 at 19:30\input{}? – Vent Nov 18 '18 at 19:31\input fooowith the filename terminated by a space.... but away from tex spaces in filenames are a pain, in a bash shell tryls 16 - This is the title.texto see if it lists the filename... – David Carlisle Nov 18 '18 at 19:33\textbf{this is some bold text}) – Vent Nov 18 '18 at 19:36textbfdoesn't have to access the filesystem using a syntax that works on linux, windows, ibm mainframes, atari, .... – David Carlisle Nov 18 '18 at 20:09