Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying #+ATTR_ODT attributes to bibliography link #1102

Open
matogoro opened this issue Dec 24, 2023 · 1 comment
Open

Applying #+ATTR_ODT attributes to bibliography link #1102

matogoro opened this issue Dec 24, 2023 · 1 comment

Comments

@matogoro
Copy link

First off—fantastic package. I've been using it for years.

I have a question about applying various attributes (e.g. font, formatting) to generated bibliography link text from org-ref. I currently use the enhanced ox-odt exporter to apply formatting changes in my exported ODT manuscripts via #+ATTR_ODT keywords. However, I can't get these changes to apply to generated text from org-ref. So, in the following example,

#+ATTR_ODT: :style "ReferenceText"
bibliography:~/Multimedia/Literature/SciLi/index.bib

output text from the bibliography file is generated with the default "Body Text" style (not "ReferenceText" as desired). I've tried a few workarounds like wrapping the bibliography link text in a one-cell org-table or using keywords like #+BEGIN_TEXTBOX, although these do not work either.

Note that, when these workaround methods are applied to multiline non-generated text (e.g., as shown here), the #+ATTR_ODT formatting can be applied to all the text within the block. So the following works:

#+BEGIN_TEXTBOX
#+ATTR_ODT: :style "ReferenceText"
#+BEGIN_FOO
This is a test block.

This is a test block.

This is a test block.
#+END_FOO
#+END_TEXTBOX

And the following does not (generates a read error during export):

#+BEGIN_TEXTBOX
#+ATTR_ODT: :style "ReferenceText"
#+BEGIN_FOO
bibliography:~/Multimedia/Literature/SciLi/index.bib
#+END_FOO
#+END_TEXTBOX

Is there any way to get this working for org-ref? Thanks so much for your help.

@jkitchin
Copy link
Owner

jkitchin commented Jan 2, 2024

Off the top of my head, I guess you might consider redefining the export function to do the right thing for that. The function right now is created with :export (apply-partially 'org-ref-bibliography*-export "\\bibliography"). That function only supports a latex backend. You could adapt it to support odt, and those options I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants