Comments (5)
The highlight boxes look very nice. Thanks for the update. Maybe one suggestion. Perhaps instead of defining styles by a shortened name, like
<style>
.highlight_base_Youshouldknow {
background-color: #88FF8F;
padding: 0 2em 1em;
margin: 2.5em 2.5em 2.5em 2.5em;
}
</style>
perhaps it may make more sense to have a style_class argument, like
#< highlight style_class="mystyle"
and then define CSS styles like
<style>
.highlight_base_mystyle {
background-color: #88FF8F;
padding: 0 2em 1em;
margin: 2.5em 2.5em 2.5em 2.5em;
}
</style>
So you can easily use different forms of highlights, like warnings, remarks, etc...
from rtutor.
Another remark:
I have updated the automatic hint for dplyr chains (mostly relevant if there are still placeholders ___
), which looked very ugly so far:
d727b11
I now also set show.revert.btn=TRUE by default in show.ps:
f1a9446
There still seems to be sometimes as bug that the given code vanishes in the shiny version, when RTutor automatically jumps to edit the next chunk when the previous chunk was successfully checked. Have you also observed this behavior? I had not yet time to dig deeper into it. Such bugs at only appear sometimes are always tricky to debug. But at least with the "Original Code" button users can always retrieve the originally given code, should that bug occur.
from rtutor.
Thank you for your suggestion! I still opted for the named block as the default case as I want it to make it as easy as possible for the author to write content without having to think about design.
Nevertheless it is now possible to completely seperate content and style, which might be useful in some instances: https://leveragedata.shinyapps.io/HighlightExample/
We do indeed use different forms of highlights (in particular Attentions and Remarks) but those always have the same title within their class (i.e. I want to have always the same design for all Attention Blocks). With the class feature it is now possible to have seperate groups of designs within the same title-group.
It also allows to have varying titles with the same design which was not a use case I previously thought about, as I currently only use strictly defined groups in my courses.
Regarding the other points:
Thank you for your info regarding the dplyr hints and the show.revert.button. I have both integrated.
Yes, we also experience this bug - and have unfortunately currently no good lead regarding its source. If you fix it, a note would be nice. Should we stumble upon the solution, we will open a new issue.
Regarding future development of our fork: Most of the previous changes where aimed at reducing time and complexity of the author(s) (The Highlight Boxes for example where previously achieved by using html hax and the aftercare shiny -> html script by manual processes). I think the most pressing issues are now resolved.
Maybe I will introduce an tag which can be used within html blocks to allow rmd formatting within a html block. This is relevant if for example one has formatted html-tables (instead of rmd-tables) and wants for example to use Math-Syntax within a cell. This is currently rather inconvenient as rmd-code does not get interpreted within html tags and manual MathJax is not very authorfriendly.
The next big thing will most likely be a complete extraction of all user-sided texts and putting them in a language file for roll-out in different languages (e.g. German but also to allow course-specific Texts independent of the specific task).
from rtutor.
Just some short thoughts on your comment:
Maybe I will introduce an tag which can be used within html blocks to allow rmd formatting within a html block. This is relevant if for example one has formatted html-tables (instead of rmd-tables) and wants for example to use Math-Syntax within a cell. This is currently rather inconvenient as rmd-code does not get interpreted within html tags and manual MathJax is not very authorfriendly.
Hmm, not sure whether writing something like
<table><tr><td>
#< md
$x^2$
#>
</td></tr></table>
is more convenient than the pure HTML solution
<table><tr><td>
\(x^2\)
</td></tr></table>
Perhaps, if you don't want to teach your co-workers a bit HTML, it might be more convenient to define an outer block, like #< md_html
so that all HTML text inside will be rendered as markdown. But it is not clear to me how easy that is to implement. This discussion may help (you could use commonmark for rendering such blocks):
https://stackoverflow.com/questions/29368902/how-can-i-wrap-my-markdown-in-an-html-div
Alternatively, you use some rvest
& htmltools
function to acces the text attributes of all html elements and run a markdown converter on them.
from rtutor.
Thank you for your input! I did not know this command - this is a lot more elegant than what I did until now. I suppose stuff like emphasize and bolding etc. is not to difficult so when the Math Stuff ist taken care of this certainly lowers this issue a lot in the priority list.
from rtutor.
Related Issues (20)
- Duplicated exercise names cause errors HOT 1
- Pre-run code chunks? HOT 4
- Installation issue; HOT 6
- Running example chunk HOT 5
- Test that would allow open text HOT 6
- Controlling the width of the quizzes HOT 2
- Window Position when clicking on "Go to next exercise..." HOT 2
- Executing invisible code HOT 4
- Deletion of columns deletes more columns than expected HOT 3
- New Options regarding rtutor.app.skel HOT 4
- "Go to next exercise" Button does not trigger generation of code chunks HOT 2
- Desired behavior of check.assign HOT 1
- Width of Quizzes HOT 2
- Cutoff for Exercisename HOT 3
- Major update Branch LeverageData (mostly regarding quizzes) HOT 4
- hints based on check.call HOT 9
- Updates in RTutor Main Branch HOT 5
- Question regarding mark_utf8 HOT 1
- Warning: Error in : colourInput() has been moved to the 'colourpicker' package. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rtutor.