Skip to content

Commit

Permalink
add org mode code block
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbudzynski committed Apr 15, 2024
1 parent 156150e commit 773d8ae
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions _drafts/org-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ mode, how to set it up, and how to use it. Instead, I will focus on how to use
org mode to write C++ code blocks and export them to HTML or PDF. For a beginner
friendly setup, try [Doom Emacs][3]. It is a pre-configured version of Emacs.

Org mode, similiar to Jupyter notebooks, allows you to write code blocks in the
file and execute them. The source block looks like this:

```org
#+BEGIN_SRC cpp
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
```

[1]: https://orgmode.org/
[2]: https://www.gnu.org/software/emacs/
[3]: https://github.com/doomemacs/doomemacs
Expand Down

0 comments on commit 773d8ae

Please sign in to comment.