Putting it all together

Hello, I want to write an academic paper with obsidian and R. I need to use R with the bookdown package or the distill package to generate the paper.
Within R I will push the html file to my GitHub repository or I generate a pdf-document.
What is the appropriate way to combine md files within obsidian an getting them in a logical order for a single file (.md) that I can then use in R?

I don’t use R, so it may not be the same… But I use pandoc to convert my .md to latex. I just copy-paste the various files into one for that purpose, no hassle at all. I use inline footnotes, but don’t think that makes a difference.

1 Like

If you are comfortable with the command line, this is the intended purpose of cat.

cat file1.md file2.md file3.md > combined_file.md

It also works across a directory with glob expansion:

cat project/*.md > combined_project.md

cat should be available on any Linux or Mac machine.

I create a note with the links to notes that I want to include in my draft — a python script then collects them into one .md draft and sends it to pandoc > to > PDF. You can try the same approach — just process the final .Rmd with bookdown.

Hello, that’s sounds good. Can you giva a exampale of your python script. THX.

I use Windows … :frowning:

type is an equivalent to cat that is built into Windows:

type file1.md file2.md > result.md
2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.