How to modify style (margins, background color) by page individually in rmarkdown? - r-markdown

this probably is a simple question to answer but I'm having trouble to get answers. I want to create a pdf document with rmarkdown where the first page (cover page) has a background color different from the rest (the body), also different margins sizes. How can you achive this?
In the YAML you can set the margins and the background colors when "kniting" to pdf but these settings are applied to all pages.

Related

how to change apache superset's chart's background color?

Per How to Change Apache Superset Template from the Superset User Interface? , I was able to change the CSS template for Superset dashboard. But the charts inside the dashboard are not affected. e.g. most of the charts have white colored background(e.g. Piechart) and some people dislike it. How to change the chart background color? I mean change it for all charts or for one chart.
Disclaimer: This should work, but is a bit hacky and could have long-term support implications:
I've been fiddling with a "dark mode" dashboard just to kick the tires on this. Here's a screenshot just for fun:
So... what did I do?
Click "Edit Dashboard" in the top right of your screenshot
When in edit mode, the top right menu has an option to "Edit CSS"
Use your browser's inspector to hack away! That said, here are a couple of key ingredients:
.dashboard-component{ background: whatever} - sets the main background of each viz card, but you'll still see many components still have white backgrounds within these wrappers.
.slice_container svg{
background-color: transparent !important;
} - this overrides the white background of the components I ran into (including Pie charts!).
If viz components use SVG you can get pretty clever with inspecting/overriding various bits. A couple of gotchas with the above:
If a viz component contains multiple SVG elements, this may have side effects.
If a viz uses canvas instead of svg you will run into more trouble
In the worst case scenario, you may need to check out the superset-ui-plugins repo and make tweaks. This dev process isn't super straightforward, but some of us are working to improve that.
Easiest solution for me is using dark reader extension.

Ownerdraw CListCtrl checkboxes

I want to add checkboxes to my CListCtrl-derived class, that has LVS_OWNERDRAWFIXED-style for drawing them in any subitems. I can draw them simple inside DrawItem member function, but it look a little bit bad. How can I retreive the images of checkboxes, which are used for this control, if the LVS_EX_CHECKBOXES-style is set? It is important, because in each Windows version those checkboxes have its own unique look.
Is it possible?
You call OpenThemeData() to get the current theme's handle and then GetThemeBitmap() to get the images for the checkboxes.
Also have a look at the other GetThemeXXXX() functions to get the correct background
color, text color, font etc.
I also recommend you to play around with ThemeExplorer, it should give you
a great overview how visual styles work. The best thing is, the tools actually uses
OpenThemeData() & co. to render a preview of the controls, so check out its source code (main.cpp, Line 142+) as well!

Add text to a picture using photoshop

I want to know if exist templates to add text on photoshop like in the following pictures:
http://sphotos-e.ak.fbcdn.net/hphotos-ak-ash4/485070_566956359990277_263279122_n.jpg
https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash4/3263_403189956409783_609225582_n.jpg
Could you suggest some pages where I can study and try those effects ?
Thanks.
Step1: Find the fonts. Search on font sites for similiar fonts or try to cut out the font and upload it to http://www.whatfontis.com/ or http://www.myfonts.com/WhatTheFont/
Step2: just play around with blending options and stuff.
from what I can see it's these settings you want too look at:
"Notche Latina": Gradient overlay, white stroke and black dropshadow.
"photo recoblablabla": inner shadow and might be in overlay-mode or something
"Festival de la bira": once again, white stroke
First make a layer adjust the objcet on layer as per your requirement.
Add some effects from filter gallery if you required (or layer style).
Click on the text toolbar type your text (required text).Then to apply effects
right click on text layer and click on rasterize type.now you can add effects from the filter gallery to the text.(or Layer style eg-inner shadows,bevel and emboss).

Set background color of an PDF generated using libHaru

So I am trying to set background color in C++ using libHaru for my new pdf.
I am having issues setting it. Searched through documentation and either was not there
or I missed it.
Anyone who knows how to set background color for pdf page?
Also any comments on libHaru? Would you recommend it etc would be awesome.
Thanks
There is no background color for a PDF page. If you want to make the page red, for example, you draw a rectangle that covers the page and fill it with red.

Chart templates, color schemes and font sizes

I'm trying to automate some PowerPoint charts, but I'm having problems preserving some formatting.
When I add a chart using a chart template, the chart doesn't use the slides color scheme, but rather the colors it was saved with. It doesn't help to change the color scheme for the slide - the chart isn't updated. To make the chart update to the color scheme of the slide, I have to clear formatting for the chart. The problem with doing this is that all font sizes are automatically set to 18pt. I cannot find any easy way restore the font sizes for the chart without saving all sizes before calling clear, and set them back after clearing.
Have you looked into using the Format Painter function it may or may not work depending on a variety of factors from my quick look on the net (google it for lots of articles).
Also if you've done one chart you should be able to copy the formatting from one chart to another using the paste special option as mentioned here http://www.pcreview.co.uk/forums/there-format-painter-equivalent-use-many-charts-t3611646.html .