About TeXmacs
TeXmacs is my favorite text editor, especially useful for those who frequently need to type mathematical formulas. I highly recommend giving it a try!
In case you need help getting started, here are some tutorials that might be useful:
- https://www.texmacs.org/tmweb/home/videos.en.html
- https://whzecomjm.com/p/2021/04/texmacs/
- https://x-wei.github.io/soft/TeXmacs_intro.html
Hope you enjoy using TeXmacs! :) I will keep updating this post whenever I find new tips!
How to fix TeXmacs crash
Recently, I encountered a TeXmacs crash on my MacBook, which was quite frustrating since I couldn’t use it for note-taking. :( Here is a guide to help you fix it. The crash is likely caused by a full cache, and clearing it should resolve the issue.
For macOS and Linux, run:
rm -fr ~/.TeXmacs
For Windows, the cache is located at %APPDATA%\TeXmacs
and C:\Users\[User name]\AppData\Roaming\TeXmacs
.
TeXmacs to MarkDown
Since I occasionally write blog posts, I need a way to convert .tm
files to .md
files. Unfortunately, this feature is not available in the default TeXmacs installation, so you’ll need to install additional plugins.
Here is a repository for the tm2md
converter: tm2md GitHub Repo
For macOS:
mkdir -p ~/.TeXmacs/progs/convert
cd ~/.TeXmacs/progs/convert
git clone git@github.com:PikachuHy/texmacs-converter-tm2md.git markdown
open ~/.TeXmacs/progs/my-init-texmacs.scm
, and add the following code
(use-modules (convert markdown init-markdown))
For Windows, refer to the repository instructions for setup details.
Math typing tips
-
Use
option F
to create fraction numbers. -
Type
shift [ + Tab
to create various brackets, which is much more convenient than\langle \rangle
. -
Select some content and type
\red
to mark it in red, which is faster than selecting color in the menu. -
:star: How to define Assumption environment or other theorem-like environment?
Enter the preamble (Select
Document->Part->Show preamble
), and type<new-theorem|assumption|Assumption>
Then return to the file and type
\assumption
to define assumptions! Here are the references:http://forum.texmacs.cn/t/how-do-i-add-a-new-environment-assumption/795/2
https://www.texmacs.org/tmdoc/main/styles/env/env-base-dtd.en.html
-
:crystal_ball: Magic
right click
: Customized environmentIn the
Algorithm
environment,right click->Preferences->Framed Programs
to add box on your algorithm block. Also, you can selectednamed
environment. There are so many customized functions byright click
. Also, in thetheorem
environment, you canright click->Preferences->European Numbering Style
to seperately number the lemmas, theorems, etc.