Inserting figures in documents #69
kellijohnson-NOAA
started this conversation in
General
Replies: 1 comment 2 replies
-
@kellijohnson-NOAA Thank you for posting this discussion. I appreciate the clarification because I had heard something about this discussion you mention and checking in on this topic was on my to-do list. If there tasks to do to assist in the continued maintanance of the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was recently asked how one should go about inserting a figure in a document. And, I responded with an incorrect answer so I thought I would talk about the topic here for everyone to see.
The trouble with answering this question is that it depends 🤷♀️. Specifically, it depends on whether you are trying to create html or pdf output and if you want the figure to be accessible or not. Additionally, it depends on what version of LaTeX you are using and how you are compiling the output. All of these questions can be handled by {sa4ss} behind the scenes if you choose to use
sa4ss::add_figure()
rather than inserting your figures with bespoke code. Granted, I need to update the code but at least this means that if you do not have accessible figures it is my fault and not yours. BUT, the NUMBER 1 reason to usesa4ss::add_figure()
is that the code needed to create accessible figures is changing daily, maybe even hourly. Currently {tinytex} and {rmarkdown} are not supporting these changes. So, do not think that raw {rmarkdown} is going to work for you now or in the future.In summary, please use
sa4ss::add_figure()
to put figures in your document because in theory the function will be updated as changes are made to LaTeX code making your figures accessible this cycle and when the next author picks up your files. I am happy to discuss wanted changes to the function here or in a specific GitHub issue. Best, KelliBeta Was this translation helpful? Give feedback.
All reactions