Skip to content

[BUG] Import statements are not detected #3208

@Kim-Vallee

Description

@Kim-Vallee

Description

Import statements in documents do not detect the associated files. To be more precise, the files detected which contain input statements do not detect the further inputted files.

Steps to reproduce

A main file main.tex with:

\documentclass[a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

% figure support
\usepackage{import}

\begin{document}
	\import{content/my_content/}{my_content}
\end{document}

A secondary file content/my_content/my_content.tex with the content like:

\section{This is a section you can click on} \label{sec:this_is_a_section_you_can_click_on}

\input{more_content}

A last file content/my_content/more_content.tex with:

Here is my text ! Try click on it and it won't work ;(

Expected behavior

It should be that the file content/my_content/more_content.tex appears in the vimtex, for instance to allow for inverse search.
More precisely, I remark that section (from the import) is "inversesearchable" but not the text (from the input in the import).

Actual behavior

As of now the file content/my_content/more_content.tex is not detected by vimtex.

Do you use a latexmkrc file?

No

VimtexInfo

 System info:
  OS: Debian GNU/Linux 12 (bookworm)
  LaTeX version: pdfTeX 3.141592653-2.6-1.40.26 (TeX Live 2024)
  Vim version: VIM 9.1 (1-724)
  Has clientserver: true
  Servername: VIM
  $PATH:
    - /bin
    - /home/kimvallee/.juliaup/bin
    - /home/kimvallee/.local/bin
    - /home/kimvallee/Documents/projects/instant-reference
    - /snap/bin
    - /usr/bin
    - /usr/games
    - /usr/local/bin
    - /usr/local/games

VimTeX project: main
  base: main.tex
  root: /home/kimvallee/Documents/vimtex-example
  tex: /home/kimvallee/Documents/vimtex-example/main.tex
  main parser: current file verified
  document class: article
  packages: babel fontenc import inputenc
  source files:
    main.tex
    content/my_content/my_content.tex
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    out_dir: latexbuild
    callback: 1
    continuous: 1
    executable: latexmk
  viewer: Zathura
    xwin id: 0
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions