Commit 7fd3cd06 authored by Arnaud Legrand's avatar Arnaud Legrand

Cosmetics

parent 5e828909
...@@ -11,7 +11,7 @@ the screenshots in this demo are done under the Windows operating ...@@ -11,7 +11,7 @@ the screenshots in this demo are done under the Windows operating
system but similar results should be obtained on any OS. system but similar results should be obtained on any OS.
* First steps with Emacs as a computationnal environment * First steps with Emacs as a computationnal environment
** Run Emacs ** A first org-mode document
- Launch emacs - Launch emacs
#+BEGIN_CENTER #+BEGIN_CENTER
[[file:emacs_orgmode_images/emacs.png]] [[file:emacs_orgmode_images/emacs.png]]
...@@ -59,13 +59,13 @@ system but similar results should be obtained on any OS. ...@@ -59,13 +59,13 @@ system but similar results should be obtained on any OS.
If you do not like this behavior, you can edit the =init.el= file and If you do not like this behavior, you can edit the =init.el= file and
replace =(org-babel-temp-file \"figure\" \".png\")= by replace =(org-babel-temp-file \"figure\" \".png\")= by
=\"D:/temp/figure.png\"= or whichever location/name you prefer (both =\"D:/temp/figure.png\"= or whichever location/name you prefer (both
for =<R= et =<PP=). for =<R= and =<PP=).
** Running python code ** Running Python code
- You may want to read the [[https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html][Python Source Code Blocks in Org Mode]] - You may want to read the [[https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html][Python Source Code Blocks in Org Mode]]
webpage for more examples webpage for more examples
- The =<p= + =tab= will insert a python block in a /non-session/ mode. This - The =<p= + =tab= will insert a Python block in a /non-session/ mode. This
means that a new python shell will be started for this block and means that a new Python shell will be started for this block and
that variables will not be shared between blocks. Again, the code that variables will not be shared between blocks. Again, the code
is executed with the =C-c C-c= shortcut. is executed with the =C-c C-c= shortcut.
#+BEGIN_CENTER #+BEGIN_CENTER
...@@ -80,20 +80,20 @@ system but similar results should be obtained on any OS. ...@@ -80,20 +80,20 @@ system but similar results should be obtained on any OS.
# [[file:emacs_orgmode_images/python3.png]] # [[file:emacs_orgmode_images/python3.png]]
# #+END_CENTER # #+END_CENTER
# Then try to follow the steps in the installation section. # Then try to follow the steps in the installation section.
- The =<P= + =tab= will insert a python block in /session/ mode. This - The =<P= + =tab= will insert a Python block in /session/ mode. This
allows to keep variables alive from a block to an other. Internally, allows to keep variables alive from a block to an other. Internally,
emacs will have a buffer with a python session running. Again, the emacs will have a buffer with a Python session running. Again, the
code is executed with the =C-c C-c= shortcut. code is executed with the =C-c C-c= shortcut.
#+BEGIN_CENTER #+BEGIN_CENTER
[[file:emacs_orgmode_images/python2.png]] [[file:emacs_orgmode_images/python2.png]]
#+END_CENTER #+END_CENTER
- The =<PP= + =tab= will insert a python block in /session/ mode and ready - The =<PP= + =tab= will insert a Python block in /session/ mode and ready
to generate graphics. to generate graphics.
#+BEGIN_CENTER #+BEGIN_CENTER
[[file:emacs_orgmode_images/python4.png]] [[file:emacs_orgmode_images/python4.png]]
#+END_CENTER #+END_CENTER
If this fails, try to update the python =numpy= library, for exemple If this fails, try to update the Python =numpy= library, for exemple
like this in a dos/shell command: like this in a dos/shell command:
#+begin_src shell :results output :exports both #+begin_src shell :results output :exports both
python -m pip install -U numpy python -m pip install -U numpy
...@@ -119,12 +119,13 @@ system but similar results should be obtained on any OS. ...@@ -119,12 +119,13 @@ system but similar results should be obtained on any OS.
#+BEGIN_CENTER #+BEGIN_CENTER
[[file:emacs_orgmode_images/org_mode.png]] [[file:emacs_orgmode_images/org_mode.png]]
#+END_CENTER #+END_CENTER
When you are dones, simply hit =C-c C-c= to save your modifications When you are done, simply hit =C-c C-c= to save your modifications
and close the mini-buffer. and close the mini-buffer.
** Fast editing of an org document ** Fast editing of an org document
- It is common when taking notes in a brainstorming session to have to - It is common when taking notes in a brainstorming session to have to
clean and reorganize them. The =Alt= + =\leftarrow= or =Alt= + clean and reorganize them. The =Alt= + =\leftarrow= or =Alt= +
=\rightarrow= will allow you to shift items to the left or to the right. =\rightarrow= will allow you to shift items to the left or to the
right. Likewise, entries can be moved up or down.
- Org-mode shortcuts are actually much more intuitive than prehistoric - Org-mode shortcuts are actually much more intuitive than prehistoric
emacs shortcuts. You'll quickly get use to it. Again, have a look to emacs shortcuts. You'll quickly get use to it. Again, have a look to
the first entry of the =journal.org= file we gave you and which the first entry of the =journal.org= file we gave you and which
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment