-
Notifications
You must be signed in to change notification settings - Fork 18
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
Blockquote #14
Comments
Referring here to our earlier discussion of how the blockquote should appear, have you had a chance to think about this further? Many thanks! |
I have just noticed that blockquotes now have a grey background (as in bookdown: thanks), but that they are indented and in italics, perhaps neither of which are necessary? With thanks. |
I quite like the indent & italics, but if you want to modify the style further, you can provide your own CSS file which will override the version provided in the package. For example the following should remove the indent and font style: blockquote {
width: 56%;
-webkit-padding-start: 0%;
-webkit-padding-end: 0%;
-moz-padding-start: 0%;
-moz-padding-end: 0%;
}
blockquote p {
font-style: normal;
} You can then save that in the same folder as your Rmd files and then include it in the YAML header. In the example below I saved it as output:
msmbstyle::msmb_html_book:
highlight: tango
toc: TRUE
toc_depth: 1
split_by: chapter
margin_references: FALSE
css: test.css and that gets me: You can use this same mechanism to modify almost any of the styling like header colours, fonts sizes, table borders etc. |
Thank you: this is very helpful! Other than a stylistic preference, one of the disadvantages of using italics is that any footnote on a blockquote also appears in italics. I have included your suggestion in our css, and I notice two things (see image):
`.siteHeader { .siteHeader-logo img { .siteHeader a { .siteHeader-back a:hover { @media (max-width: 760px) { #TOC { #TOC p.title { #TOC ul.navbar { #TOC ul.navbar li .dropbtn { #TOC .author { #TOC .msmb { #TOC .dropdown-content { /* Add padding to compensate for fixed headers */ /* Set the default paragragh styling */ h1 { h2 { .btn { html, body, input, *, textarea, select, p, li, label { h1, h2, h3, h4, h5, h6 { h1 { h2 { h3 { p a:link, p a:visited, td a:link, td a:visited { p a:hover, td a:hover { blockquote { blockquote p { With grateful thanks. |
To my eyes the font in your block quote is correct, it's just scaled up. It looks like the sizing specified in the tufte package is taking precedence so you need to set it to be the same as for the rest of the book. I hadn't accounted for the impact making the block quote full width would have on the side notes. I think these two can be fixed with the following: /* remove italics and set size */
blockquote p {
font-style: normal;
font-size: 1.2rem;
}
/* restore spacing for notes in quotes */
blockquote .sidenote {
margin-right: -60%;
width: 50%;
} |
Thanks again! Your comment on the text is correct, and this CSS fixes it, as you can see here: But the code to restore the spacing is not quite correct. By experimentation I found that this
sorts out the margin, thus: but then the margin is insufficiently wide. It would also be nice to know how to un-indent the blockquote (as I think the grey background is sufficient indication that it is something different). Many thanks! |
Sorry, the intention was to also use this part from the previous post, which gets rid of the indentation blockquote {
width: 55%;
-webkit-padding-start: 0%;
-webkit-padding-end: 0%;
-moz-padding-start: 0%;
-moz-padding-end: 0%;
} |
Ah...I feel that my ignorance is showing! When this project is completed I need to try and find some time to study CSS... Thank you, and all is now well with the blockquotes. |
Yes, I agree. At the moment msmbstyle is just piggy-backing on the tufte package, and that seems to define block quote as a simple indentation, which doesn't seem in the spirit of how blockquote is supposed to be used. I'll have a look at some examples and maybe refine it a bit, but I'll try to keep the side notes inline when I do!
Feel free to ask questions / make suggestions about the CSS, it's not my forte either. Glad you're finding the package useful, and I'd be very excited to see it used elsewhere in the wild.
Originally posted by @grimbough in #8 (comment)
The text was updated successfully, but these errors were encountered: