Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Pandoc Latex Template | 5,095 | a month ago | 88 | bsd-3-clause | TeX | |||||
A pandoc LaTeX template to convert markdown files to PDF or LaTeX. | ||||||||||
Pandoc_resume | 1,429 | 18 days ago | 30 | mit | TeX | |||||
The Markdown Resume | ||||||||||
Rticles | 1,327 | 20 | 18 | 13 days ago | 22 | December 14, 2021 | 48 | TeX | ||
LaTeX Journal Article Templates for R Markdown | ||||||||||
Cpp17 | 1,088 | a month ago | TeX | |||||||
本书为《C++17 the complete guide》的个人中文翻译,仅供学习和交流使用,侵删 | ||||||||||
Mdmath | 717 | a year ago | 42 | June 06, 2021 | 6 | mit | JavaScript | |||
LaTeX Math for Markdown inside of Visual Studio Code. | ||||||||||
Pandoc Starter | 453 | 2 years ago | 4 | TeX | ||||||
📄 My pandoc markdown templates and makefiles | ||||||||||
Jekyll Spaceship | 386 | 1 | 4 | a year ago | 44 | November 27, 2021 | 21 | mit | Ruby | |
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc. | ||||||||||
Cv | 380 | a month ago | mit | TeX | ||||||
Letter Boilerplate | 378 | 2 years ago | 7 | TeX | ||||||
Finest letter typesetting from the command line | ||||||||||
Pandoc Letter | 372 | 2 months ago | 6 | gpl-3.0 | TeX | |||||
Pandoc template for writing letters in markdown |
emacs-jupyter connects to an in-process jupyter kernel, executes notebook code, and displays the results automatically in a LaTeX or Markdown buffer.
First install Pymacs - pinard/Pymacs. Build, install. In your .emacs
(load-file "[PYMACS DIR]/pymacs.el")
Then pip install
ipython
matplotlib
In your .emacs add the snippet below. The code can seem excessive, but the extra stuff was needed to be able to detect if I am in an .md or .tex buffer so we can load the right module, also set the right tempo template functions.
(defun reload-pymacs()
(interactive)
(if (buffer-live-p (get-buffer "*Pymacs*" ))
(kill-buffer (get-buffer "*Pymacs*")))
(message (buffer-file-name (current-buffer)))
;;
;; load tex or md mode based on the extension
(if (equal (file-name-extension (buffer-file-name (current-buffer))) "tex")
(progn
(pymacs-load "[INSTALL DIR]/ipython-tex")
(global-set-key "\M-," 'ipython-tex-run-py-code)
(global-set-key [f5] 'ipython-tex-complete-py)
(tempo-define-template
"tex-listings-python"
'("\\begin{minted}[fontsize=\\footnotesize]{python}\n"
(s)
"\n\\end{minted}\n"
)
"")
))
(if (equal (file-name-extension (buffer-file-name (current-buffer))) "md")
(progn
(pymacs-load "[INSTALL DIR]/ipython-md")
(global-set-key "\M-," 'ipython-md-run-py-code)
(global-set-key [f5] 'ipython-md-complete-py)
(tempo-define-template
"tex-listings-python"
'("```python\n"
(s)
"\n```\n"
)
"")
))
)
(global-set-key [f1] 'tempo-template-tex-listings-python)
(global-set-key [f11] 'reload-pymacs)
For better management create a virtualenv environment, pip install the necessary packages from there, install pymacs on it, then start emacs with the bash script below,
#!/bin/bash
source /some/dir/yourenv/bin/activate
/usr/bin/emacs24
When you are in \begin{minted}
and \end{minted}
blocks, or its
equivalent in markdown, simply click on M-, or call
'ipython-tex-run-py-code
, and all code in that block will be sent to
a ipython kernel and the result will be displayed underneath. Results
will be placed in \begin{verbatim}
, \end{verbatim}
blocks right
next to the code, with one space in between. If a verbatim blocks
already exists there, it will be refreshed. If not, it will be added.
If on \inputminted{python}{file.py}
block, code will be loaded
from script filename between the curly braces. Results outputted as
described above.
If plt.show()
is detected in code block, it will be replaced with
plt.savefig(..)
command and a \includegraphics
LaTeX command will
be added in the TeX buffer, same for Markdown. How do we determine
which image file name to generate? All previous image files with png
extension are searched, e.g. if test_01.png
, test_02.png
exist,
the new file will be the last one in the list plus 1, so in this case
show()
will be replaced with plt.savefig('test_03.png')
,
After entering any expression, hit F-5 or call
'ipython-tex-complete-py
, and emacs-ipython will show a list of
possible completions in a *pytexipy*
buffer. This list comes
directly from ipython, hence it reflects the cumulation of runtime
code that has been executed and brought into memory thusfar through
multiple 'ipython-tex-run-py-code
calls.
For now, there is one kernel per Emacs process.
At the start, I have to hit f11 or 'reload-pymacs
to force
initialization. However this command is useful for other purposes as
well such as wanting to clean up ipyton memory and starting from
scratch, anytime.
Markdown and LaTeX versions of the code can use some refactoring.
Take a look at our other sites
Emacs Jupyter is licensed under GPL v3. See COPYING for details.