I am writing a book using markdown and bookdown. To submit, it is required that the bibliography is collected in a separate chapter at the end of the book.
In other words, instead of bibliography at the end of each chapter, there should be another chapter containing the bibliography lists, split into sections by chapter.
So, instead of:
Chapter 1
Section 1.1
Section 1.2
Bibliography for Chapter 1
Chapter 2
Section 2.1
Section 2.2
Bibliography for Chapter 2
The output should be
Chapter 1
Section 1.1
Section 1.2
Chapter 2
Section 2.1
Section 2.2
Bibliography
Bibliography for Chapter 1
Bibliography for Chapter 2
I am at loss how to produce that with bookdown, short of manually editing the resulting document. With LaTeX, several solutions come to mind, but I need to produce a single Word file for them.
Any ideas?
Related
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!
the books says to run calculator01.cpp but I can't find it anywhere.
I've tried Where is Bjarne C++ PPP book calculator example code?
but gives me Forbidden access when accessing it.
The chapter is chapter 6.
You can download all the code from the book at Stroustrup's site as well, at:
https://stroustrup.com/Programming/code.tar
The filenames are based on the chapter names, not the names in the text; so for calculator01.cpp, which appears at the beginning of section 6.7, you'd be looking in the code/Chapter06 folder for chapter6.7.cpp - this would be identical to calculator01.cpp.
(The code.tar file above is technically for the first edition of the book, not the second; however, aside from typo corrections, chapters 6.6 and 6.7 are identical in both editions. So this particular bit of code works with either edition.)
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().
Here is the scenario. I have an XML document which contains tags. I want to create a transform that does this
<tag>content A</tag> 1. content A
<tag>content B</tag> ----> 2. content B
<tag>content C</tag> 3. content C
but only if the tag contents appear on the same physical page. The numbering should restart on each new page. Is there any way to do this using XSL-FO? I know with latex the only way to accomplish something like this is to run latex twice, with the interim document used to determine content page placement.
As far as I can tell (and as confirmed by the Antenna House tech support team), there is no way to do this using standard XSL-FO. Antenna House offers <axf:footnote*/> extensions which include the ability to set an axf:footnote-number-reset="page" attribute, and as suggested in the comments, RenderX offers a generic mechanism which might be used for this purpose, but both of these involve vendor-specific extensions to the language.
This points to a number of shortcomings in XSL-FO that really should have been addressed a long time ago with a 2.0 version of the specification. A w3c committee to develop an XSL-FO 2.0 spec was formed and then disbanded quite some time ago; I have no idea why, as I find the tool indispensable for a large class of document to PDF conversions.
I've been reading the documentation all night and still can't figure it out.
How do I get the chunked output to include a ToC on the "front-page" of each chapter (and larger parts)?
Both the DocBook-XSL documentation and the online HTML version of "DocBook XSL: The Complete Guide" implement this, so at least I'm not entirely insane as far as it being at least possible…somehow.
The solution was staring me square in the face, I couldn't see the proverbial forest for all the trees I suppose.
Obviously, the parameter that controls this would be generate.toc, so after modifying my stylesheet to include—
<xsl:param name="generate.toc">
appendix toc
book toc,title
chapter toc
part toc
</xsl:param>
—it all rendered beautifully as one'd expect…