如何使用自訂欄輸入分數?

如何使用自訂欄輸入分數?

我想用以下自訂欄來排版分數(小邊緣見下文);這與連分數有關。當然,下面的範例非常簡單,但它應該是可調整大小的,因為我需要將它與相當複雜的表達式一起使用。我怎樣才能實現它?問候。

在此輸入影像描述

答案1

在此輸入影像描述

\documentclass{article}

\usepackage{amsmath}

\newcommand\zfrac[2]{{\tabcolsep=2pt\begin{array}{c}%
#1\\
\noalign{\vskip-7pt}
\multicolumn{1}{@{}c@{}}{\rule[-3pt]{.4pt}{3pt}\hrulefill\rule{.4pt}{3pt}}\\
\noalign{\vskip-2pt}
#2\end{array}}}

\begin{document}


\[
\frac{1}{2} + \zfrac{1}{2} + \zfrac{111}{222}
\]

\end{document}

相關內容