rvg icon indicating copy to clipboard operation
rvg copied to clipboard

plotmath expressions for pptx()

Open davidgohel opened this issue 7 years ago • 3 comments

@Lukas-1 commented on Fri Mar 24 2017

I saw some issues when using plotmath expressions in powerpoint files. Specifically, if an expression() is composed of multiple elements joined using "*" or "~", separate textboxes are created in PowerPoint, which leads faulty vertical alignment. It would be better if the whole expression were contained in one textbox.

For example, the following code displays buggy vertical alignment of the text:

plot(1:10) title(expression("foo" * "-" * "oo"))

Also, using an en dash in plotmath expressions causes a bug where each element of the expression is individually centered and overlaps.

P.S. thank you for developing this great package!


@davidgohel commented on Tue Apr 04 2017

Hi

Sorry, it's a known issue but I don't know exactly what is wrong.

I'll have a coding session probably next month and will invest on this case.

David

davidgohel avatar Jan 08 '18 00:01 davidgohel

Hi,

I am facing the same issue when using superscript "^" or subscript "[]" in expression(). It also creates separate textboxes in PowerPoint.

Emilie

emiliemillet avatar Jan 24 '18 10:01 emiliemillet

@emiliemillet

Thanks, I saw your previous comment. Thanks for reporting that issue.

davidgohel avatar Jan 24 '18 10:01 davidgohel

@Lukas-1 @emiliemillet sorry for the delay... Having a whole expression in a single textbox is not possible as this is made by R internally. It's now far better but there are cases in ?plotmath that I don't know how to solve for now:

  1. Alignment, I don't know how but I think I will find (one day) a fix
  2. Ability to display all plotmath symbols, I don't believe this can be solved. Fonts are not always containing the necessary glyph required by plotmath.

davidgohel avatar Feb 06 '18 00:02 davidgohel