Writing, Citing, Sharing

In this article I will explain how to use Zotero and Zettlr to write, cite, and share a piece of academic writing.

First I will explain the key term that I use to explain how these softwares work, and then I will walk you through the actual writing part.

Key terms

Metadata
Metadata is data about data. In our context, data refers to books, journal articles, videos, interviews etc. Let us consider a book for instance. Metadata of a book would be data about the book, i.e., its title, the people who wrote, edited, and translated it, its ISBN number, its publisher, the place of publication, page count etc. In the case of a book, the copyright page will hold this data. For an interview, the metadata would include information such as the name of the interviewer, name of the interviewed, date, place, the publication where it appeared etc.
Item
An item, in Zotero, is the collection of metadata about an object such as a book, an article and so on. In other words, all the data about a specific object is an item. So (Title+Author+Publisher+Date+Place+ISBN+Language) is an item that refers to a book. The actual book itself (a PDF or EPUB file) is attached to this item. So the item is not the book itself but the data about the book. The book (a file) is an attachment. Thus, metadata is just description whereas the attachment is the real book itself. This means that metadata takes up very tiny amount of space in the computer (it is just textual description) whereas the attachment (the file) can be large. You insert items into Zotero by clicking a button in the web browser or by adding it manually.
Attachment
In Zotero, an attachement is something that is attached to an item. This attachment can be a web page, a file (any kind of file), a note and so on. So to an item (metadata), we can attach a book (file), or a note about the book, or a web page that refers to the book and so on. Or maybe you are reading a wikipedia article, in which case the metadata will be the link, the name of the website, title of the article, date of accessing and so on. In that case the attachment will be the actual webpage.
Markup language and Markdown
Imagine that you are want to tell the computer that a particular term must be displayed in bold and something else should be displayed in italics, or that some phrase is a title and so on. Usually we would select the text and type ctrl-B or click the Bold button in the word processor. But instead of doing that, it is easier to tell the computer that a term should be displayed as bold, or that a sentence is supposed to be displayed as a footnote, or as a title or as a subtitle and so on. The language in which you tell the computer these things is called a markup language. There are many types of markup languages, such as HTML. So in HTML, I would surround the word I want to be displayed as bold with tags, which will tell the computer that the word should be displayed in bold. It looks something like <b>term</b> A paragraph will be marked as a paragraph by surrounding the paragraph with the tags <p> and </p>But writing an entire article will take a lot of time if we have to surround everything with tags. So, we will use another markup language called Markdown. Markdown is easier because it simply uses symbols to label terms and phrases. A bold term will be written as **term** and an italic term would be written as *term*A footnote will be marked like this: ^[This sentence will appear as a footnote.] A main title will be written as # This is the title and a sub title will be written as ## This is the subtitle and so on. You can go up to six levels of titles, i.e., ###### Sixth level title Similarly we can indicate a citation using the format @authoryear where author refers to a shortened version of the author’s name, and year refers to the year of publication. This @authoryear is called a citekey. It can be of other forms also, such as @authoryeartitle
Word Processor
A word processor is a software in which you write text, then manipulate the text to appear as bold, italics, title, footnote and so on. MS Word is a word processor. In a word processor, you click various buttons and menus to make text appear as bold, title, footnote etc. But when you click a button and make something bold, then the word processor will display it in bold type. When you click a button and make something italic, it will be shown to you in italics. In other words, what you see in the screen is what you get. How this is done by the processor is that it surrounds the text that you want to make bold with some code which tells the computer that it should be displayed in bold. So, when you see a bold term in MS word, the actual process that happens is MS Word inserts extra code to tell the computer that the term should be displayed in bold font. What this means is that if you were to open the same document in another software, it will not be able to read the hidden code which MS Word inserted and display the word in bold font. Same thing with the font you use. If you use Times New Roman in MS Word, then MS Word inserts hidden code into the document which instructs the computer that the computer should display the text in Times New Roman. In other words, when you open the same document in another software, it might not be able to read this hidden code and display the text with proper formatting. That is to say there is a ‘source code’ which is displayed as the document you want, and that this ‘source code’ is hidden.
Plain text
Plain text, as the term suggests, is just plain text with no hidden code. So you cannot make it bold, footnote, title etc. It is just letters and numbers and symbols. What this means is that any software will be able to read plain text. There is nothing hidden there. And all operating systems, all text processing software are able to read plain text. So writing in plain text assures you that whatever you wrote will be displayed as it is in any computer in the world. There is no separate ‘source’ for plain text. We use plain text to write markup languages including markdown. We just add some extra symbols to tell the computer which words should be bold, italics, footnotes and so on. A plain text file will have the extension .txt just like how MS Word documents has the extension .docx A plain text file written using markdown will have the extension .md We use text editors to edit plain text. Some examples are: Notepad in windows, Textedit in MacOS, gEdit in Gnu/Linux. Then there are many more editors such as Visual Studio Code, Sublime Text, Vim, Emacs and so on. Vim and Emacs come preinstalled in most operating systems. Most of these are free software.
BibTeX
BibTeX is how we markup metadata. Just like how we use markdown to tell the computer that something is a footnote and something is a title, we use BibTeX to tell the computer that something is a book’s title, something else is an author’s name, something else is the ISBN number and so on. It might look a little weird, but it is self-explanatory. Here is an example.
@book{foucault2002,
  title = {The Order of Things: {{An}} Archaeology of the Human Sciences},
  author = {Foucault, M.},
  year = {2002},
  series = {Routledge Classics},
  publisher = {Routledge},
  url = {https://books.google.co.in/books?id=dw_TaM5l5rcC},
  isbn = {978-0-415-26737-3},
  lccn = {39031285}
}

This tells the computer that we are referring to a book with the following characteristics. Here the citekey is foucault2002 and can be inserted in markdown as @foucault2002 A .bibtex file contains a collection of such entries. These files have the extension .bibtex

How this works

  1. I write something in markdown. I indicate title, subtitle, citation, bold, italics, block quote and so on using markdown. I write this in a plain text editor such as Zettlr.
  2. I instruct the computer to make this into a pdf/docx/ppt/HTML/XML or whatever kind of document I want.
  3. The computer reads the document and renders the text according to the instructions provided in the markdown description.
  4. Zotero, which stores the items, gives the computer a .bibtex file with all the items given in the BibTeX format.
  5. It also looks for the citekeys, searches the .bibtex file for corresponding entries, and then inserts it in to the document as a citation, and then also lists it in the bibliography section. All of this is automatic.
  6. You can use the same markdown file to generate a MS Word file, an OpenOffice file, a PDF file and so on.

If there are so many text editors available, why use Zettlr?

  1. Custom-built for humanities and academic writing.
  2. Automatically searches and inserts citekeys without you having to remembering or looking them up manually.
  3. Zettlr will export your markdown document into many many varieties of files including MS Word.
  4. Shows you the outline of the document (Headings, subheadings etc) so you can navigate a long document fast.
  5. Has pomodoro timer, writing statistics built in.
  6. Free and open source. So you can customise it to your liking.
  7. You can preview what your final document will look like while you are writing.

What is good about this?

  1. You just keep typing your document, never taking your hand off the keyboard. No need to mess with buttons and menus to insert footnotes. Just keep typing.
  2. The same markdown document can be used to create a Word document, a PDF and so on.
  3. No need to worry about citing correctly or building a bibliography section by hand. The computer does it for you.
  4. No issue of missing in the bibliography section an entry which you had cited in the main text.
  5. You can use any plain text editor to write the markdown document. No need to pay for MS Word. You can generate MS Word documents from the markdown document without paying for MS Word.
  6. Your markdown document can be read the same way in any computer in the world, no matter which OS it runs. No risk of incompatible MS Word installations and so on.
  7. You learn a few skills, support free and open source software, and generally gain more insight into the inner mechanisms of computing. The computer appears as a machine which you control than just a screen through which you access the internet.

What are the drawbacks?

  1. An hour to learn markdown.
  2. Collaboration is limited. There is no ‘Track Changes’ option.

How does this actually work? What is it that the computer does behind the scene?

A tool called pandoc scans your markdown document. It inserts bold, italics etc. as you have instructed using markdown. It also scans your .bibtex file and inserts citations and builds bibliography. Then it converts the completed document to the format you want. If you want a PDF, pandoc will use the LaTeX engine (a tool which lays out text in a beautiful way) to build the pdf. Zettlr includes pandoc and LaTeX, so you do not have to install them yourself. If you use a plain text editor other than Zettlr, you will have to install pandoc and LaTeX yourself, and these tools do not come with a software program which you can use with your mouse. They require you use the command terminal, which might be a little hard to get used to. But with Zettlr, you do not have to interact with these tools. Zettlr does it for you. And Zotero gives you an easy way to make a .bibtex file without having to type them out all by hand. The mobile phone app of Zotero can even just scan the barcode and add it to your collection.