The most commonly used elements in a lab notebook are text, tables and images, which can be easily organized in Markdown files. This can be greatly facilitated by a modern text editor, such as Visual Studio Code. The most important feature of an electronic lab notebook is to trace editing history, which can be conveniently achieved by Git.
1. Use Markdown to organize text, tables and images
-
Learn markdown basics here.
-
Practice markdown following this tutorial.
-
Use Markdown to make a table:
| Col 1 (left aligned) | Col 2 (center aligned) | Col 3 (right aligned) | | :--- | :---: | ---: | | aa | ab | ac | | ba | bb | bc | | ca | cb | cc |
The rendered output looks like this:
Col 1 (left aligned) Col 2 (center aligned) Col 3 (right aligned) aa ab ac ba bb bc ca cb cc The “Markdown Table” extension by Takumi Ishii is very helpful to facilitate table editing and formatting in Markdown files. It also enables copying from an Excel spreadsheet and formatting the TSV content into a Markdown formatted table, among other features.
-
Use Markdown to link an image (or any other files):
![image alt text (displays when image fails to load)](/path/to/image.png)
-
It is highly recommended to use a modern text editor, such as the Visual Studio Code (VS Code), to facilitate markdown editing.
- For example, in VS Code, you can drag a picture (or any other file) into the markdown file while holding the
Shift
key to insert the formatted text. - There are also many – probably too many – choices of extensions for markdown. I have been using “Markdown All in One,” “Markdown PDF,” “markdownlint,” “Selection Word Count,” “Markdown Table,” “Rainbow CSV,” and “Excel Viewer.”
- For example, in VS Code, you can drag a picture (or any other file) into the markdown file while holding the
2. Use Git and GitHub for version control and cloud backup
If you are new to Git, I highly recommend the Software Carpentry Lesson for Git. Specifically, you can:
-
Learn basic concepts of Git here.
- Install Git.
- If you are using a new Mac, you probably have a quite new version of Git installed. Check by typing
git --version
in your terminal. If the version number is close to the current version, you can just use the pre-installed version. - Otherwise, follow instructions here to install Git on Windows, Mac or Linux systems.
- If you are using a new Mac, you probably have a quite new version of Git installed. Check by typing
-
Set up Git on your computer.
- Use GitHub for cloud backup.
- It is recommended to use SSH connections.
- If you are using VS Code, you could easily commit and sync changes within the VS Code interface. If it keeps asking for the SSH passphrase, you can open a terminal window (inside VS code) and run
ssh-add
, which will ask for the SSH passphrase once and VS Code should no longer ask for it.