Closed suyashbire1 closed 3 years ago
You can add a label inside the subfigure environment and reference that label as usual. No need to add the extra letter.
On 19 Dec 2017, Suyash Bire notifications@github.com wrote:
If a figure fig:fig1 has, say, four panels, in latex one would do
\ref{fig:fig1}a
to reference the first panel. In org-ref, one would doref:fig:fig1 a
, which in latex translates to\ref{fig:fig1} a
. In my opinion,figure 1a
looks much cleaner thanfigure 1 a
.Is there an easy way to get rid of that space between } and a?
-- Jonathan Monthly Atmospheric CO₂: November 2017: 405.14, November 2016: 403.53
Alternatively, use [[ref:fig:fig1]]a.
Thank you for the quick responses.
@jkitchin Thank you very much! That works. Can the insertion of square brackets be automated with org-ref-helm-insert-ref-link
? Sorry if this is trivial, I am a new to emacs-lisp.
@jagrg Thank you for the solution. But I am not using the subfigure environment. My figures already have panels. I should have been clearer with my question.
You can set org-ref-prefer-bracket-links to t, and then all links will be bracketed. It isn't fine-tunable though, so it is all or nothing. There isn't a way to fine-tune the insert command much either, we already use prefix args for something else there I think.
(setq org-ref-prefer-bracket-links t)
did not work. It still inserts links without brackets.
Sure enough, it looks like that is mostly for cite links. Sorry for the red herring!
I am using a snippet to achieve this (see yasnippet).
With the following snippet typing irl
followed by a Tab
does the trick.
# -*- mode: snippet -*-
# name: insert_ref_link
# key: irl
# --
[[`(org-ref-helm-insert-ref-link)`]]$0
Please feel free to close this issue if you don't plan to implement this feature in org-ref.
I will leave it open for now. There should probably be consistency across the links, but it might take while to get that.
If a figure fig:fig1 has, say, four panels, in latex one would do
\ref{fig:fig1}a
to reference the first panel. In org-ref, one would doref:fig:fig1 a
, which in latex translates to\ref{fig:fig1} a
. In my opinion,figure 1a
looks much cleaner thanfigure 1 a
.Is there an easy way to get rid of that space between } and a?