Math & ScienceBar over Symbol within Brackets

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
mjmottram
Posts: 4
Joined: Fri Sep 09, 2011 12:02 am

Bar over Symbol within Brackets

Post by mjmottram »

Hello,

How can one create a symbol with a bar over it in brackets? As in:

Code: Select all

\bar{\nu}
but with the bar in brackets that are also over the symbol?
Last edited by mjmottram on Fri Dec 09, 2011 5:18 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Bar over Symbol within Brackets

Post by localghost »

By automatic scaling of the delimiters.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}

\begin{document}
  \( \left[\bar{\nu}\right] \)
\end{document}
As suggested in every basic LaTeX documentation.


Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
mjmottram
Posts: 4
Joined: Fri Sep 09, 2011 12:02 am

Re: Bar over Symbol within Brackets

Post by mjmottram »

I may have missed something, but your reply doesn't do what I asked about. I know how to scale the brackets! I want to place the brackets around the bar, not around the entire symbol.
mjmottram
Posts: 4
Joined: Fri Sep 09, 2011 12:02 am

Bar over Symbol within Brackets

Post by mjmottram »

So it seems that the way to do this is:

Code: Select all

\overset{(-)}{\nu}
This isn't the prettiest of solutions though (though looks OK with 1.5 times line spacing). If anyone comes up with anything better I'd like to hear it!
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

Bar over Symbol within Brackets

Post by localghost »

mjmottram wrote:I may have missed something, but your reply doesn't do what I asked about. […]
Your original code has been a bit misleading. Try something with the help of the accents package.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{accents}

\newcommand*{\bbar}[1]{\accentset{[-]}{#1}}
\newcommand*{\pbar}[1]{\accentset{(-)}{#1}}

\begin{document}
  \(
    \bbar{\nu}
  \)

  \(
    \pbar{\nu}
  \)
\end{document}
Just a question for my understanding. Do you now want brackets or parentheses?
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
Post Reply