Rotate Images via Image Attributes
Hi,
I'm trying to pass the options angle=90,origin=c to the \includegraphics package, to rotate figures by 90 degree, when compiling Latex via Multimarkdown 6 using Scrivener 3.
So I tried passing options as image attributes as such:
![stratification][]
[stratification]: stratification "Stratification" angle=-90 origin=c
The figure environment does get created, but the options are not passed along. I also tried using "" around the values (as in angle="-90" origin="c"), but it still doesn't pull through.
Is this not supported or am I doing something wrong here? The manual states that "The format is attribute=value or attribute="multi word value". Currently, MultiMarkdown does not attempt to interpret or make any use of any of these attributes."
The way I understood it this should work. if it is not supported maybe the manual should clarify what get's passed through to which format , or even better MMD should be updated to pass those arguments.
Thanks for the support.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by fletcher on 30 May, 2020 02:22 PM
There's 2 issues:
The parser doesn't work with the leading hyphen in "-90", since it is designed for basic HTML attributes, and negative values have never come up. I can look at allowing hyphens. For now, you need to quote that attribute.
The arbitrary attributes are only supported for HTML. So even if you quote it, nothing will happen, but it would be "properly" exported to HTML. But not LaTeX. LaTeX and OpenDocument support height/width, but the odds of any other attribute being compatible across all output formats is pretty slim.
To do what you want you would need to include the raw LaTeX instead of trying to use MultiMarkdown image/attributes to accomplish it.
Fletcher
2 Posted by dudido on 30 May, 2020 04:17 PM
Thanks for the quick reply, Fletcher. I already did include the raw LaTeX as a workaround and it works fine. I just wanted to inform you of the issue, since I was unsure if you considered that a bug or the limits of MMD - you mentioned reaching out to you if one ran into corner cases with the new implementation of MMD6.
I also agree that passing attributes for LaTeX may produce more issues than they help resolve, so I understand your stance. However I would suggest changing the wording in the documentation to clarify that arbitrary attributes are only supported for HTML and nothing else (and maybe a footnote regarding the negative values not occuring in HTML may be helpful too).
FYI, I also noticed another corner case in not being able to embed a hyperlink into the caption of a figure (I tried putting the URL inline as well as refering to it using the '[link]: URL'-syntax and putting the referer into the caption). I'm not sure if you consider this a bug or the limit of MMD - let me know if I should make a separate forum post to document the issue as I saw it.
Support Staff 3 Posted by fletcher on 30 May, 2020 05:22 PM
I'll look at the documentation.
What do you mean about there being an edge case? Do you mean that MultiMarkdown doesn't handle the link? Or your LaTeX configuration doesn't support it?
When I test this, the link is inserted via MultiMarkdown, but LaTeX is not thrilled with it (though the generated PDF includes the link. It seems to be an issue with footnotes, which are also not great inside tables in LaTeX).
So what I am seeing is a LaTeX issue, not a MultiMarkdown issue. But maybe I am misunderstanding.