source: pst/typesetting/asymptote.xml@ 0fb7167

ken/TL2024 lazarus trunk
Last change on this file since 0fb7167 was 1d4d4a96, checked in by Ken Moffat <zarniwhoop@…>, 4 months ago

Tag asymptote.

Trying to create svg files from asy no-longer works, so I have
commented the dvisvgm dependency.

  • Property mode set to 100644
File size: 10.4 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY asymptote-download-http "&sourceforge-dl;/asymptote/asymptote-&asymptote-version;.src.tgz">
8 <!ENTITY asymptote-download-ftp " ">
9 <!ENTITY asymptote-md5sum "cbba3fe866982ed1dd60b903f632a04c">
10 <!ENTITY asymptote-size "15 MB">
11 <!ENTITY asymptote-buildsize "218 MB (54 MB installed, with all the dependencies which are in BLFS)">
12 <!-- with 2.68 the j1 time was 2.5 SBU, slow enough to use a parallel build -->
13 <!ENTITY asymptote-time "1.3 SBU (using parallelism=4)">
14]>
15
16<sect1 id="asymptote" xreflabel="asymptote-&asymptote-version;">
17 <?dbhtml filename="asymptote.html"?>
18
19
20 <title>asymptote-&asymptote-version;</title>
21
22 <indexterm zone="asymptote">
23 <primary sortas="a-asymptote">asymptote</primary>
24 </indexterm>
25
26 <sect2 role="package">
27 <title>Introduction to asymptote</title>
28
29 <para>
30 <application>Asymptote</application> is a powerful descriptive vector
31 graphics language that provides a natural coordinate-based framework for
32 technical drawing. Labels and equations can be typeset with LaTeX. As
33 well as EPS, PDF and PNG output it can produce WebGL 3D HTML rendering
34 and (using <application>dvisvgm</application>) SVG output.
35 </para>
36
37 &lfs121_checked;
38
39 <bridgehead renderas="sect3">Package Information</bridgehead>
40 <itemizedlist spacing="compact">
41 <listitem>
42 <para>
43 Download (HTTP): <ulink url="&asymptote-download-http;"/>
44 </para>
45 </listitem>
46 <listitem>
47 <para>
48 Download (FTP): <ulink url="&asymptote-download-ftp;"/>
49 </para>
50 </listitem>
51 <listitem>
52 <para>
53 Download MD5 sum: &asymptote-md5sum;
54 </para>
55 </listitem>
56 <listitem>
57 <para>
58 Download size: &asymptote-size;
59 </para>
60 </listitem>
61 <listitem>
62 <para>
63 Estimated disk space required: &asymptote-buildsize;
64 </para>
65 </listitem>
66 <listitem>
67 <para>
68 Estimated build time: &asymptote-time;
69 </para>
70 </listitem>
71 </itemizedlist>
72
73 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
74 <itemizedlist spacing="compact">
75 <listitem>
76 <para>
77 Required patch:
78 <ulink url="&patch-root;/asymptote-&asymptote-version;-build_fix-1.patch"/>
79 </para>
80 </listitem>
81 </itemizedlist>
82
83 <bridgehead renderas="sect3">asymptote Dependencies</bridgehead>
84
85 <bridgehead renderas="sect4">Required</bridgehead>
86 <para role="required">
87 <xref linkend="gs"/> and
88 <xref linkend="texlive"/>
89 </para>
90
91 <bridgehead renderas="sect4">Recommended</bridgehead>
92 <para role="recommended">
93 <xref linkend="curl"/>,
94 <xref linkend="freeglut"/>,
95 <xref linkend="gc"/>,
96 <xref linkend="glew"/>,
97 <xref linkend="glm"/> and
98 <xref linkend="libtirpc"/>
99 </para>
100
101<!-- Suppressed: Creating svg from asy longer works.
102 Other formats such as (rotatable) html, png and pdf work,
103 and using asy to create PDFs with latex also works.
104
105PostScript error: undefined in finddeviceOperand stack:
106 [...]
107 shipout3(prefix,f,preview ? nativeformat() : format,
108 ^
109/opt/texlive/2023/texmf-dist/asymptote/three.asy: 2896.13: runtime: shipout failed
110
111 <bridgehead renderas="sect4">Recommended at runtime</bridgehead>
112 <para role="recommended">
113 <xref role="runtime" linkend="dvisvgm"/> to allow svg output
114 </para>-->
115
116 <bridgehead renderas="sect4">Optional</bridgehead>
117 <para role="optional">
118 <xref linkend="fftw"/>,
119 <xref linkend="gsl"/>,
120 <xref linkend="libsigsegv"/>,
121 both <xref linkend="boost"/> and
122 <ulink url="https://github.com/Tencent/rapidjson/releases/">rapidjson</ulink>
123 to use
124 <ulink url="https://microsoft.github.io/language-server-protocol/implementors/tools/">LSP</ulink>
125 which can be used with
126 <ulink url="https://asymptote.sourceforge.io/doc/Language-server-protocol.html#index-LSP/">emacs</ulink>,
127 and <ulink url="https://eigen.tuxfamily.org/">eigen</ulink>
128 </para>
129
130 <bridgehead renderas="sect4">Optional (at runtime)</bridgehead>
131 <para role="optional">
132 <xref linkend="imagemagick"/> to convert output to other formats such as
133 JPEG or to create animated GIFs,
134 <ulink url="https://pypi.org/project/PyQt5/">PyQt5</ulink> (not tested,
135 has a build dependency of &qt5-deps;) to use xasy.
136 </para>
137
138 <para condition="html" role="usernotes">
139 Editor Notes: <ulink url="&blfs-wiki;/asymptote"/>
140 </para>
141 </sect2>
142
143 <sect2 role="installation">
144 <title>Installation of asymptote</title>
145
146 <note>
147 <!-- This is specifically about my cylinder test - it has been
148 broken twice, one time the fix involved changing the script,
149 the second was blamed on the low-end hardware (radeon 3400G).
150 I don't use, or understand the commands of, asy so I will not
151 spend time bisecting it. Ken -->
152 <para>
153 Certain 3D PDF scripts may not work when invoked from pdflatex
154 on some zen+ amdgpu APU machines.
155 </para>
156 </note>
157
158<!-- Editors: for testing this, the minimal latex functionality is
159 covered by the cylinder and triangle tests in
160 https://www.linuxfromscratch.org/~ken/tex-testfiles/latex-test-20220322.tar.xz
161 but the more interesting stuff (WebM html, svg, png, pdf) is tested in
162 https://www.linuxfromscratch.org/~ken/asy-nontex-testfiles/asy-test-20200809.tar.xz
163-->
164 <para>
165 First apply a patch to fix building without the Language Server Protocol :
166 </para>
167
168<screen><userinput>patch -Np1 -i ../asymptote-&asymptote-version;-build_fix-1.patch</userinput></screen>
169
170 <para>
171 Install <application>asymptote</application> by running the following
172 commands:
173 </para>
174
175<screen><userinput>export TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/') &amp;&amp;
176
177./configure --prefix=$TEXLIVE_PREFIX \
178 --bindir=$TEXLIVE_PREFIX/bin/$TEXARCH \
179 --datarootdir=$TEXLIVE_PREFIX/texmf-dist \
180 --infodir=$TEXLIVE_PREFIX/texmf-dist/doc/info \
181 --libdir=$TEXLIVE_PREFIX/texmf-dist \
182 --mandir=$TEXLIVE_PREFIX/texmf-dist/doc/man \
183 --disable-lsp \
184 --enable-gc=system \
185 --with-latex=$TEXLIVE_PREFIX/texmf-dist/tex/latex \
186 --with-context=$TEXLIVE_PREFIX/texmf-dist/tex/context/third &amp;&amp;
187
188make</userinput></screen>
189
190 <para>
191 To test the results, issue: <command>make check</command>.
192 </para>
193
194 <para>
195 Now, as the <systemitem class="username">root</systemitem> user:
196 </para>
197
198<screen role="root"><userinput>make install</userinput></screen>
199
200 </sect2>
201
202 <sect2 role="commands">
203 <title>Command Explanations</title>
204
205 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
206 href="../../xincludes/tex-prefix.xml"/>
207
208 <para>
209 <parameter>--libdir=$TEXLIVE_PREFIX/texmf-dist</parameter>:
210 This parameter ensures that the <filename
211 class="directory">asymptote</filename> directory will similarly
212 overwrite any files installed by install-tl-unx.
213 </para>
214
215 <para>
216 <parameter>--disable-lsp</parameter>: The Language Server Protocol is
217 enabled by default, with several third-party sources included, but it
218 does not build unless boost and repidjson have been installed.
219 </para>
220
221 <para>
222 <parameter>--enable-gc=system</parameter>: this ensures that the system
223 version of <filename class="libraryfile">libgc.so</filename> will be used
224 instead of the version shipped with this package.
225 </para>
226
227 <para>
228 <parameter>--with-latex=</parameter>
229 <parameter>--with-context=</parameter>: These switches
230 ensure that style files and a tex file will be installed into the
231 <application>texlive</application> directories instead of creating a
232 <filename class="directory">texmf-local</filename> directory for them.
233 </para>
234
235 <!-- commenting for now: 2.44 installs asymptote.info in both places
236 so the old version no longer remains
237
238 <para>
239 <command>rm -fv /opt/texlive/.../asymptote.info</command>:
240 This deletes the file installed by <application>texlive</application>.
241 Exceptionally, asymptote will create an <filename
242 class="directory">asymptote/</filename> subdirectory for its own
243 <filename>asymptote.info</filename> even though a possibly older
244 version from <xref linkend="texlive"/> is in the main
245 <application>texlive</application>
246 <filename class="directory">info/</filename> directory. Both the
247 new version and the existing <filename>asy-faq.info</filename>
248 <emphasis>will</emphasis> be found by <command>info</command>.
249 </para>-->
250
251 </sect2>
252
253 <sect2 role="content">
254 <title>Contents</title>
255
256 <segmentedlist>
257 <segtitle>Installed Programs</segtitle>
258 <segtitle>Installed Libraries</segtitle>
259 <segtitle>Installed Directory</segtitle>
260
261 <seglistitem>
262 <seg>
263 asy, xasy
264 </seg>
265 <seg>
266 None
267 </seg>
268 <seg>
269 $TEXLIVE_PREFIX/texmf-dist/asymptote,
270 $TEXLIVE_PREFIX/doc/asymptote,
271 $TEXLIVE_PREFIX/info/asymptote
272 </seg>
273 </seglistitem>
274 </segmentedlist>
275
276 <variablelist>
277 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
278 <?dbfo list-presentation="list"?>
279 <?dbhtml list-presentation="table"?>
280
281 <varlistentry id="asy">
282 <term><command>asy</command></term>
283 <listitem>
284 <para>
285 is a vector graphics program
286 </para>
287 <indexterm zone="asymptote asy">
288 <primary sortas="b-asy">asy</primary>
289 </indexterm>
290 </listitem>
291 </varlistentry>
292
293 <varlistentry id="xasy">
294 <term><command>xasy</command></term>
295 <listitem>
296 <para>
297 is a Python3 script providing a Qt5 GUI for asy
298 </para>
299 <indexterm zone="asymptote xasy">
300 <primary sortas="b-xasy">xasy</primary>
301 </indexterm>
302 </listitem>
303 </varlistentry>
304
305 </variablelist>
306
307 </sect2>
308
309</sect1>
Note: See TracBrowser for help on using the repository browser.