1

I am wondering if there is some alternative to math mode or some other way to use some things directly, e.g.

β instead of \beta

A' instead of A^\prime

A | B instead of A \mid B (when using A | B in math mode, the space between A, | and B gets lost)

It would make formulas more comfortable to read.

Werner
  • 603,163
me.at.coding
  • 1,653
  • some ideas in http://tex.stackexchange.com/questions/96225/what-are-good-packages-techniques-for-writing-more-readable-latex-code – David Carlisle Mar 13 '13 at 16:06

1 Answers1

6

It is not a good idea to change the behaviour of |, and ' is by default ^\prime

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}

\DeclareMathSymbol{|}{\mathrel}{symbols}{"6A}
\newunicodechar{}{\alpha}
\newunicodechar{β}{\beta}

\begin{document}
\huge
$\sin()\ne\sin(β)$
$y'=y^\prime$

$A|B = A\mid B $

\end{document} 
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • 1
    +1; but probably it's worth noting that the absolute value |a| can't be written with | any more. – egreg Mar 13 '13 at 16:43
  • but with the old definition $\mathchar"426A a\mathchar"526A$ –  Mar 13 '13 at 17:01
  • Which is not very nice, is it? :) However \mathopen|a\mathclose| would work. In conclusion, I don't think that changing | to mean \mid is so convenient, which I think you agree to. – egreg Mar 13 '13 at 17:04
  • yes, | shouldn't be redefined –  Mar 13 '13 at 17:04