0

I'm writing my thesis in LaTeX using Sublime-Text3. Since my document is quite extensive, it's easier for me to handle it in a project. Also suggested by LaTeXing Guide (part2). My .sublime-project file is as follows:

{
"folders":
[
{
    "path": "(full path)"
}
]
"settings":
[
{
    "root": "thesis1.tex",
    "pdf": "thesis1"
}
]
}

MWE:

\documentclass{book}
\usepackage{import}
    \import{./}{packages.tex}
        \makeindex
        \makeglossaries
        \makenomenclature
    \import{./}{glossary.tex}
\begin{document}
\frontmatter
    \tableofcontents
    \import{./}{nomenclature.tex}
        \printnomenclature
        \listoffigures
        \listoftables
\mainmatter
    \import{./}{Part1.tex}
    \import{./}{Part2.tex}
\printbibliography
\backmatter
    \glsaddall
    \printglossary
    \printindex
\end{document}

My packages.tex contains:

\usepackage[english]{babel}
\usepackage[makeindex]{imakeidx}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[hidelinks]{hyperref}
\usepackage{graphicx, subfigure, afterpage, etoolbox, amssymb}
\usepackage{mathtools, amsthm, epigraph, csquotes,emptypage}
\usepackage[toc]{glossaries}
\usepackage[intoc]{nomencl}
\usepackage[title,titletoc]{appendix}
\usepackage[pass,paperwidth=159mm,paperheight=254mm,margin=0mm,outer=0mm,text={120mm,200mm}]{geometry}% royal octavo
\usepackage{url,titlesec,fix-cm,draftwatermark}
\usepackage[style=verbose-trad1,backend=biber]{biblatex} 
\addbibresource{thesis1.bib}

You also need to create at least Part1.tex and Part2.tex, which can contain anything.

First of all:

\cite{} does not work in the main body, neither inside Part1 nor Part2, message:

Status: cannot find any corresponding items

Second:

Suppose I \label{} on Part1.tex, if I \ref{} inside that document, ST pops up a window showing the options defined inside the same document, which is alright, but suppose I'm writing now on Part2.tex and I try to \ref{}, nothing shows up, and I want ST to show me the labels defined on every document inside the project.

Tried %-*- root: thesis1.tex -*-

Tried include instead of import.

Tried fiddling with JSON as per the guide on LaTeXing official page but to no avail.

  • Unfortunately the plugin is not open source so these are just speculations: 1) the plugin looks only in the main file for bib files 2) \import is not supported. You can workaround both things by putting fake \input and \addbibresource after \end{document}: They get ignored by LaTeX but not by the plugin – Bordaigorl Jan 23 '16 at 17:11
  • Got it working by using \input and the %-*- root: thesis1.tex -*- in every subfile method, no need to use a .sublime_project file or \inputs after \end{document} – Vyraj Jan 25 '16 at 22:29
  • Yes input works, but if you want to keep using import the trick of using the input after end document is a valid workaround. What I did was to input a dummy tex file which inputed all my tex files; this dummy file was generated by listing all the tex files in the project so I would not need to manually update it every time I added a file – Bordaigorl Jan 26 '16 at 7:30
1

Got it working by using \input and the %-*- root: filename.tex -*- in every subfile method, no need to use a .sublime_project file or \inputs after \end{document}, although the workaround mentioned by @Bordagoil in the comments is very valid.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.