Math & Science[solved] A \Vert symbol that scales?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
dedec0
Posts: 18
Joined: Wed Nov 06, 2019 1:14 am

[solved] A \Vert symbol that scales?

Post by dedec0 »

I have this code inside a .tex file:

Code: Select all

\subparagraph{(a)} $ \vert \sin(\theta) \vert =
    \Vert \frac{\overrightarrow{v}}{ \Vert \overrightarrow{v} \Vert }
        - \frac{\overrightarrow{u}}{ \Vert \overrightarrow{u} \Vert }
        \cos(\theta)
    \Vert $;
I want the two '\Vert' outside '\frac' operators to have the height of the fractions. How should i do to get exactly this, which i found in a math book?

With that code, i get this output: http://imgbox.com/8BGNE0ah
Last edited by dedec0 on Sun Nov 10, 2019 12:21 am, edited 1 time in total.

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

[solved] A \Vert symbol that scales?

Post by Johannes_B »

Package physics might be a fit for you.

Code: Select all

\documentclass{article}
\usepackage{physics}
\begin{document}
(a) $ \abs{\sin(\theta)}=
   \norm{\frac{\overrightarrow{v}}{ \Vert \overrightarrow{v} \Vert }
    - \frac{\overrightarrow{u}}{ \Vert \overrightarrow{u} \Vert }
    \cos(\theta) }$;
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
dedec0
Posts: 18
Joined: Wed Nov 06, 2019 1:14 am

[solved] A \Vert symbol that scales?

Post by dedec0 »

Johannes_B wrote:Package physics might be a fit for you.

Code: Select all

\documentclass{article}
\usepackage{physics}
\begin{document}
(a) $ \abs{\sin(\theta)}=
   \norm{\frac{\overrightarrow{v}}{ \Vert \overrightarrow{v} \Vert }
    - \frac{\overrightarrow{u}}{ \Vert \overrightarrow{u} \Vert }
    \cos(\theta) }$;
\end{document}
Beautiful! I find it strange that this command does not exist in the math packages i already have and use in this project. The book i said is not physics, it is a book about analytic geometry. Anyway, every time i used \Vert was thinking about the norm of a vector.

Just a note that may be useful to someone else too: i am compiling my code in Debian, with Texlive installed. I had to install the debian package "texlive-science" to get, among several others, the LaTeX 'physics' package.

Thank you
dedec0
Posts: 18
Joined: Wed Nov 06, 2019 1:14 am

[solved] A \Vert symbol that scales?

Post by dedec0 »

Code: Select all

\vert (...) \vert           % to abs. value -> not best
\abs{ (...) }               % this is

\Vert (...) \Vert           % norm of vectors -> not the best either
\norm{ (...) }              % this is
Wikipedia was my source of secure information. But (today, now) it is wrong for this detail. Can someone less newbie than me update the section https://en.wikipedia.org/wiki/List_of_mathematical_symbols_by_subject#Vector_calculus_2 with the idea of what i said here?
Last edited by dedec0 on Mon Nov 11, 2019 5:29 am, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

[solved] A \Vert symbol that scales?

Post by Johannes_B »

The symbols you found are the standard symbols and you can all scale them by hand. They are used by the physics package, which does the scaling for you.
Most advanced users prefer the manual scaling.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply