# FrontEnd: Creating an Input Style that produces a specific Output Style.

**URL:** <https://community.wolfram.com/t/frontend-creating-an-input-style-that-produces-a-specific-output-style/338>\
**Category:** Questions\
**Tags:** mathematica, interface-construction\
**Created:** [August 6, 2013, 4:44pm UTC](https://community.wolfram.com/t/frontend-creating-an-input-style-that-produces-a-specific-output-style/338 "2013-08-06T16:44:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccarter](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/ccarter/32/36312_2.png) [@ccarter](https://community.wolfram.com/u/ccarter)\
**Post date:** [August 6, 2013, 4:44pm UTC](https://community.wolfram.com/t/frontend-creating-an-input-style-that-produces-a-specific-output-style/338/1 "2013-08-06T16:44:15Z")

</div>

Hello,

Suppose that I have created two input styles (say the normal input style from Core.nb) and another called myInputStyle; also, suppose that I have another Output Style called myOutputStyle.

I have a suite of notebooks with embedded style sheets that have these two different kinds of input and output styles.

I’d like to have myInputStyle produce only myOutputStyle.

I do realize that this will not play nice with standard style sheets. But, I’ll solve that problem later----I hope.

I am not sure where to look in the documentation for this----or find an example from which I can extrapolate a solution.

If anyone has a pointer to the right direction, or even the name of a Cell Option to look at, I’d be grateful.  
Thanks, Craig

---

<div class="post-metadata">

**Author:** ![kurtg](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kurtg/32/1069_2.png) [@kurtg](https://community.wolfram.com/u/kurtg)\
**Post date:** [August 14, 2013, 9:35pm UTC](https://community.wolfram.com/t/frontend-creating-an-input-style-that-produces-a-specific-output-style/338/2 "2013-08-14T21:35:49Z")

</div>

CellEvaluationFunction might be what you are looking for.

The following creates a notebook where evaluating the first cell gives a result  
similar to a typical evaluation. Evaluating the second cell gives a result with  
“Input” style instead. Evaluation the third cell gives a result with “Text” style.

```auto
CreateDocument[Notebook[{
   Cell[BoxData[RowBox[{"2", " ", "3"}]], "Input", 
    CellEvaluationFunction -> (NotebookWrite[EvaluationNotebook[], 
        Cell[BoxData[ToString[ToExpression[#]]], "Output"]] &)],
   Cell[BoxData[RowBox[{"2", " ", "3"}]], "Input", 
    CellEvaluationFunction -> (NotebookWrite[EvaluationNotebook[], 
        Cell[BoxData[ToString[ToExpression[#]]], "Input"]] &)],
   Cell[BoxData[RowBox[{"2", " ", "3"}]], "Input", 
    CellEvaluationFunction -> (NotebookWrite[EvaluationNotebook[], 
        Cell[ToString[ToExpression[#]], "Text"]] &)]
   }]]

```

You should be able to add CellEvaluationFunction to your ‘myInputStyle’ style and specify the ‘myOutputStyle’ style in the corresponding NotebookWrite[].
