LaTeX forum ⇒ Math & ScienceToo much space in squared trigonometric functions Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Too much space in squared trigonometric functions

Postby Cham » Thu Dec 12, 2019 5:46 am

I'm having a small glitch with trigonometric functions to some exponent (say squared). There's too much space before its argument, as shown with this simple MWE:

Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass[11pt,letterpaper,twoside]{book}
  2. \usepackage[T1]{fontenc}
  3. \usepackage{lmodern}
  4. \usepackage[total={6in,10in},left=1.5in,top=0.5in,includehead,includefoot]{geometry}
  5. \usepackage{nccmath,amsmath}
  6. \usepackage{amsfonts}
  7. \usepackage{mathtools}
  8.  
  9. \begin{document}
  10.  
  11. Blabla bla:
  12. \begin{equation}
  13. \sin^2 \vartheta = \sin^2 \! \vartheta
  14. \end{equation}
  15.  
  16. \end{document}


Preview:
trig.jpg
trig.jpg (8.81 KiB) Viewed 874 times


Adding the command \! (a negative space) before the argument almost solves the spacing issue, but it's not exactly "right". What would you do in such a situation?

User avatar
Johannes_B
Site Moderator
Posts: 4183
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Thu Dec 12, 2019 6:27 am

I wouldn't do anything. Looks ok to me.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Thu Dec 12, 2019 2:54 pm

Which one? With the space, or using \! before the argument?

User avatar
Ijon Tichy
Posts: 317
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Thu Dec 12, 2019 3:13 pm

The first one. As I've already told: You are spending a lot of time to change things, you should not change.

User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Thu Dec 12, 2019 4:40 pm

I'm changing my code to improve it (as a purist) and to improve the output.

This huge document is a major project for me. The 12pt version is very nice and satisfying, but the font is too big. It feels a bit "amateur" (it has a kind of "MS Word look"). I reduced it to 11pt, and I now have to fix a large amount of mistakes I made when I started that project almost 9 years ago. I was learning LaTeX at that time (and still learning new tricks!).

Also, the new version could be useful since I could copy/paste some parts in new documents. So the code need to be polished.


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 4 guests