Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Tuesday, July 1, 2014

Mathematics

Change math font size

Add this to the preamble..

\makeatletter
\DeclareMathSizes{\@xipt}{10}{7}{5}  % For size 11pt text
\makeatother

The second argument = Math text size (in pt), 3rd = script size,
4th = scriptscript size

Matrix with partitions

\usepackage{pmat}
\begin{document}
\[
    \begin{pmat}[{.|}]
        a_{11} & a_{12} & b_{11} \cr
        a_{21} & a_{22} & b_{21} \cr\-
        c_{11} & c_{12} & d_{11} \cr
    \end{pmat}
\]

\end{document}

Large fraction

Use dfrac{}{} in amsmath package to create a large fraction font

Phasor operator

Use package steinmetz and define the new command

\newcommand{\jphase}[1]{\phase{#1l}}

and modify steinmetz.sty by changing the linethickness to .3pt

\put(0,0){\line(1,0){\ph@x}}\put(0,0){\line(1,2.5){\ph@dx}}


Right-aligned matrix

\setcounter{}{20}  % Increase max columns from 10 to 20
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{*\c@MaxMatrixCols #1}}
\makeatother

and use

\begin{bmatrix}[r]
\end{bmatrix}

or

%% Change the matrix alignment to the right
\makeatletter
\def\env@matrix{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols r}}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Increase # columns from the default 10 to 20. 
%% Make the bmatrix right-aligned with \begin{bmatrix}[r]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{MaxMatrixCols}{20} 
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
  \let\@ifnextchar\new@ifnextchar
  \array{*\c@MaxMatrixCols #1}}

\makeatother