Newbiemacs Homepage

Table of Contents

Home

newbiemacs-screenshot.png Newbiemacs character by Artist Ujoo

Introduction

  • Newbiemacs is a pre-configured GNU Emacs distribution inspired by Spacemacs.
  • Newbiemacs is desiged for mathematicians who are new to Emacs.

Main features of Newbiemacs

  • Organize your pdf and tex files.
  • Search pdf and tex files quickly.
  • Easy to use.
  • You can play the torus game!

torus-screenshot.png

Installation

macOS

  1. Install Emacs version 28.2. Click here to download an installation file.
  2. Install Git. Click here to download an installation file.
  3. Open a terminal and enter the following lines. (You can open a terminal by pressing Command+Space and typing "terminal". You can just copy the whole thing and then paste it in your terminal.)

    cd ~
    git clone https://github.com/jangsookim/newbiemacs.git nbm-root
    cp ~/nbm-root/.emacs ~/.emacs
    
  4. Run Emacs. It will take several minutes to download necessary packages. There may be some warnings but it's okay. When it's done, there will be a message at the bottom saying "For information about GNU Emacs and the GNU system, type C-h C-a."
  5. Close Emacs and run it again. The Newbiemacs main screen will be shown.

Additional steps for latex on macOS (optional)

If you want to edit tex files in Newbiemacs, you need to do the following (only once).

  1. Install Skim and MacTeX (this is TeX Live for macOS).
  2. Open Skim and press CMD+, (Hold the command key and press the comma key.)
  3. Go to the Sync menu and check the two check boxes.
  4. Select Emacs in the drop-down box for Preset.
    • If this doesn't work try the following in skim option.
    • Select Preset: custom and enter the full path in the command field, e.g. /opt/homebrew/bin/emacsclient or /Applications/Emacs.app/Contents/MacOS/bin-arm64-11/emacsclient.
    • Arguments should the the same things for Emacs, i.e. --no-wait +%line "%file".

Windows

  1. Install Emacs version 28.2. Click here to download an installation file.
  2. Install Git. Click here to download an installation file.
  3. Install Perl.
  4. Open "Command Prompt" (not "terminal" or "PowerShell") and enter the following lines. (You can just copy the whole thing and then paste it in your command prompt.)

    cd "%userprofile%"
    git clone https://github.com/jangsookim/newbiemacs.git nbm-root
    copy "%userprofile%\nbm-root\.emacs-windows" "%userprofile%\AppData\Roaming\.emacs"
    
  5. Run Emacs. It will take several minutes to download necessary packages. There may be some warnings but it's okay. When it's done, there will be a message at the bottom saying "For information about GNU Emacs and the GNU system, type C-h C-a."
  6. Close Emacs and run it again. It will take some more time but eventually the Newbiemacs main screen will be shown.

Additional steps for latex on Windows (optional)

If you want to use latex in Newbiemacs, you need to do the following (only once).

  1. Install TeX Live. Click here (It may take about 2 hours.)
  2. Install Sumatra PDF. Click here (Download "Installer", not "Portable version".)
  3. Open Sumatra PDF and in the menu go to Settings and click Options....
  4. Enter the following line in the box below Set inverse search command-line.

    C:\Program Files\Emacs\emacs-28.2\bin\emacsclientw.exe -n +%l "%f"
    

    If the box is not visible, then in the menu go to Settings and click Advanced Options.... It will open a text file. Enter the following line anywhere there and save the file.

    InverseSearchCmdLine = C:\Program Files\Emacs\emacs-28.2\bin\emacsclientw.exe -n +%l "%f"
    

GNU/Linux

  1. Install Emacs version 28.1 or later (Install "GNU Emacs" using "Ubuntu Software" if you installed Ubuntu).
  2. Install necessary packages.

    sudo apt install gcc git
    
  3. Open a terminal and enter the following lines.

    cd ~
    git clone https://github.com/jangsookim/newbiemacs.git nbm-root
    cp ~/nbm-root/.emacs ~/.emacs
    
  4. Run Emacs. It will take several minutes to download necessary packages. There may be some warnings but it's okay. When it's done, there will be a message at the bottom saying "For information about GNU Emacs and the GNU system, type C-h C-a."
  5. Close Emacs and run it again. The Newbiemacs main screen will be shown.

Additional steps for latex on GNU/Linux (optional)

If you want to edit tex files in Newbiemacs, you need to do the following (only once).

  1. Install necessary packages.

    sudo apt install texlive-full wmctrl
    

Tutorial

Introduction

  • In this tutorial you will learn how to use Newbiemacs.
  • You can use the basic features of Newbiemacs in the following Newbiemacs screen. (To go to the Newbiemacs screen, type ALT-BACKSPACE. In macOS, ALT is the command key.)

newbiemacs-screenshot.png

  • By default your Newbiemacs folder will be ~/newbiemacs (~ means your home folder.)
  • The current file name is shown at the bottom of the Newbiemacs screen.
  • Type F in the Newbiemacs screen to open the folder containing the current file.
  • Newbiemacs provides three editing styles, Vim, Emacs, and Windows (default). To change the editing style, type e in the Newbiemacs screen.
  • You can view the Newbiemacs cheat sheet by typing ? in the Newbiemacs screen.

Overview

  • In this tutorial we learn how to manage pdf, tex, and miscellaneous files.
  • We will also see some useful tools: adding a figure, changing variables, and converting latex code to HWP math code (for Korean only).
  • The basic concept of managing files is to store these files in their directories and search them.
  • The directories for these files are under the newbiemacs folder.
  • To open the newbiemacs folder, type ALT-BACKSPACE twice and then type F
  • The pdf, tex, and miscellaneous files will be stored in the pdf, tex, and misc folders under the newbiemacs folder.
  • You may manually move your files into one of these folders.

How to find a pdf, tex, or miscellaneous file

  • Finding a file is very easy.
  • Type p, t, or s in the Newbiemacs screen to find a pdf, tex, or miscellaneous file.
  • Type anything that you can remember about the file name.
  • It will list all files with the key words that you have entered there.
  • Choose the file that you want to open and press the enter key.

Add new files

  • Note that it is important to have a good file name scheme so that we can search files easily.
  • The following methods will do this effortelessly.

How to add a pdf file from arxiv

  1. Download the pdf file of a paper from https://arxiv.org/ (You must download it into your download folder instead of just viewing it on your browser.)
  2. Copy the two lines of the title and the authors like this:

    arxiv.png

  3. Go to your Emacs with the Newbiemacs main screen.
  4. Type m and follow the instructions at the bottom of the Emacs screen.
  5. It will save a pdf with name scheme such as "Author 1, Authur 2, Title".
  6. Now you can search the pdf by typing p in on the Newbiemacs main screen.

How to add a pdf file of a published paper

  1. Download a pdf file into your download folder.
  2. Go to MathSciNet or zbMATH (zbMATH is free).
  3. Search the paper there. You will see something like this

    mathscinet.png

  4. Click the drop-down box at the top left corner and select bibtex.

    mathscinet2.png

  5. Copy the bibtex item.

    mathscinet3.png

  6. Go to your Emacs with the Newbiemacs main screen.
  7. Type m and follow the instructions at the bottom of the Emacs screen.
  8. It will save a pdf with name scheme such as "Author 1, Authur 2, Year, Title".
  9. Now you can search the pdf by typing p in on the Newbiemacs main screen.
  10. It will also ask if you want to create a bib item for this paper.

How to create a new tex file

  1. Type n in the Newbiemacs screen.
  2. Enter a file name for the new tex file. (The extension .tex is not needed. This name will also be the title inside the tex file.)
  3. Choose a template file. (For the default, just hit the enter key.)
  4. Now you can search the tex file by typing t in on the Newbiemacs main screen.

Symlinks

  • A symlink is a link to a file similar to a "shortcut" to a file.
  • Creating a symlink will allow you to search a file without moving it to one of the pdf, tex, misc folders.

How to create a symlink to a file

  1. Go to the Newbiemacs screen.
  2. In your Finder or File Explorer, find a file that you want to create a symlink.
  3. Drag-and-drop the file into the Newbiemacs screen.
  4. Type ALT-BACKSPACE, which will bring you back to the Newbiemacs screen.
  5. Type S. Then it will ask you to enter a symlink name. Follow the instructions.
  6. On macOS, a symlink will be created in this way and you are done.
  7. On Windows, however, it will only copy a string in the clipboard. Now open the command prompt run as administrator. Paste the string in the command prompt.

Some useful tools

  • Even if you don't use Newbiemacs for editing tex files, you may find the following tools useful.

Add a figure in a tex file

  • Using Newbiemacs you can add an image into your tex file as follows.
    1. Take a screenshot (or upload a screenshot from your tablet).
    2. Go to your tex file.
    3. Press ALT-BACKSPACE to go to the Newbiemacs main screen.
    4. Press f and follow the instructions.
  • By default Newbiemacs will search the downloads folder and the desktop.
  • If your computer saves screenshots in a different folder you can add the folder: type ALT-BACKSPACE followed by x followed by 3, and add the directory path in a new line.

Change variables

  • While writing your paper, you realized that you want to change the variable i to j.
  • You cannot simply replace all i to j, because then it will also change a word like this to thjs and a macro like \int to \jnt.
  • In Newbiemacs you can do the variable change as follows.
    1. Open your tex file.
    2. If you want the change only on some part, select the region by dragging your mouse. (If you want the change in the entire file, you don't have to do this.)
    3. Press ALT-BACKSPACE to go to the Newbiemacs main screen.
    4. Press v and follow the instructions.

Convert latex code to HWP math code (for Korean)

  • Suppose that you want to use the following latex code in Hangul program (한글 프로그램).

    \sum_{i=1}^n \frac{a_i}{b_i} = \prod_{i=1}^n c_i^2
    
  • You can convert this latex code to HWP math code as follows.
    1. Select the latex code by dragging your mouse (without $ or \( \) or \[ \]).
    2. Press ALT-BACKSPACE to go to the Newbiemacs main screen.
    3. Press h and a converted HWP math code will be stored in the clipboard. For example, the above latex code will be converted to

      sum_{ i=1}^n   {a_i }over{b_i } =  prod_{ i=1}^n  c_i^2
      
    4. Go to Hangul program and paste the clipboard string in the math input window (ctrl n m)

Manual

For more details, click the Newbiemacs manual.

FAQ

How can I open the Newbiemacs directory?

  1. Type ALT-BACKSPACE twice and then type F

How can I update Newbiemacs?

  1. Type U in the Newbiemacs screen. (You may need to restart Emacs.)

How can I change the newbiemacs folder?

  1. Close Emacs and move the newbiemacs folder as you wish.
  2. Open ~/nbm-root/nbm-home.txt (This is the file containing the path to the Newbiemacs folder.)
  3. Update the old path with the new path.
  4. Start Emacs.

How can I use a spell-checker?

Check the section on "Spell checking" in the Newbiemacs manual.

How can change fontsize globally?

  • Add the following line in your user-init.el and change the number 150 as you want. (To open user-init.el, type SPC N c u.)

    (set-face-attribute 'default nil :height 150)
    

How can I re-install Newbiemacs?

You can re-installing Newbiemacs keeping your Newbiemacs folder ~/newbiemacs. It will take much less than the actual installation.

  1. Delete the folder ~/nbm-root
  2. (For macOS or GNU/Linux) Enter the following in a terminal.

    cd ~
    git clone https://github.com/jangsookim/newbiemacs.git nbm-root
    
  3. (For Windows) Enter the following in Command Prompt.

    cd %userprofile%
    git clone https://github.com/jangsookim/newbiemacs.git nbm-root
    

Troubleshooting

Newbiemacs crashed! What should I do?

  1. Restart Newbiemacs.
  2. If it's still not working, re-install Newbiemacs.

I cannot compile bibtex.

  1. If there is a space in the path of your newbiemacs folder, you cannot compile bibtex.
  2. It is strongly recommended that you change your newbiemacs folder so that it has no space.
  3. If you need to use icloud, whose path is /Users/<username>/Library/Mobile Documents/com~apple~CloudDocs, you need to run the following in your terminal. (You have to change <username> with your actual username.)

    ln -s "/Users/<username>/Library/Mobile Documents" "/Users/<username>/Library/Mobile-Documents"
    

Torus Leader Board

rank name score level date
1 jia 576900 17 2023/02/28
2 jjh 459600 15 2023/03/25
3 U-keun 382200 13 2023/02/21
4 jangsoo 329700 13 2023/02/13

Author: Jang Soo Kim

Created: 2024-03-15 Fri 08:51

Validate