SublimeText / LaTeXTools

LaTeX plugin for Sublime Text
https://latextools.readthedocs.io/
2.01k stars 366 forks source link

Feature Request: Display citation item content #1328

Open clsmt opened 6 years ago

clsmt commented 6 years ago

Request

When moving the cursor or mouse over an cited item, e.g. in \cite{abc98}, open a small window displaying the title, author etc. of that item.

Reason

This would be very helpful in revising a paper when one needs to recheck references, and moving them around.

r-stein commented 6 years ago

I already thought of a popup for jump-top-anywhere, which would give some contextual information about the jumptarget.

r-stein commented 6 years ago

I started with the concept of a hover popup here. If you want to use the first version you can download it here: jumpto_anywhere.py and replace the file in your LaTeXTools package folder (Preferences > Browse Packages...)

clsmt commented 6 years ago

How do I use this feature again? I installed the LatexTools 4.0 alpha, located jumpto_anywhere.py, then inserted the codes in class JumptoAnywhereHelper(object) and class JumptoAnywhereCiteHelper(JumptoAnywhereHelper).

But when I move cursor or hover over the citation items, nothing happens?

r-stein commented 6 years ago

You need to replace the whole file. There are imports at the top and a hover listener at the bottom.

clsmt commented 6 years ago

Thanks! It works now.

It seems the info in the popup is repeated like this: image

r-stein commented 6 years ago

Yes in the first approach it just reuses the information of the cite_panel_format setting (because that is easily available), which is by default:

"cite_panel_format": ["{author_short} {year} - {title_short} ({keyword})","{title}"],

In the future we may add an additional setting for this popup.

clsmt commented 6 years ago

Oh I see. Thanks for the effort! This is very helpful to me.

fliptanedo commented 4 years ago

I just wanted to add that this feature is one of my favorite tweaks to LaTeXTools. It is a big help with my workflow. Thank you @r-stein (and @clsmt for requesting this).