Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Using the following code, I get a nice emulation of the calculator screen. However, I'm looking for a way to make the summation signs smaller. Any suggestions?

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}

\usepackage{xparse}
\newcommand\tsurd{\ensuremath{\sqrt{\phantom{i}}}}
\newcommand\txbar{\ensuremath{\overline{\text{x}}}}
\newcommand\sumx{\ensuremath{\sum{\text{x}}}}
\newcommand\sumxsq{\ensuremath{\sum{\text{x}}^2}}
\newcommand\sigmax{\ensuremath{\sigma{\text{x}}}}
\ExplSyntaxOn
\NewDocumentCommand{\calcinput}{m}
{
 \tl_map_inline:nn { #1 } { ##1 \hspace{0pt} }
}
\ExplSyntaxOff


\begin{document}

\def\onevarstats{\calcinput{1-Var\ Stats}}
\def\xbar{\calcinput{\ \txbar:1.23}}
\def\mysumx{\calcinput{\ \sumx:12}}
\def\mysumxsq{\calcinput{\ \sumxsq:140}}
\def\s{\calcinput{\ Sx:3.2}}
\def\mysigmax{\calcinput{\ \sigmax:2.2}}
\def\n{\calcinput{\ n:7}}

\begin{center}
\begin{tikzpicture}[font=\large\ttfamily]
\draw (0,0) rectangle (5,-4);
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (onevarstats) {\onevarstats};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (xbar) at (onevarstats.south west) {\xbar};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysumx) at (xbar.south west) {\mysumx};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysumxsq) at (mysumx.south west) {\mysumxsq};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (s) at (mysumxsq.south west) {\s};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysigmax) at (s.south west) {\mysigmax};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (n) at (mysigmax.south west) {\n};
\end{tikzpicture}
\end{center}

\end{document}
share|improve this question

2 Answers 2

How about just using \Sigma instead of \sum ?

\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}

\usepackage{xparse}
\newcommand\tsurd{\ensuremath{\sqrt{\phantom{i}}}}
\newcommand\txbar{\ensuremath{\overline{\text{x}}}}
\newcommand\sumx{\ensuremath{\Sigma{\text{x}}}}
\newcommand\sumxsq{\ensuremath{\Sigma{\text{x}}^2}}
\newcommand\sigmax{\ensuremath{\sigma{\text{x}}}}
\ExplSyntaxOn
\NewDocumentCommand{\calcinput}{m}
{
 \tl_map_inline:nn { #1 } { ##1 \hspace{0pt} }
}
\ExplSyntaxOff

\pagestyle{empty}
\begin{document}

\def\onevarstats{\calcinput{1-Var\ Stats}}
\def\xbar{\calcinput{\ \txbar:1.23}}
\def\mysumx{\calcinput{\ \sumx:12}}
\def\mysumxsq{\calcinput{\ \sumxsq:140}}
\def\s{\calcinput{\ Sx:3.2}}
\def\mysigmax{\calcinput{\ \sigmax:2.2}}
\def\n{\calcinput{\ n:7}}

\begin{center}
\begin{tikzpicture}[font=\large\ttfamily]
\draw (0,0) rectangle (5,-4);
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (onevarstats) {\onevarstats};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (xbar) at (onevarstats.south west) {\xbar};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysumx) at (xbar.south west) {\mysumx};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysumxsq) at (mysumx.south west) {\mysumxsq};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (s) at (mysumxsq.south west) {\s};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (mysigmax) at (s.south west) {\mysigmax};
\node[align=flush left,text width =5cm,
 anchor=north west,inner sep=1pt] (n) at (mysigmax.south west) {\n};
\end{tikzpicture}
\end{center}

\end{document}

enter image description here

Alternatively you could write \scriptstyle\sum in place of just \sum.

share|improve this answer
    
Perfect! Thanks. –  David Dec 5 '12 at 23:02

Or alternatively you could use the following:

$\textstyle \sum$

enter image description here

share|improve this answer
2  
Welcome to TeX.SX! This does not really answer the question –  Christian Hupfer Apr 6 at 21:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.