├── setup-zotero-obsidian.md ├── README.md ├── CODE_OF_CONDUCT.md └── LICENSE /setup-zotero-obsidian.md: -------------------------------------------------------------------------------- 1 | # Setup Zotero with Obsidian 2 | 3 | This guide connects Zotero with Obsidian to make automated citations, bibligraphies and literature notes. 4 | 5 | ## 1. Setup Zotero & create an account 6 | 7 | Install Zotero [here](https://www.zotero.org) 8 | Also create a free Zotero account to help you backup your precious research knowledge. 9 | 10 | ## 2. Install Zotero BetterBibTex Plugin 11 | 12 | Download the [latest release](https://github.com/retorquere/zotero-better-bibtex/releases/latest) 13 | 14 | Open Zotero -> tools -> addons -> install addon from file. Install the xpi file you downloaded. 15 | 16 | Restart Zotero, and then setup Better BibLaTeX 17 | 18 | Thanks to Mariana Montes for this wonderful guidance on setting up citation keys. 19 | 20 | > Once you have installed Better BibTex, you will find a new tab in your Zotero Preferences (see Figure 1), where you can define a template for your citation keys. Mine uses, in lower case, the last name of the first author, separated by a period from the last name of the second author or, if there are more than two, etal. Then, it adds an underscore and the year. 21 | 22 | ![image](https://user-images.githubusercontent.com/114459/197723985-8714f150-1507-42ff-ba77-8a9d35fe9fce.png) 23 | 24 | > This is a good pattern for me because it’s similar to how I’m used to thinking of the sources I cite: montes_2021 for Montes (2021); kiela.clark_2014 for Kiela & Clark (2014); heylen.etal_2015 for Heylen et al. (2015). When multiple publications have the same key, Better BibTex automatically adds an a, b, c… to the citation key. You have to remember which is which, but looking it up is not so hard either (see Figure 2). 25 | 26 | 27 | ### Export your Bibliography Library from Zotero the first time 28 | 29 | Recommend you create a folder 'config' in your Obsidian Vault for config stuff like this. 30 | 31 | How to create a folder 32 | 33 | In Zotero: File -> Export Library.. -> CSLJSON 34 | Save the file in your Obsidian Vault (recommend: '/config/Library.json') 35 | 36 | ### Setup 'Citation' plugin in Obsidian 37 | 38 | 39 | #### Create 'Literature Notes' folder 40 | Add a new folder 'Literature Notes' to your Obsidian Vault main root directory (you can use another name here and in the config below) 41 | (If you don't add the folder you’ll get strange ENOENT errors later) 42 | 43 | Add a new folder in Obsidian called 'Literature Notes' (you can use a different name but make sure it's named exactly in the Citation plugin setup.) 44 | Later Obsidian can auto create an automatic Literature Note file for any reference you have in Zotero.. and you can write your own notes on it there. 45 | 46 | #### Configure Citation plugin 47 | 48 | Obsidian > Preferences > Community Plugins > Browse > Search & Install 'Citation' plugin 49 | 50 | Setup the following settings 51 | 52 | image 53 | image 54 | 55 | 56 | More to come.. 57 | 58 | Credit to: 59 | 60 | * Vasuagrawl - https://notes.vasuagrawal.com/2022/04/zotero-and-obsidian-literature-notes 61 | * Marinan Montes - https://www.marianamontes.me/post/obsidian-and-zotero/ 62 | 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Obsidian Pandoc Academic Workflow Guide 2 | 3 | This guide has been created to be a community resource providing guidance on how to setup Obsidian to generate word documents for academic purposes. 4 | This guide is explictly concerned with generating documents from pandoc. 5 | 6 | # Objectives 7 | 8 | Pressing a shortcut key combo within a document in Obsidian, auto-generates a Word/Libre Office Document. 9 | 10 | The document contains: 11 | 12 | 1. Automatic inline citations and a reference list (based on your desired reference style). 13 | 2. Embeds your images 14 | 2. An automatic Table of Contents drawn from your Markdown headers. 15 | 4. Has reasonable styling so headings and document is readable without formatting work 16 | 17 | # Getting setup 18 | 19 | ## 1. Automatic inline citations and a reference list 20 | 21 | Pandoc provides support for various academic referencing styles. This makes using pandoc for document conversion the necessary tool to use. 22 | 23 | Instructions to Setup Obsidian with Zotero [are here](setup-zotero-obsidian.md). 24 | 25 | 26 | ### How to add page numbers in a citation 27 | 28 | When you add a citation (eg I press Ctrl + Shift + M) it drops in a citation link (I have mine set to use APA). 29 | 30 | [@gwilt_2022] becomes (Gwilt, 2022) # for me as I'm using APA. 31 | 32 | To add page numbers to a reference; add the the page number(s) after a comma inside the brackets 33 | 34 | [@gwilt_2022,5] becomes (Gwilt, 2022, p. 5) 35 | [@gwilt_2022,17-19] becomes (Gwilt, 2022, pp. 17-19) 36 | 37 | | Markdown | Example Pandoc Output | 38 | | ------------- | ------------- | 39 | | [@gwilt_2022,5] | (Gwilt, 2022, p. 5) | 40 | | [@gwilt_2022,17-19] | (Gwilt, 2022, pp. 17-19) | 41 | | [@gwilt_2010 updated 2020] | (Gwilt, 2010 updated 2020) | 42 | 43 | 44 | ## 2. Embeds your images 45 | 46 | Generally there are two issues at play 47 | - The defauly image markup used by Obsidian when you drag images in, is not understood by Pandoc. 48 | - The file path has issues, either not pointing to the same place or also it has spaces in it. 49 | 50 | Here's my personal workaround, to 'get it images working' to begin with. 51 | 52 | 1. Update where images are stored in Obsidian Preferences 53 | 54 | > Files & Links > Default location for new attachments 55 | 56 | (I've used a folder called 'media', but you can use a different name) 57 | 58 | ![image](https://user-images.githubusercontent.com/114459/197368985-1ec874f5-b5e4-458c-baa9-89a6038111cf.png) 59 | 60 | 2. Use links in this format 61 | 62 | ```![](media/filename.png)``` 63 | 64 | *Test this yourself: Drag a new image into your document, check that it was added to /media within the same folder as your document and then hand adjust the markdown match the format above.* 65 | 66 | 3. Making this *more* efficient 67 | 68 | WORKAROUND: Install 'Wikilinks to MDLinks' plugin and convert the image markdown for each image 69 | 1. Install (& Enable) Plugin '[Wikilinks to MDLinks](https://github.com/agathauy/wikilinks-to-mdlinks-obsidian)' 70 | 2. Click on an image link, press 'Cmd/Ctrl + Shift + L' to swap the Link format. 71 | 3. Manually delete extra path details from the image path so you only have '/media/filename.png' 72 | 4. Generate the document and the images should be there :) 73 | 74 | NOTE: Converting from md to docs [DOES NOT require `--extract-media`](https://groups.google.com/g/pandoc-discuss/c/NSAeHu0YTE8/m/7_7tmW4sCQAJ) 75 | This is needed when converting from docx > md BUT NOT for md > docx. 76 | 77 | This issues references most of them as a state of play: https://github.com/OliverBalfour/obsidian-pandoc/pull/128 78 | 79 | ## 3. Automatic Table of Contents drawn from your Markdown headers 80 | 81 | The 'Dynamic Table of Contents' plugin adds a table of contents within an Obsidian file. 82 | 83 | Add `--toc` paramater to your "Extra Pandoc Arguments" within the `pandoc plugin`. 84 | 85 | ## 4. Has reasonable styling so headings and document is readable without formatting work 86 | 87 | This can be achieved by adding a reference document to pandoc. 88 | Not yet explored. This seems to be the best guide I've found so far: https://stackoverflow.com/questions/70513062/how-do-i-add-custom-formatting-to-docx-files-generated-in-pandoc 89 | 90 | ## Extra Pandoc Arguments Example 91 | 92 | --toc 93 | --citeproc 94 | --bibliography=/Users/username/Zotero/Library.json 95 | --csl=/Users/username/Zotero/styles/apa.csl 96 | 97 | Contributions, questions, isssues, PR's welcome :) 98 | 99 | ## 5. Refinements to address annoyances that affect personal flow 100 | 101 | ### When switching between notes in Obsidian, when you return to a note you are taken back to the top of the document. 102 | 103 | This interupts flow and thought process as every time you switch between notes you loose your place. 104 | 105 | Best discussion is this forum post: [Restore last document position](https://forum.obsidian.md/t/restore-last-document-position/962/59), accessed Nov 2022 106 | 107 | As of 2022, Install the community plugin: [obsidian-remember-cursor-position](https://github.com/dy-sh/obsidian-remember-cursor-position) 108 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | hello@chatwoot.com. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | --------------------------------------------------------------------------------