Comments (4)
First of all, thank you for making such a good plugin, it's already the third (or maybe fourth) year that I enjoy writing in Latex with the great help of vimtex.
<3
Is your feature request related to a problem? Please describe it.
Currently, when the float specifier changes (e.g. from
h
toht
), the error message does not specify which float changed it. The warning message just saysmain.tex|| LaTeX Warning: `h' float specifier changed to `ht'.
This is very hard to improve on. The problem is that there is no line number information in the log file. Consider this:
\documentclass{memoir}
\usepackage{graphicx}
\usepackage{blindtext}
\begin{document}
\blindtext[4]
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.95\textwidth]{example-image-a}
\end{center}
\caption{dasdasdas}\label{fig:qwe}
\end{figure}
Some text Some text Some text Some text Some text Some text Some text Some text Some text
Some text Some text Some text Some text Some text Some text Some text Some text Some text
Some text Some text Some text Some text Some text Some text Some text Some text Some text
Some text Some text Some text Some text Some text Some text Some text Some text Some text
Some text Some text Some text Some text Some text Some text Some text Some text Some text
Some text Some text Some text Some text Some text Some text Some text Some text Some text
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.95\textwidth]{example-image-a}
\end{center}
\caption{dslkadjaslkdj}
\label{fig:SpinDistributionModel}
\end{figure}
\end{document}
(Notice the use of example-image-[ab]
, which is a nice little builtin feature.)
Now, if we compile, we get the following output (more or less):
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex 2023.12.18) 4 JAN 2024 17:30
entering extended mode
\write18 enabled.
file:line:error style messages enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22> (/usr/share/texmf-dist/tex/latex/memoir/memoir.cls
Document Class: memoir 2022/11/17 v3.7.19 configurable book, report, article document class
… (CUT OUT)
<example-image-a.pdf, id=1, 321.2pt x 240.9pt>
File: example-image-a.pdf Graphic file (type pdf)
<use example-image-a.pdf>
Package pdftex.def Info: example-image-a.pdf used on input line 8.
(pdftex.def) Requested size: 323.94896pt x 242.96889pt.
LaTeX Warning: `h' float specifier changed to `ht'.
<example-image-b.pdf, id=2, 321.2pt x 240.9pt>
File: example-image-b.pdf Graphic file (type pdf)
<use example-image-b.pdf>
Package pdftex.def Info: example-image-b.pdf used on input line 21.
(pdftex.def) Requested size: 323.94896pt x 242.96889pt.
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}
]
LaTeX Warning: `h' float specifier changed to `ht'.
[2 </usr/share/texmf-dist/tex/latex/mwe/example-image-a.pdf>] [3 </usr/share/texmf-dist/tex/latex/mwe/example-image-b.pdf>] (./test.aux) )
The warnings are not really directly related to the info about the "example-image-… used on input line X", and as you see, there is not other info.
from vimtex.
If I knew a way to get the necessary information, then I might consider trying to make it work better. But I don't, and I've never heard of something like that before.
I'm closing, but feel free to continue the discussion. In particular, if you have any ideas, feel free to share.
from vimtex.
If I knew a way to get the necessary information, then I might consider trying to make it work better. But I don't, and I've never heard of something like that before.
Yes, these log messages are indeed difficult to parse. And I've had the messages related to one float separated by the other log messages. I suppose there is no clear way to implement a stable method to deduce the exact float.
I am not sure what the log parser can do, but maybe there is a way to implement a jump to the position of the message in the log file, instead of just jumping to the beginning of the main file?
from vimtex.
I am not sure what the log parser can do, but maybe there is a way to implement a jump to the position of the message in the log file, instead of just jumping to the beginning of the main file?
I can see how using e.g. the line number of the previous entry could be convenient, but I'm skeptical. I believe it would be confusing to people that don't know of this behaviour.
I think the way to implement this is to enrich the relevant quickfix entries after the log file is fully parsed, similar to what we do here:
vimtex/autoload/vimtex/qf/latexlog.vim
Lines 123 to 141 in f9b19d0
from vimtex.
Related Issues (20)
- how do I unmap just some mappings? HOT 4
- Inconsistent syntax highlighting in subscript and superscript HOT 1
- Help Add custom concealing rule for VimTeX on neovim HOT 3
- How do I get rid of a "latexmk is not executable" error? HOT 4
- supertab completion takes 20 seconds to complete a word when using many latex packages HOT 5
- Inverse search does not work with sioyek HOT 10
- Magic comment for compiler fails if there are trailing spaces HOT 3
- Vimtex doesnt boot HOT 25
- package 'unicode-math' yields compile error HOT 3
- [SOLVED] Focus the terminal when doing inverse search HOT 3
- viewer shouldn't open automatically when compilation finished HOT 10
- Vimtex: Viewer cannot find Zathura window ID HOT 7
- vimtex compilation fails despite compiling successfully when done from command line HOT 6
- completion is missing equation labels when using autonum HOT 4
- FR: syntax inclusions when using the LaTeX package 'robust-externalize' HOT 12
- `vimtex-i$` works in markdown math `\(...\)` but not `$...$` HOT 7
- Compilation doesn't update PDF HOT 3
- WSL2: Viewer cannot find Zathura window ID! HOT 17
- Feature request: support apastyle prenotes HOT 5
- -shell-escape and pygments for minted HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vimtex.