Vertical bar turning horizontal

Here is an MWE:

\documentclass[a4paper]{report}
\usepackage{graphicx,multirow,multicol}
\makeatletter
\newcommand{\blocks}[9][-10]{
\def\bar{\@ifstar{\raisebox{-5pt}{\scb{1}[1]{\Huge{|}}}\hsp{0.2cm}}{\raisebox{-14pt}{\scb{1}[1.3]{\Huge{|}}}\hsp{0.2cm}}}

\!\!\mat{cccc}
#2&#3\hsp{-0.2cm}&\multicolumn{2}{r}{\multirow{2}{*}{\bar\raisebox{#1pt}{\Huge{$#6$}}}}\\
\end{document}


-

It's really a bad idea to redefine \bar. Plus you're doing by hand things that are already available, using characters that are not what you're expecting: typing | in text mode is not really a good idea, unless you're loading the T1 encoding.

\documentclass[a4paper]{report}
\newcommand{\blocks}[7]{%
\begin{array}{c|c}
\begin{array}{@{}cc@{}}
#1 & #2 \\
#3 & #4
\end{array} &
\xbox[-0.8ex]{#5} \$2ex] \hline & \\[-1.5ex] \xbox{#6} & \xbox{#7} \end{array}% } \newcommand\xbox[2][0pt]{% \begin{tabular}{@{}c@{}}\raisebox{#1}{\Huge\ #2\ }\end{tabular}% } \begin{document} \[ \blocks{\cosh u}{\sinh u}{\sinh u}{\cosh u}{0}{0}{1}$
\end{document}


-
By "redefine" do you mean \bar already has a definition or do you just mean I shouldn't redefine it every time I call \blocks? – MickG Jul 25 '14 at 18:44
@MickG It has a definition, the “bar” math accent, so it's not wise to redefine it. For the general problem, one redefines something if its definition should depend on current conditions. – egreg Jul 25 '14 at 19:24
I see. I didn't know. I will fix this. Thanks for telling me :). – MickG Jul 25 '14 at 20:16
PS it should be \newcommand{\xbox} with braces around \xbox, shouldn't it? And the tabular around the \raisebox in \xbox? What is it for? – MickG Jul 26 '14 at 18:17

The default OT1 encoding has ligatures (emdash here) and other things in the ascii punctuation slots, try

\documentclass{article}

\begin{document}

OT1 is strange < | >

\end{document}

-