Greetings

On 23 Feb 2016, at 20:46, Jens Axel Søgaard wrote:

Use case: The paths to LaTeX has changed on El Capitan,
which makes it difficult to choose a default path, that works
for all.

Addressing that particular use-case (following the motto that one should test the functionality rather than switch on the version), and if a system call is OK, then adapting Stephen De Gabrielle's example you could try

#lang racket/base
(require racket/system racket/port)

(let-values (((base name must-be-dir?)
              (split-path
               (string->path
                (with-output-to-string (λ ()
                                         (system "which tex")))))))
  (printf "binaries in ~a~%" base))

or call out to "tlmgr conf" or one of its subcommands (if your installation is based on TeXLive). This would obviously work on other unixes, and there might be a path-searching equivalent on Windows, too.

All the best,

Norman


--
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to