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
5  
Since you have some responses that seem to answer your historical questions, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. As of now, your "accept rate" is showing a 0%. –  Werner Dec 5 '12 at 19:26

1 Answer 1

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

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.