• API
• FAQ
• Tools
• Archive
daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Mar 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. documentclass{article}
2. usepackage{fp}
3. usepackage{siunitx,amsmath}
4. %usepackage{xparse}
5. ExplSyntaxOn
6. NewDocumentCommand{newarray}{m}
7.  {
8.   seq_new:c { l_hafid_array_ cs_to_str:N #1 _seq }
9.   cs_new:Npn #1 (##1)
10.    {
11.     seq_item:cn { l_hafid_array_ cs_to_str:N #1 _seq } { ##1 }
12.    }
13.  }
15.  {
16.   seq_set_split:cnn { l_hafid_array_#1_seq } { & } { #2 }
17.  }
18. cs_generate_variant:Nn seq_set_split:Nnn { c }
19. ExplSyntaxOff
20.
21. begin{document}
22.
23. newarraysomevalues
25.
26. begin{align*}
27. v_1 &= somevalues(1)\
28. v_2 &= somevalues(2)\
29. v_3 &= somevalues(3)\
30. v_4 &= somevalues(4)\
31. v_5 &= somevalues(5)
32. end{align*}
33.
34. First number = somevalues(1)\
35. Second number = somevalues(2)
36.
38. FPeval{xx}{round(xx,4)}%
39. sum of first two numbers = xx
40.
41. FPevalxx{somevalues(1)+somevalues(2)}
42. FPeval{xx}{round(xx,4)}%
43. sum of first two numbers = xx
44.
45.
46. %
47. newcountcount
48. count=5
49. FPsetans{0}
50. loop
51. %somevalues(count)\