Subtitle in R Markdown/pandoc/slidy document?

1,723 views
Skip to first unread message

Michael Hannon

unread,
Jun 18, 2013, 7:14:20 PM6/18/13
to kn...@googlegroups.com
Greetings. Is there a way to specify a subtitle for Markdown/pandoc/slidy
slides?

Putting the following at the beginning of the R Markdown file works fine:

% Stat 314159
% Michael Hannon
% 2013/06/18

but I want to get a description of the course as a subtitle. I noticed that
continuation lines are allowed in pandoc, as:

% Stat 314159
    An Introduction to Uniformly Most Wonderful Estimators
% Michael Hannon
% 2013/06/18

but they don't provide a newline in the output. I.e., the result is:

Stat 314159 An Introduction to Uniformly Most Wonderful Estimators
Michael Hannon
2013/06/18

I'd like to get the output to look something like:

Stat 314159
An Introduction to Uniformly Most Wonderful Estimators
Michael Hannon
2013/06/18

I.e., the course name and description would be on separate lines. Can I do
this?

Thanks.

-- Mike









Link









Greetings. Is there a way to specify a subtitle for Markdown/pandoc/slidy
slides?

Putting the following at the beginning of the R Markdown file works fine:

% Stat 314159
% Michael Hannon
% 2013/06/18

but I want to get a description of the course as a subtitle. I noticed that
continuation lines are allowed in pandoc, as:

% Stat 314159
An Introduction to Uniformly Most Wonderful Estimators
% Michael Hannon
% 2013/06/18

but they don't provide a newline in the output. I.e., the result is:

Stat 314159 An Introduction to Uniformly Most Wonderful Estimators
Michael Hannon
2013/06/18

I'd like to get the output to look something like:

Stat 314159
An Introduction to Uniformly Most Wonderful Estimators
Michael Hannon
2013/06/18

I.e., the course name and description would be on separate lines. Can I do
this?

Thanks.

-- Mike


baptiste auguie

unread,
Jun 18, 2013, 7:24:42 PM6/18/13
to Michael Hannon, kn...@googlegroups.com
you can define your own tag and pass it with -V to pandoc, e.g.

variable: address="3, Earth St, the Moon"

in your config file (and appropriate use in the template file).

HTH,

baptiste




--
You received this message because you are subscribed to the Google Groups "knitr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to knitr+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Michael Hannon

unread,
Jun 19, 2013, 6:03:08 PM6/19/13
to baptiste auguie, kn...@googlegroups.com
Thanks, Baptiste.  In this case I used the command:

pandoc -s -S -i -t slidy --mathjax --variable title:"Stat 314159<br>An Introduction to Uniformly Most Wonderful Estimators" test.md -o test-slides.html

i.e., inserting the HTML tag "<br>" in the middle of the title.  That worked just fine.

-- Mike

Yihui Xie

unread,
Jun 19, 2013, 6:06:05 PM6/19/13
to Michael Hannon, baptiste auguie, kn...@googlegroups.com
Interesting. I'm curious if this also works:

% Stat 314159 <br>
An Introduction to Uniformly Most Wonderful Estimators
% Michael Hannon
% 2013/06/18

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Phone: 206-667-4385 Web: http://yihui.name
Fred Hutchinson Cancer Research Center, Seattle

Michael Hannon

unread,
Jun 19, 2013, 6:10:51 PM6/19/13
to Yihui Xie, baptiste auguie, kn...@googlegroups.com
Doh!  Yes, of course it does!  Thanks, Yihui.

-- Mike

Ramnath Vaidyanathan

unread,
Jun 19, 2013, 6:16:24 PM6/19/13
to kn...@googlegroups.com, Yihui Xie, baptiste auguie
If you are looking to create HTML5 slide decks purely from R without any pandoc dependency, I can recommend Slidify, an R package that I authored.

You can get some idea of different styles by browsing through the examples here"


It doesn't support Slidy currently, but it is easy enough to add, if you have a strong preference for Slidy.
Reply all
Reply to author
Forward
0 new messages