Last update: 26 Feb 2013
Markx is a Markdown editor specifically designed for academic and scientific authoring. It highlights several advantages of Markdown (plain-text, multiple format conversion, easy version control) while still supplying the basic features which are a must for academic publications (citations, math rendering, layouts).
Markdown is a markup language.
Markdown is very easy to learn and there are many online tutorials, just use Google.
You should use Pandoc-flavored Markdown as both converters (Pandoc and Docverter) use that. The HTML preview on the right is processed using PageDown, so there could be some thing it doesn't process like Pandoc does (found something? open an issue).
You can use $
s or \\(
and \\)
for inline equations and $$
s or \\[
and \\]
for display mode:
- Inline mode
$E=mc^2$ - Display mode:
$$\frac{df(x)}{dx}=\lim_{h \to 0}{\frac{f(x+h)-f(x)}{h}}$$
To start working with citations in Markx you need to click the Load a Bibliography file from the Citations menu. The file should be in BibTeX format - if you don't have one than Markx doesn't support your citation format yet, but you might be able to convert a different format to BibTeX using online tools. If you use Mendeley it is easy to set it up to sync to a BibTeX file. If you do not load a .bib
file you will not be able to use the citations features of Markx.
To insert a citation, find the citation key - usually the last name of the first author, with a capital initial, and the year of publication, without spaces. If the .bib
file has more than one publication with that key they are post-fixed with lowercase letters. Then add the citation key to the editor, wrapped by [@
and ]
.
For example: [@Drake1991]
. Markx doesn't currently preview the citation keys in the previewed text, but it does:
- create a bibliography at the bottom of the preview text
- allows you to download a
.bib
file corresponding to the citation keys in the Markdown text via the Download menu - send the bibliography to Pandoc for conversion (Docverter does not support citations)
You must click the Update Citations button in the Citations menu after adding, removing or changing citation keys, as they will not be updated in real-time (this will be changed in the near future).
- Use the GitHub button to sign-in to GitHub (see more details below).
- Use the Screen button to change between editor, preview and dual modes.
- Use the Books menu to parse citation keys such as [@Drake1991], to load a bibliography file, to see the loaded bibliography and the references you are citing.
- Use the Download menu to download and convert the Markdown text to various formats or to download a Markdown of the text or a BibTeX file of the citations referenced in the text.
- Click on P or D to change the Markdown converter between Pandoc and Docverter.
- Pandoc: must be installed on local machine when working locally, can't process image URLs, slow conversion to PDF on Windows, requires pdflatex to convert to PDF on local machine.
- Docverter: must be connected to the internet to be used, doesn't process citation keys and bibliography.
- Click the Code button to get change the code highlighting styles. Example code above.
- The grey boxes with the numbers display the word and character counts.
Your GitHub username and password are never sent to the Markx server. They are sent by JavaScript directly to the GitHub API server using Github.js. Your credentials are not saved in cookies and are removed from the browser memory as soon as the sign in is complete. You can also sign out of GitHub by clicking the sign out button. If you would like to check the security of this feature please view the signinToGithub
function in markx.js and open an issue if you find any problems.
After you sign in to GitHub you can use the GitHub toolbar to:
- Click the GitHub button - this doesn't do anything right now.
- Click the Reload <i cla=="icon-redo-2"> button o reload the repositories.
- Choose a repository that you can pull from and push to (you are owner or collaborator)
- Click the first folder button to load the branch list
- Choose a branch if the selected repository
- Click the second folder button to load the files list
- Choose a file in the selected branch
- Click the download button to pull the file to the editor. The current contents will be deleted without saving them.
- Click the upload button to push the editor contents to the selected file. This will create a new commit on the repository. You must fill a commit message before pushing. Commit messages should be ~50 characters and briefly explain the reason for this commit. After the push is finalized you will get a success or failure message. If you have citations, Markx will offer to push a bibliography file as well.
- Click the new button to create and push a new empty file. If you don't fill the commit message Markx fill create adefault message for you. After the push is finalized you will get a success or failure message and the files list will be updated.
- Click the sign out button in the general toolbar to sign out of GitHub.
The best way to get support is to open an issue. If you can't open issue because you don't have a GitHub user, just get one, they are free.
If the hosted app at http://markx.herokuapp.com doesn't work for you (which is possible as it is still rough around the edges) you can install Markx locally:
- Install Python 2.7.x (may work with other versions of python)
- If you know about
virtualenv
, you can use the bundledrequirements.txt
file - Otherwise, install the requirements globally with
pip install flask requests
- Optionally, install Pandoc
- Run Markx with
python server.py
- Open your browser at http://localhost:5000
We would love for you to contribute to Markx. The project code is hosted in GitHub. Fork the project or open an issue so we can talk on how we can collaborate.
The server side is written in Python with the Flask web framework (Ruby and Node equivalents are Sinatra and Express) and requests for connecting to Docverter. The two Markdown converters are Pandoc and Docverter, which is a cloud-based Pandoc.
The client side is written with HTML+CSS+JS, using the JavaScript libraries:
- Twitter Bootstrap and [jQuery] for the UI
- PageDown as the Markdown real-time HTML converter
- CodeMirror as the Markdown editor
- Github.js for the GitHub API
- Javascript BibTeX Parser processing citation keys and bibliography files
- Google Code Prettifier for code highlighting
- MathJax for math rendering
The references header is your job, Pandoc will only create a citation list, without a header. However, it will always put it at the end of the output file (at least via Markx) so you can just put a References header at the end of your file.