Math & ScienceNorm symbol to correspond argument height

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Thegal
Posts: 1
Joined: Thu Feb 23, 2012 9:29 am

Norm symbol to correspond argument height

Post by Thegal »

I want to have a norm in my equation such as ||x||. However, my argument x is composed of fractions and thus the vertical lines should be longer.

Using the commands \lVert and \rVert, I get small vertical lines. How would I be able to have them resized?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10359
Joined: Mon Mar 10, 2008 9:44 pm

Norm symbol to correspond argument height

Post by Stefan Kottwitz »

Hi Thegal,

welcome to the board!

Use \left and \right for variable size delimiters:

Code: Select all

\[
  \left\lVert \frac{x}{y}\right\rVert
\]
delimiters.png
delimiters.png (1.58 KiB) Viewed 29090 times
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Norm symbol to correspond argument height

Post by localghost »

It is suggestive to define a corresponding command. The mathtools package offers a helpful structure.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}   % loads »amsmath«

\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

\begin{document}
  $\norm{x}$
  \[
    \norm*{\frac{x}{y}}
  \]
\end{document}
The package manual has more details about this and other of its interesting features.


Best regards and welcome to the board
Thorsten
Post Reply