I am writting alot about statistics, and thereofre also Matrices and Vectors. To get a consistent way of using my notation i want to make some commands i could simply write before and after the expressions which are vectors or Matrices.
rules:
-Matrices and Vectors are both in bold
-Matrices are capital letters, vectors are not
Now i figured i would use the \newcommand command to create these.
bm and bm being "begin matrix" and "begin vector".
Is it possible to put my rules into these commands ?
I havent been able to figure out how to do so.
Thanks!
Text Formatting ⇒ Interesting problem i have formating text
-
- Posts: 44
- Joined: Wed Aug 04, 2010 7:00 pm
Interesting problem i have formating text
Last edited by thedreamshaper on Sat Feb 19, 2011 4:03 pm, edited 1 time in total.
NEW: TikZ book now 40% off at Amazon.com for a short time.
Interesting problem i have formating text
You were close. I suggest you use something like this:
In your LaTeX code, you can now write \bv{x} to produce a vector x and \bm{a} to produce an uppercase matrix A
Code: Select all
\newcommand{\bv}[1]{\ensuremath{\boldsymbol{#1}}}\newcommand{\bm}[1]{\ensuremath{\boldsymbol{\uppercase{#1}}}}
howtoTeX.com - Your LaTeX resource site (Tips, Tricks, Templates and more!)
Follow howtoTeX on twitter
Follow howtoTeX on twitter
-
- Posts: 44
- Joined: Wed Aug 04, 2010 7:00 pm
Interesting problem i have formating text
Thanks Frits, exactly what i needed 
i modified your code slightly to force vectors to be lower case as well.

i modified your code slightly to force vectors to be lower case as well.
Code: Select all
\newcommand{\bv}[1]{\ensuremath{\boldsymbol{\lowercase{#1}}}}\newcommand{\bm}[1]{\ensuremath{\boldsymbol{\uppercase{#1}}}}