Skip to content
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

Improvements to bookdown formats -- see 'issue' discussion #3

Open
2 of 6 tasks
daaronr opened this issue Nov 10, 2020 · 14 comments
Open
2 of 6 tasks

Improvements to bookdown formats -- see 'issue' discussion #3

daaronr opened this issue Nov 10, 2020 · 14 comments
Assignees

Comments

@daaronr
Copy link
Owner

daaronr commented Nov 10, 2020

  • Centralise process for bookdowns; make them uniform except where warranted otherwise

  • Fonts, alignment, spacing etc (continuous improvement)

  • colored display blocks (e.g., '{block2, type='warning'}) -- add small images/signposts (e.g., a stop sign)

  • hand-coded tables: larger font

  • change label 'unfold' to label 'answer' for some relevant boxes

  • Make 'hide code' the default ... have the button say 'show code'

@daaronr
Copy link
Owner Author

daaronr commented Dec 30, 2020

@oskasf This is now a pretty high priority, but more in terms of a 'Profusion Data Academy spinoff'. I got some feedback on the presentation of that bookdown, and I'll start that as a new issue.

@daaronr
Copy link
Owner Author

daaronr commented Jan 19, 2021

@oskasf Can you check out and help out a bit with the formatting and building in 'metrics_notes'?

  • It's choking on a lot of 'missing references'
  • When you click on some chapters, other chapters disappear ... e.g., click on chapter 18 and chapters 16-17 disappear

image

@daaronr daaronr changed the title Improvements to bookdown formats (esp for teaching) -- see 'issue' discussion Improvements to bookdown formats -- see 'issue' discussion Feb 9, 2021
@daaronr
Copy link
Owner Author

daaronr commented Feb 9, 2021

@oskasf Turned the above list into tick-boxed we can check when done

Maybe each of these should be a separate issue but they tend to be interconnected

Added: - [ ] Make 'hide code' the default ... have the button say 'show code'

In most cases people seeing these will prefer 'no code' and be overwhelmed by code, and may not even realise they can hide it

@oskasf
Copy link
Collaborator

oskasf commented Mar 2, 2021

"Make hide code the default" - Note to self see here, here and here

@daaronr
Copy link
Owner Author

daaronr commented Mar 3, 2021

image

The button looks good, but code is hidden and pushing the button doesn't do anything @oskasf.
Perhaps its something to do with other settings I have in the project? Can you try to see if you can get it working in one of the actual projects?

@oskasf
Copy link
Collaborator

oskasf commented Mar 4, 2021

I had this working in metrics_discussion yesterday. Which project are you trying it with?

@daaronr
Copy link
Owner Author

daaronr commented Mar 5, 2021

Was working in a (private Repo) Rethink Priorities project. Now its working for me for the Metrics bookdown, at least, so I'll look for differences between the two projects, thanks!

@daaronr
Copy link
Owner Author

daaronr commented Mar 9, 2021

@oskasf in metrics_discussion_work, I think some of the things in the index file are also done in project_setup.R. Could you check for and remove duplication when you get a chance?

@daaronr
Copy link
Owner Author

daaronr commented Mar 9, 2021

OK @oskasf the 'hide code by default' is [correction 'now'] working in that bookdown. It was the line

knitr::opts_chunk$set(echo = FALSE, warning= FALSE)

that was messing it up (that hides all code, not even allowing any folding)

@oskasf
Copy link
Collaborator

oskasf commented Mar 9, 2021

@daaronr I only saw one particular chunk of code which was duplicated in metrics_discussion, have removed this now.

Does removing that line fix the code hiding or is it still broken?

@daaronr
Copy link
Owner Author

daaronr commented Mar 9, 2021

Sorry, my previous message had an error. It now IS working :)

@daaronr
Copy link
Owner Author

daaronr commented Mar 19, 2021

Wait, it is now showing code by default in the Bookdowns I've been working on. @oskasf can you point me to the code line that determines this?

@oskasf
Copy link
Collaborator

oskasf commented Mar 21, 2021

@daaronr
So the approach is a bit involved. I followed the advice here and incorporated this into bookdown_template/support/header.html
This does look quite involved however it was seemingly the only way to do this (much easier to show all by default and then hide than the other way around).

@daaronr
Copy link
Owner Author

daaronr commented Mar 23, 2021

It's still seems to be showing, not hiding code by default and I'm using the latest header. Is it doing the same for you @oskasf ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants