-
Notifications
You must be signed in to change notification settings - Fork 8
[Feature request] compile the main.tex while editing a subfile #8
Comments
Please try adding |
If I just open a non-main file, NeoTex is not a editor command: |
Ok looks like the file has the wrong filetype, as the plugin only gets loaded for |
Okay, I added It may matter that my non-main file is in a subdirectory, not in the same directory with main.tex? |
You mean the main pdf file of the hole project doesn't get updated? |
Okay, will be expecting the feature! No, subfile isn't a valid latex document, as it doesn't have \begin{document} and so on. I'll live without live preview for now. Thanks! |
Ok.. I thought you're using the |
+1 for this feature! As of current, I'm keeping the Would love to offer a hand writing the feature—perhaps some option of passing the name of the main tex file? |
I made the subfile branch and pushed a prototype.
While the implementation I committed did handle these problems I'm not perfectly satisfied with the solution.
How it works:
The solution using Feedback, suggestions, comments are welcome :) P.S. I also added the option |
It works quite well. Thanks!! A few comments:
|
Thanks @Yougmark for the feedback.
|
I pushed a update, which hopefully works much better.
I would appreciate some help with testing. |
Very cool. I think everything works well. It's updated automatically even without saving the file. So you fixed the compilation with cache files. Great!! Thanks! |
This sounds very promising. Is it working well enough to make a pre-release? |
It worked quite well for me so for, so I added the option |
Hi, thanks your excellent plugin. I'm trying to use this subfile feature and it kinda works but maybe I'm missing something. I'm gonna recap a bit all what I read in this issue so you can see what I've done:
Now, I open neovim and edit `subfile.tex. I can see my PDF viewer (evince) flashing, so the PDF has been updated - but there are no changes. I save I make another edit to I'm not complaining that much, it's an -almost- live preview. Just reporting what I experienced :) Also, probably a little subsection on how enable and use this feature can be added to the README. |
I understood what was causing my problem, I was using this snippet to include a bunch of files: \foreach \i in {1, ..., 9} {%
\edef\FileName{sections/file\i.tex}%
\IfFileExists{\FileName}{%
\input{\FileName}%
}
} using a more classical approach like: \input{sections/file1.tex}
\input{sections/file2.tex}
\input{sections/file3.tex}
... everything works fine! |
Things work fine when I'm in main.tex. But it issues errors when I move to other tex files, for example, files in sections/ subdirectory. So live preview doesn't work when I'm editing non-main files.
The text was updated successfully, but these errors were encountered: