# How can I define/draw a Gamma Function to write it as per this image [closed]

Want to define a function such that it draws gamma function as per this image

• your image is not readable. Do you like to write this equation or draw Gamma function? From tag one can conclude, that you looking for symbol $\Gamma$ ... Clarify your question! Commented Jan 2, 2020 at 9:31
• Do you mean something like this picture (click)? Commented Jan 2, 2020 at 10:07
• @egreg Wish you and your family a very happy New year... Commented Jan 2, 2020 at 11:30
• I have never seen a $\Gamma(1+p)$ where the “roof” of \Gamma extends to cover the argument. Could you please elaborate more about where your notation comes from (instead of just a photo)? Commented Jan 2, 2020 at 14:53
• – Werner
Commented Jan 2, 2020 at 18:44

Does one of the following possible solutions meet your formatting needs?

I must confess to not knowing what these expressions may have in common with the (conventionally defined) gamma function.

\documentclass{article}
\usepackage{array}
% The following two macros must be used in math mode:
\newcommand\solutionA[1]{%
\mathop{}\!\begin{array}[b]{|c}\hline #1 \end{array}}
\newcommand\solutionB[1]{%
\mathop{}\!\begin{array}[b]{|@{\,}c@{\,}}\hline #1 \end{array}}
%% (The \mathop{}\! particles serve to insert a bit of whitespace, if needed.
%%  Many thanks to @egreg for providing this suggestion.)

\begin{document}
$\solutionA{1+p}$ $\solutionB{1+p}$
\end{document}

• The array (with default optional argument [c]) approach will produce a different baseline for the 1+p with respect to the surrounding material. See github.com/latex3/latex2e/issues/147 Better to explicitly specify [t] or [b]. Since it is only one row, it should not matter. Commented Jan 2, 2020 at 14:45
• @RuixiZhang - Many thanks. I've implemented your suggestion to use the [b] placement specifier for the array environments. Let's see if the OP weighs in with his/her opinion on whether my suggestions are even close to what is needed.
– Mico
Commented Jan 2, 2020 at 15:08
• I'd consider adding \mathop{}\! in front of \solutionB (which is better than \solutionA). Commented Jan 2, 2020 at 17:24
• @egreg - Thanks for this suggestion. I've updated the macros \solutionA and \solutionB accordingly. I'm still hoping that the OP will weigh in and provide some more information about the mysterious desired format for the gamma function...
– Mico
Commented Jan 2, 2020 at 21:01
• Thank you very much for your kind help. I have tried to do some editing in your formula but I am unable to add some whitespace between 1 (of 1/2) and the overline, I typed this $\solutionB{\frac{1}{2}}$.
– Anit
Commented Jan 27, 2020 at 6:47