How to type Hamiltonian symbol in latex

In summary, the Hamiltonian symbol can be typed in LaTeX using the command \mathcal{H} in math mode. It can also be changed to a different font using the command \mathscr{H}. Subscripts and superscripts can be added using the underscore (_) and caret (^) respectively. There is a shortcut for typing the symbol and it can only be used in math mode, but can be temporarily switched to text mode using dollar signs ($$).
  • #1
yileili3
3
0
I am having trouble typing the Hamiltonian symbol into latex. I found the symbol in the http://mirrors.med.harvard.edu/ctan/info/symbols/comprehensive/symbols-a4.pdf" , however, I had some difficulties in installing the font and stuff. I am using tex-live.

I got the following error:

kpathsea: Running mktexmf rsfs10
! I can't find file `rsfs10'.
<*> ...:=ljfour; mag:=1; nonstopmode; input rsfs10

Is there anybody who is familiar with this? Thanks
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
I needed to install some fonts texlive-fonts-recommended

On Ubuntu

sudo apt-get install texlive-fonts-recommended

solved my problem
 

1. How do I type the Hamiltonian symbol in LaTeX?

In LaTeX, the Hamiltonian symbol can be typed using the command \mathcal{H}. This will produce the symbol ℋ in math mode.

2. Can I change the font of the Hamiltonian symbol in LaTeX?

Yes, you can change the font of the Hamiltonian symbol in LaTeX by using the command \mathscr{H}. This will produce the symbol ℋ in a different font, commonly used for calligraphy or script symbols.

3. How can I add a subscript or superscript to the Hamiltonian symbol in LaTeX?

To add a subscript or superscript to the Hamiltonian symbol in LaTeX, you can use the underscore (_) for subscripts and the caret (^) for superscripts. For example, \mathcal{H}_{0} will produce ℋ0 and \mathcal{H}^{2} will produce ℋ2.

4. Is there a shortcut for typing the Hamiltonian symbol in LaTeX?

Yes, there is a shortcut for typing the Hamiltonian symbol in LaTeX. You can use the command \mathcal{H} or \mathscr{H} followed by a space to produce the symbol without having to type the full command every time.

5. Can I use the Hamiltonian symbol in text mode in LaTeX?

No, the Hamiltonian symbol can only be used in math mode in LaTeX. To use it in text mode, you can enclose it in dollar signs ($$) to switch to math mode temporarily. However, it is recommended to use it in math mode for consistency and proper formatting.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
954
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
11K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
6K
Back
Top