First, there is a description in the Art of Problem Solving Wiki, Asymptote: Advanced Configuration – Using Asymptote in LaTeX (also linked in the question regarding portable use), we can partly adapt, but in one point I want to strongly discourage you following this: Instead you should install the sty
files in a local texmf tree, about the reasons you can read in Purpose of local texmf trees.
This will be successful (WinEdt users read Harish Kumar’s answer first, please):
Download Asymptote from http://sourceforge.net/projects/asymptote/files/ and install, where you want. I will use here C:\Program Files\Asymptote
.
The binary in TeX Live is newly built from sources, has some dependencies of other TeX Live binaries and find its asy
scripts with the builtin kpsewhich
mechanism. Hence in difference to How to use Xindy with MiKTeX? the installation from TeX Live files is not recommended.
If not already done Create a local texmf tree in MiKTeX.
Create a subfolder <localtexmf>\tex\latex\asymptote
and copy the three sty
files from the Asymptote main directory in it.
Create an empty file in <localtexmf>\bin\
with the name asymptote.bat
(or with extension .cmd
).
Copy the following, paste it into the batch file and adjust the path according to your setting:
@echo off
SETLOCAL
SET AsyPATH=C:\Program Files\Asymptote
SET PATH=%AsyPATH%;%PATH%
asy.exe %*
This will also ensure, that the Asymptote binary finds the preshipped script files. A remark: When you save the file in Notepad or Wordpad, make sure, that there is no automatic appending of TXT extension – save the file name with double quotes: "asymptote.bat"
.
Refresh the file name database (FNDB). BTW I assume here, that you followed the instructions and added <localtexmf>\bin
to the system path. Actually the batch script could be put elsewhere, as long as it was in the system path.
Asymptote needs also Ghostscript. You have 3 specific opportunities to make it known (adjust path, of course):
- Directly adding the command line option
-gs="<path\to\ghostscript>\bin\gswinc32.exe"
.
Adding the environment variable
ASYMPTOTE_GS=<path\to\ghostscript>\bin\gswinc32.exe
.
(Note, that this did actually not work in my computer, but I didn’t restart.)
The preferred variant for frequent users: Create a file config.asy
in Asymptote’s main directory with following content
import settings;
gs="<path\to\ghostscript>\bin\gswinc32.exe";
Now you can execute Asymptote in your actual work folder. Let’s make a test: Copy the file latexusage.tex
from Asymptote’s examples
subfolder into a test folder, I will use c:\test
here. Open the Command Prompt and execute
cd /d c:\test
,
the /d
switch ensures, that you can also change in one step to another drive.
Then compile with your TeX editor or execute
latex latexusage
.
This will create 3 asy
script files. These 3 files must now be executed with
asymptote latexusage-1.asy
(you could also omit the file extension) and so on for the others.
Then again compile with your TeX editor or execute
latex latexusage
.
The result must look as shown below (I cropped it a bit). In Adobe Reader the interactive example works fine as well.
If you are happy with experimenting a bit, I suggest to proceed as follows. Disclaimer: I don't have a dual boot machine, I kicked Windows off my Laptop years ago.
Install texlive under windows and test it. Then boot into Linux and start the installation of texlive. Cancel the installation process after some minutes. Now, you have a TDS compliant structure, but the content is missing. EDIT: Delete all files and folders inside /texlive/2014/texmf-dist/tex/latex and /texlive/2014/texmf-dist/doc (not in your Windows folder, I'm speaking only of the Linux side!).
Then make two links:
- link from .../texlive/2014/texmf-dist/tex/latex to C:/texlive/2014/texmf-dist/tex/latex
- link from .../texlive/2014/texmf-dist/doc to C:/texlive/2014/texmf-dist/doc
I don't know whether a hard link or a symbolic link, but as Linux has this link feature, I'd check this possibility. Maybe here are some geeks who know exactly how to set a link from a Linux folder to a NTFS folder somewhere else.
Why only those two links? Because the LaTeX packages and the documents make the lions share of the texlive.
OK. Then restart the installation under Linux. I hope that tlmgr will accept the link to your windows installation and then try to install every single package and documentation, but notices they are already there.
Recently I transferred all doc and latex files to another computer and that part (start installation, abort, transfer, restart) worked. But I have no experience with linking into a windows installation.
Of course, you have to install the linux packages for writing into ntfs. And maybe you ruin your texlive installation on windows, if the installer tries something unexpected. But if you make a backup of it, why not giving it a whirl.
Best Answer
The
armel-linux
binaries work on my Raspberry Pi. After mounting the drive I added the path to the arm binaries (undertexlive/bin
) to the search path in.profile
and it worked fine.Another option for Pi users, of course, would be just to install Debian's
texlive
packages viaaptitude
/apt
on the Pi, but those packages are out of date and I wanted to save space on the disk.