Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
LaTeX Cookbook

You're reading from   LaTeX Cookbook Over 90 hands-on recipes for quickly preparing LaTeX documents to solve various challenging tasks

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher Packt
ISBN-13 9781784395148
Length 378 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Stefan Kottwitz Stefan Kottwitz
Author Profile Icon Stefan Kottwitz
Stefan Kottwitz
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. The Variety of Document Types FREE CHAPTER 2. Tuning the Text 3. Adjusting Fonts 4. Working with Images 5. Beautiful Designs 6. Designing Tables 7. Contents, Indexes, and Bibliographies 8. Getting the Most out of the PDF 9. Creating Graphics 10. Advanced Mathematics 11. Science and Technology 12. Getting Support on the Internet Index

Fine-tuning math formulas


Though LaTeX's typesetting of formulas is usually excellent, there are situations when the layout can require improvement. This recipe shows quick fixes.

Getting ready

Let's have a look at misalignment and spacing, issues with subscript and superscript that can easily occur:

  1. Open the following sample document with your LaTeX editor. You can take it from the code archive provided with the book or copy and paste from the e-book:

    \documentclass{article}
    \usepackage{dsfont}
    \begin{document}
    \[
      \lim_{n\to\infty} \sup_{x\in\mathds{R}} f_n(x^2)
        < n \Big(\sum_{x\in\mathds{R}, n\in\mathds{N}}
        \big| f_n(x^2) \big| \Big)
    \]
    \end{document}
  2. Compile, and take a look at the formula:

Although the LaTeX code is fine, you will notice that several points should be improved:

  • The subscripts below the operators on the left-hand side of the equation are vertically misaligned

  • The wide space around the sum symbol doesn't look good

  • The exponent 2 is a bit higher than the parentheses...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime