//..................................................................... /// <summary> /// /// </summary> /// <returns></returns> private OpxM.Denominator mathDenom_2_A( ) { OpxM.Denominator denominator1 = new OpxM.Denominator( ); OpxM.Run run10 = mathNumP002( ); OpxM.Run run11 = mathA( ); denominator1.Append(OpenDocxMathExprs.MakeMathRun("2a")); denominator1.Append(run11); return(denominator1); }
//..................................................................... /// <summary> /// 使用常规的字符串生成一个分式(标准的、上下格式) /// </summary> /// <param name="upper"></param> /// <param name="lower"></param> /// <returns></returns> public static M.Fraction MakeFraction(string upper, string lower) { M.Fraction fraction = new M.Fraction( ); M.Numerator upperNUM = new M.Numerator( ); upperNUM.Append(OpenDocxMathExprs.MakeMathRun(upper)); M.Denominator lowerDEN = new M.Denominator( ); lowerDEN.Append(OpenDocxMathExprs.MakeMathRun(lower)); fraction.Append(OpenDocxMathExprs.MakeFractionProperties( )); fraction.Append(upperNUM); fraction.Append(lowerDEN); return(fraction); }
//..................................................................... /// <summary> /// /// </summary> /// <param name="upper"></param> /// <param name="lower"></param> /// <returns></returns> public static M.Fraction MakeFraction(OpenXmlElement upper, OpenXmlElement lower) { M.Fraction fraction = new M.Fraction( ); M.Numerator upperNUM = new M.Numerator( ); upperNUM.Append(upper); M.Denominator lowerDEN = new M.Denominator( ); lowerDEN.Append(lower); fraction.Append(OpenDocxMathExprs.MakeFractionProperties( )); fraction.Append(upperNUM); fraction.Append(lowerDEN); return(fraction); }