How to make footnote into tooltips in Blogdown? - r-markdown

I'm using Rmarkdown to make a blogdown post, and I'm hoping to implement something I saw in Hadley Wickham's Advanced R online book, which is a footnote link that when clicked on opens as a tooltip instead of in the footer of the page. See image below for an example.
I have no idea how he did this and I couldn't find any options in the source code that reference footnotes or tooltips. In the source for this page, the footnote is just a regular footnote (no special packages appear to be used). Thank you for your help!

Related

Use markdown syntax in markdown chunks

I'm using bookdown to write my math notes, bookdown provide an feature that one can use
```{theorem}
{theorem content}
```
to write theorems and auto numbered.
However, my preview tool does not realize i'm still wring markdown and the preview will look like
Is there any way to solve it?
Quoting cderv in the issue you reported on GitHub:
There is a new way to write this environment using custom blocks syntax. It is in NEWS but not yet documented in the book. Will do soon.
You can use
::: {.theorem #label name="name"}
<any markdown syntax content>
:::
It works for HTML and PDF output.
I don't know what "other preview tool" you are referring but the content inside this block will be markdown, so I think it will be better for your usage.
The new RStudio Visual Markdown editor helps a lot to write and see those divs !
https://blog.rstudio.com/2020/09/30/rstudio-v1-4-preview-visual-markdown-editing/

Multipage bookdown into article

I'm considering to use Bookdown to write an academic paper. This includes the data processing and analysis code, plus everything else.
I know how to use Bookdown to write books where each .Rmd document creates its own .html page and a book chapter in a LaTeX PDF. I can also see how to use bookdown to write a single .Rmd that becomes a multi-page website and an article-style PDF. At least, that is what I think I see in the bookdown documentation
But what I am trying to figure out is how to have multiple .Rmd files that become a single article-style PDF. I want to have more than one .Rmd to keep the runtime down and my work somewhat organized, but I am not writing a book. It seems as though bookdown is built to turn document breaks into chapters, and I want them to be turned into sections. Am I missing something obvious, or is this going to require a bit of hacking to make it work?
It seems your actual question is how to turn the top-level headers into sections instead of chapters. It depends on the documentclass field in index.Rmd. The default value of this field is article, which means you get sections instead of chapters. Top-level headers are converted to chapters only if the documentclass is for books (e.g., documentclass: book here: https://github.com/rstudio/bookdown-demo/blob/master/index.Rmd#L7).
Then, to render multiple Rmd files to a single PDF, use bookdown::render_book() instead of rmarkdown::render().

R markdown show markdown output in .Rmd

I remember there was a time that when you type # in R markdown it will immediately transfer to the heading output. Also, when you type **bold** it will immediately show the text in bold. But now I can't find a way to do this.
Is it possible to show the markdown output in the .rmd document? Thanks!
This behaviour will depend on the text editor you use. Some Markdown editors have a "What You See Is What You Get" (or WYSIWYG) philosophy that will do exactly what you describe. You can find examples of WYSIWYG Markdown editors online, I personally have only tried Typora. But as far as I can tell, none of them seem to support Rmarkdown (perhaps someone has made an Rstudio add-in?).
On the other hand, in the early days of knitr, it used to support Lyx (I don't know if it still does), which is maybe closer to what you have in mind? See this post for an example: https://yihui.org/knitr/demo/lyx/

C++ Builder Syntax Highlighter

I have searched on the Internet how to do this, but I can't find how.
I need to colour specific words in RichEdit, such as the words false and true.
TRichEdit is not well-suited for syntax highlighting (use something more like SynEdit instead), but it can be done. Basically, you need to highlight the desired text, and then set the selected text's attributes, like color and formatting. You can do that with the TRichEdit::SelStart, TRichEdit::SelLength, and TRichEdit::SelAttributes properties. Or you can use the corresponding Win32 API EM_EXSETSEL and EM_SETCHARFORMAT messages directly.
See Robert Dunn's excellent article on this very topic: "Faster Rich Edit Syntax Highlighting". The Original article first appeared in the C++Builder Journal in October 1999, and is also available for download on Robert's "Yet Another Code Site" website (which is archived on my website).

RTF to Wiki Converter?

I would like to convert 100+ RTF files to Wiki Markup, but I can only find "Wiki to RTF" converters on the web and even here on StackOverflow.
I only need RTF --> Wiki Markup
Is there anything like this out there?
I simply asked the wrong question.
Did some research and found out that there is no Converter which converts RTF directly to a "Wiki format".
The "better" question: Save Word file as Wiki markup.
There are some approaches using Microsoft Word to save as .txt (Wiki markup):
http://www.mediawiki.org/wiki/Extension:Word2MediaWikiPlus
http://www.microsoft.com/en-us/download/details.aspx?id=12298
http://techwiki.openstructs.org/index.php/Wiki_converters
http://www.consumingexperience.com/2008/03/convert-word-doc-or-webpage-to-wiki.html
Good luck!
It may be unwieldy with hundreds of files, but I have used wikEd to convert RTF and Word formatted text to wiki markup.
Wikedbox is a usable implementation of wikEd without installing it:
http://www.appropedia.org/index.php?title=Appropedia:Wikedbox&action=edit
'''Wikedbox HELPS YOU CONVERT HTML (WEB FORMATTED CONTENT) TO MEDIAWIKI.'''. More instructions at [[Appropedia:WikEd]].
INSTRUCTIONS:
If you're not in edit mode, click the "edit" tab now.
Paste in your content.
Click the red [W] to convert. (Middle row, second block from the left.)
Your text is ready to be copied and used on your wiki page. (You may need to make further corrections.)
'''DO NOT SAVE THIS PAGE'''. (You'll be blocked from doing so, anyway, unless you're an admin.)
You can use Pandoc:
pandoc -s README -o example.rtf
This will convert your file to Markdown. I don't know which Wiki you want to use and If it understands Markdown, but I thinl you can also convert it to MediaWiki or other output formats (see the Pandoc User manual).