nyy 发表于 2023-9-27 09:11:59

nyy 发表于 2023-9-27 08:45
右下角不断迭代:




_{_{_{_{a}{b}}{c}}{d}}{e}


\[_{_{_{_{a}{b}}{c}}{d}}{e}
\]

这个我再好好研究研究

\[_{_{_{_{5}{4}}{3}}{2}}{1}
\]

nyy 发表于 2023-9-27 09:21:57

nyy 发表于 2023-9-27 09:11
\[_{_{_{_{a}{b}}{c}}{d}}{e}
\]



左下角不断迭代的输出结果
\


\

perl代码
#左下角不断延伸角标
#max=5时的输出结果:\
$max=59;#最大的指数是$max
$aa="";#初始值
$bb="{1}";#初始值
$i=2;#循环变量
while($i<$max)
{
    $aa="$aa"."_{";
    $bb="{$i}"."}"."$bb";
    $i++;
}
$str=$aa."_{$max}".$bb;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);

nyy 发表于 2023-9-27 09:25:38

nyy 发表于 2023-9-27 08:45
右下角不断迭代:




左上角不断迭代的结果

\[^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{59}{58}}{57}}{56}}{55}}{54}}{53}}{52}}{51}}{50}}{49}}{48}}{47}}{46}}{45}}{44}}{43}}{42}}{41}}{40}}{39}}{38}}{37}}{36}}{35}}{34}}{33}}{32}}{31}}{30}}{29}}{28}}{27}}{26}}{25}}{24}}{23}}{22}}{21}}{20}}{19}}{18}}{17}}{16}}{15}}{14}}{13}}{12}}{11}}{10}}{9}}{8}}{7}}{6}}{5}}{4}}{3}}{2}}{1}\]


\[^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{59}{58}}{57}}{56}}{55}}{54}}{53}}{52}}{51}}{50}}{49}}{48}}{47}}{46}}{45}}{44}}{43}}{42}}{41}}{40}}{39}}{38}}{37}}{36}}{35}}{34}}{33}}{32}}{31}}{30}}{29}}{28}}{27}}{26}}{25}}{24}}{23}}{22}}{21}}{20}}{19}}{18}}{17}}{16}}{15}}{14}}{13}}{12}}{11}}{10}}{9}}{8}}{7}}{6}}{5}}{4}}{3}}{2}}{1}\]

perl代码

#左上角不断延伸角标
#max=5时的输出结果:\[^{^{^{^{5}{4}}{3}}{2}}{1}\]
$max=59;#最大的指数是$max
$aa="";#初始值
$bb="{1}";#初始值
$i=2;#循环变量
while($i<$max)
{
    $aa="$aa"."^{";
    $bb="{$i}"."}"."$bb";
    $i++;
}
$str=$aa."^{$max}".$bb;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);

nyy 发表于 2023-9-27 12:08:38

nyy 发表于 2023-9-27 09:25
左上角不断迭代的结果




左下角与右上角同时开

\


\

nyy 发表于 2023-9-27 12:11:02

本帖最后由 nyy 于 2023-9-27 12:12 编辑

nyy 发表于 2023-9-27 12:08
左下角与右上角同时开




左下角与左上角同时开

\


\

\


\

nyy 发表于 2023-9-27 12:15:30

nyy 发表于 2023-9-27 12:11
左下角与左上角同时开




四个方向同时开工!

\


\

nyy 发表于 2023-9-27 14:36:57

nyy 发表于 2023-9-27 12:15
四个方向同时开工!




连分数金字塔
\[\frac{1}{1+\frac{2}{1+\frac{3}{1+\frac{4}{1+\frac{5}{1+\frac{6}{1+\frac{7}{1+\frac{8}{1+\frac{9}{1+\frac{10}{1+\frac{11}{1+\frac{12}{1+\frac{13}{1+\frac{14}{1+\frac{15}{1+\frac{16}{1+\frac{17}{1+\frac{18}{1+\frac{19}{1+\frac{20}{1+\frac{21}{1+\frac{22}{1+\frac{23}{1+\frac{24}{1+\frac{25}{1+\frac{26}{1+\frac{27}{1+\frac{28}{1+\frac{29}{1+\frac{30}{1+\frac{31}{1+\frac{32}{1+\frac{33}{1+\frac{34}{1+\frac{35}{1+\frac{36}{1+\frac{37}{1+\frac{38}{1+\frac{39}{1+\frac{40}{1+\frac{41}{1+\frac{42}{1+\frac{43}{1+\frac{44}{1+\frac{45}{1+\frac{46}{1+\frac{47}{1+\frac{48}{1+\frac{49}{1+\frac{50}{1+\frac{51}{1+\frac{52}{1+\frac{53}{1+\frac{54}{1+\frac{55}{1+\frac{56}{1+\frac{57}{1+\frac{58}{1+59}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\]


\[\frac{1}{1+\frac{2}{1+\frac{3}{1+\frac{4}{1+\frac{5}{1+\frac{6}{1+\frac{7}{1+\frac{8}{1+\frac{9}{1+\frac{10}{1+\frac{11}{1+\frac{12}{1+\frac{13}{1+\frac{14}{1+\frac{15}{1+\frac{16}{1+\frac{17}{1+\frac{18}{1+\frac{19}{1+\frac{20}{1+\frac{21}{1+\frac{22}{1+\frac{23}{1+\frac{24}{1+\frac{25}{1+\frac{26}{1+\frac{27}{1+\frac{28}{1+\frac{29}{1+\frac{30}{1+\frac{31}{1+\frac{32}{1+\frac{33}{1+\frac{34}{1+\frac{35}{1+\frac{36}{1+\frac{37}{1+\frac{38}{1+\frac{39}{1+\frac{40}{1+\frac{41}{1+\frac{42}{1+\frac{43}{1+\frac{44}{1+\frac{45}{1+\frac{46}{1+\frac{47}{1+\frac{48}{1+\frac{49}{1+\frac{50}{1+\frac{51}{1+\frac{52}{1+\frac{53}{1+\frac{54}{1+\frac{55}{1+\frac{56}{1+\frac{57}{1+\frac{58}{1+59}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\]

代码perl
#连分数金字塔,分母金字塔
#max=5时的输出结果:\[\frac{1}{1+\frac{2}{1+\frac{3}{1+\frac{4}{1+5}}}}\]
$max=59;#最大的指数是$max
$aa="\\frac{1}";#初始值
$bb="";#初始值
$i=2;#循环变量
while($i<$max)
{
    $aa="$aa"."{1+"."\\frac{$i}";
    $bb="$bb"."}";
    $i++;
}
$str=$aa."{1+$max}".$bb;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "连分数金字塔\n";
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);

nyy 发表于 2023-9-27 14:44:28

nyy 发表于 2023-9-27 14:36
连分数金字塔




\[\frac{1}{1+\frac{1}{2+\frac{1}{3+\frac{1}{4+\frac{1}{5+\frac{1}{6+\frac{1}{7+\frac{1}{8+\frac{1}{9+\frac{1}{10+\frac{1}{11+\frac{1}{12+\frac{1}{13+\frac{1}{14+\frac{1}{15+\frac{1}{16+\frac{1}{17+\frac{1}{18+\frac{1}{19+\frac{1}{20+\frac{1}{21+\frac{1}{22+\frac{1}{23+\frac{1}{24+\frac{1}{25+\frac{1}{26+\frac{1}{27+\frac{1}{28+\frac{1}{29+\frac{1}{30+\frac{1}{31+\frac{1}{32+\frac{1}{33+\frac{1}{34+\frac{1}{35+\frac{1}{36+\frac{1}{37+\frac{1}{38+\frac{1}{39+\frac{1}{40+\frac{1}{41+\frac{1}{42+\frac{1}{43+\frac{1}{44+\frac{1}{45+\frac{1}{46+\frac{1}{47+\frac{1}{48+\frac{1}{49+\frac{1}{50+\frac{1}{51+\frac{1}{52+\frac{1}{53+\frac{1}{54+\frac{1}{55+\frac{1}{56+\frac{1}{57+\frac{1}{58+\frac{1}{59+\frac{1}{60+\frac{1}{61+\frac{1}{62+\frac{1}{63+\frac{1}{64+\frac{1}{65+\frac{1}{66+\frac{1}{67+1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\]


连分数金字塔2

\[\frac{1}{1+\frac{1}{2+\frac{1}{3+\frac{1}{4+\frac{1}{5+\frac{1}{6+\frac{1}{7+\frac{1}{8+\frac{1}{9+\frac{1}{10+\frac{1}{11+\frac{1}{12+\frac{1}{13+\frac{1}{14+\frac{1}{15+\frac{1}{16+\frac{1}{17+\frac{1}{18+\frac{1}{19+\frac{1}{20+\frac{1}{21+\frac{1}{22+\frac{1}{23+\frac{1}{24+\frac{1}{25+\frac{1}{26+\frac{1}{27+\frac{1}{28+\frac{1}{29+\frac{1}{30+\frac{1}{31+\frac{1}{32+\frac{1}{33+\frac{1}{34+\frac{1}{35+\frac{1}{36+\frac{1}{37+\frac{1}{38+\frac{1}{39+\frac{1}{40+\frac{1}{41+\frac{1}{42+\frac{1}{43+\frac{1}{44+\frac{1}{45+\frac{1}{46+\frac{1}{47+\frac{1}{48+\frac{1}{49+\frac{1}{50+\frac{1}{51+\frac{1}{52+\frac{1}{53+\frac{1}{54+\frac{1}{55+\frac{1}{56+\frac{1}{57+\frac{1}{58+\frac{1}{59+\frac{1}{60+\frac{1}{61+\frac{1}{62+\frac{1}{63+\frac{1}{64+\frac{1}{65+\frac{1}{66+\frac{1}{67+1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\]

perl代码
#连分数金字塔2,分母金字塔
#max=5时的输出结果:\[\frac{1}{1+\frac{1}{2+\frac{1}{3+\frac{1}{4+\frac{1}{5+1}}}}}\]
$max=67;#最大的指数是$max
$aa="\\frac{1}";#初始值
$bb="";#初始值
$i=1;#循环变量
while($i<$max)
{
    $aa="$aa"."{$i"."+\\frac{1}";
    $bb="$bb"."}";
    $i++;
}
$str=$aa."{$max+1}".$bb;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "连分数金字塔2\n";
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);

nyy 发表于 2023-10-7 07:53:46

\



代码如上

perl代码
#连分数金字塔3,分母金字塔
#max=5时的输出结果:\
$max=79;#最大的指数是$max
$aa="a_{0}+\\frac{1}";#初始值
$bb="";#初始值
$i=1;#循环变量
while($i<$max)
{
    $aa="$aa"."{a_{$i}"."+\\frac{1}";
    $bb="$bb"."}";
    $i++;
}
$str=$aa."{a_{$max}}".$bb;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "连分数金字塔3\n";
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);



\

nyy 发表于 2023-10-8 11:49:41

\[\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{1}{2}}{3}}{4}}{5}}{6}}{7}}{8}}{9}}{10}}{11}}{12}}{13}}{14}}{15}}{16}}{17}}{18}}{19}}{20}}{21}}{22}}{23}}{24}}{25}}{26}}{27}}{28}}{29}}{30}}{31}}{32}}{33}}{34}}{35}}{36}}{37}}{38}}{39}}{40}}{41}}{42}}{43}}{44}}{45}}{46}}{47}}{48}}{49}}{50}}{51}}{52}}{53}}{54}}{55}}{56}}{57}}{58}}{59}}{60}}{61}}{62}}{63}}{64}}{65}}{66}}{67}}{68}}{69}}{70}}{71}}{72}}{73}}{74}}{75}}{76}}{77}}{78}}{79}}{80}}{81}\]



#正金字塔(上小下大)
#max=5时的输出结果:\[\frac{\frac{\frac{\frac{1}{2}}{3}}{4}}{5}\]
$max=81;#最大的是$max
$aa="1";#初始值
$i=2;#循环变量
while($i<=$max)
{
    $aa="\\frac{$aa}{$i}";
    $i++;
}
$str=$aa;#拼成输出结果
#输出结果
open(FH,">>out2.txt");
print FH "正金字塔(上小下大)\n";
print FH "\\[$str\\]";#LaTeX输出
print FH "\n";#换行
close(FH);


\[\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{\frac{1}{2}}{3}}{4}}{5}}{6}}{7}}{8}}{9}}{10}}{11}}{12}}{13}}{14}}{15}}{16}}{17}}{18}}{19}}{20}}{21}}{22}}{23}}{24}}{25}}{26}}{27}}{28}}{29}}{30}}{31}}{32}}{33}}{34}}{35}}{36}}{37}}{38}}{39}}{40}}{41}}{42}}{43}}{44}}{45}}{46}}{47}}{48}}{49}}{50}}{51}}{52}}{53}}{54}}{55}}{56}}{57}}{58}}{59}}{60}}{61}}{62}}{63}}{64}}{65}}{66}}{67}}{68}}{69}}{70}}{71}}{72}}{73}}{74}}{75}}{76}}{77}}{78}}{79}}{80}}{81}\]
页: 1 [2]
查看完整版本: LaTeX盖楼帖