add tag
4 years ago Tran Le Nam

Please help me draw two kinds of calculator keyboards as the below figure. How is it used for LaTeX code?

Many thanks!

HinhMayTinh.png

Top Answer
4 years ago samcarter

There are several packages which provide calculator keys, for example the tipfr package which

Screenshot 2021-08-02 at 11.17.28.png

Or if you prefer a more Casio-like look, you could use the graph35 package

Screenshot 2021-08-02 at 11.28.34.png

Or you could use tikz and give the buttons whatever look you want:

Screenshot 2021-08-02 at 16.25.34.png

Screenshot 2021-08-02 at 16.28.00.png

Answer #2
4 years ago Skillmon

An option missing from @samcarter’s wonderful answer is menukeys[1].

Though originally written for computer keyboards (and so there are a few special key names like \shift and so on). Placement would have to be done by some other means (either via TikZ[2] or via tabulars):

menukeyskeys.png


  1. Disclaimer: I somehow ended up being one of the maintainers. ↩︎

  2. menukeys uses TikZ internally, and since tikzpictures aren’t nestable (it doesn’t throw an error, and sometimes works, but isn’t really supported) you shouldn’t do the placement with TikZ. What you could do is box the keys you need up using TeX-boxes and place those boxes with TikZ. ↩︎

4 years
Skillmon replying to samcarter — Tuesday, 3rd Aug 2021 10:19

and all credits for how menukeys looks should go to Tobias Weh, he created this. I only made it compatible with today’s LaTeX by removing the catoptions dependency. I also had sort of plans for a rewrite allowing a more flexible yet easier interface for setting up styles, but I somehow got lost coding it and have to plan things out better before attempting to rewrite it again…

12 minutes
Tran Le Nam — Tuesday, 3rd Aug 2021 10:07

@Skillmon, re: your answer, Thanks in advance. It can apply for many purposes.

an hour
Skillmon replying to samcarter — Tuesday, 3rd Aug 2021 09:20

Just realised, placement via TikZ is no good option for menukeys, as it uses tikzpictures internally…

samcarter — Tuesday, 3rd Aug 2021 09:15

@Skillmon, re: your answer, Oh, they look great!

17 minutes
samcarter replying to Tran Le Nam — Tuesday, 3rd Aug 2021 08:59

You’re welcome!

38 minutes
Tran Le Nam replying to samcarter — Tuesday, 3rd Aug 2021 08:20

Very beautifull picture. Many thanks!

17 hours
samcarter replying to Tran Le Nam — Monday, 2nd Aug 2021 15:27

I added another pure tikz solution with shadows etc.

24 minutes
Tran Le Nam — Monday, 2nd Aug 2021 15:02

@samcarter, re: your answer, Thank you!
I prefer to draw 3d simulations.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.