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

Giant orcid logos in docx output #437

Closed
ch728 opened this issue Sep 2, 2021 · 5 comments · Fixed by #439
Closed

Giant orcid logos in docx output #437

ch728 opened this issue Sep 2, 2021 · 5 comments · Fixed by #439

Comments

@ch728
Copy link

ch728 commented Sep 2, 2021

My docx output has giant orcid logos in it. I do not have this problem in the html or pdf output.
Screenshot from 2021-09-02 16-47-01

@agitter
Copy link
Member

agitter commented Sep 3, 2021

The issue is that these are svg images and docx readers (especially older versions of Word) do not have great svg support. There is some historical discussion of that in #40. This is a general pandoc issue, and there was an update within the past week to improve svg docx support jgm/pandoc#4058.

I tested your manuscript. Word 2016 on Windows doesn't render the svg images at all:
image

Some users have modified content/00.front-matter.md to remove these images or customize the build script to exclude the images when converting to docx. Others manually delete them from the docx. We don't have a good general solution yet. The next step may be to test the next pandoc release to explore its updated support.

@twrightsman
Copy link
Contributor

twrightsman commented Sep 29, 2021

This can be fixed on the rootstock side by manually defining the size of the SVG images in content/00.front-matter.md. I used 16px because that's the size defined in the SVG files.

diff --git a/content/00.front-matter.md b/content/00.front-matter.md
index 2f01ad2..a9c1b5c 100644
--- a/content/00.front-matter.md
+++ b/content/00.front-matter.md
@@ -25,15 +25,15 @@ on {{manubot.date}}.
 {% for author in manubot.authors %}
 + **{{author.name}}**<br>
   {%- if author.orcid is defined and author.orcid is not none %}
-    ![ORCID icon](images/orcid.svg){.inline_icon}
+    ![ORCID icon](images/orcid.svg){.inline_icon width=16 height=16}
     [{{author.orcid}}](https://orcid.org/{{author.orcid}})
   {%- endif %}
   {%- if author.github is defined and author.github is not none %}
-    · ![GitHub icon](images/github.svg){.inline_icon}
+    · ![GitHub icon](images/github.svg){.inline_icon width=16 height=16}
     [{{author.github}}](https://github.com/{{author.github}})
   {%- endif %}
   {%- if author.twitter is defined and author.twitter is not none %}
-    · ![Twitter icon](images/twitter.svg){.inline_icon}
+    · ![Twitter icon](images/twitter.svg){.inline_icon width=16 height=16}
     [{{author.twitter}}](https://twitter.com/{{author.twitter}})
   {%- endif %}<br>
   <small>

@agitter Do you think the workaround is benign enough to merge in to rootstock?

@dhimmel
Copy link
Member

dhimmel commented Sep 29, 2021

We used to include height="13px" width="13px" but that was changed in 658bcd7. Seems like we might want to add them back.

@vincerubinetti did you want to weight in? Do you know whether these logos should be 13px or 16px?

@vincerubinetti
Copy link
Collaborator

Either is fine.

@dhimmel
Copy link
Member

dhimmel commented Sep 29, 2021

@twrightsman do you want to make a PR to rootstock with this change?

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

Successfully merging a pull request may close this issue.

5 participants