Code Monkey home page Code Monkey logo

tectonic.jl's Introduction

Tectonic

CI Codecov

Compile LaTeX files in Julia using the tectonic typesetting system. Also provides a biber binary that is compatible with the version of the biblatex package provided with tectonic.

Binaries

This package wraps the official binaries for both bundled programs:

Supported Operating Systems and Julia Versions

The package provides binaries for 64-bit Linux, MacOS, and Windows and has been tested against Julia 1.3 to 1.8.

Examples

(@v1.6) pkg> add Tectonic

julia> using Tectonic

julia> tectonic() do bin
           run(`$bin file.tex`)
       end

Using biber with tectonic

If you need to compile a document that contains biblatex then you will need to provide the biber program to tectonic by adding it to the PATH. This can be done by calling Biber.biber as follows

julia> biber() do _
           tectonic() do bin
               run(`$bin file.tex`)
           end
       end

If biber already exists on your PATH then calling Tectonic.tectonic will find it automatically and use it.

tectonic.jl's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar michaelhatherly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tectonic.jl's Issues

Use jll method to run binary

It's worth considering if the interface to this package should use the same method as the one used by jll packages. This would look like

Tectonic.binary() do t
   run(`$t file.tex`)
end

The reason jll packages use this form is that it allows them the ability to manipulate the PATH and LD_LIBRARY_PATH before running the commands. Even though that might not be useful for this package now, I think its worth doing for two reasons. One, to ensure consistency across the ecosystem, and two, to keep open the possibility that the artifacts could be built and distributed by BinaryBuilder some day as jll packages.

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Failed to compile on M1 Mac

When installing TikzPictures.jl, this package fails to build. Below is the (slightly abridged) output from import Pkg; Pkg.precompile(). I'm on a 2020 M1 MacBook Air running macOS 11.4 Big Sur.

I was able to install tectonic separately using homebrew, so perhaps there is a way for this project to support it without too much effort.

ERROR: LoadError: Failed to precompile Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f] to /Users/plavin3/.julia/compiled/v1.7/Tectonic/jl_hxNb1w.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
    @ Base ./loading.jl:1466
  [3] compilecache(pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1410
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1120
  [5] require(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1013
  [6] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:997
  [7] include
    @ ./Base.jl:418 [inlined]
  [8] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:373 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [12] top-level scope
    @ none:1
in expression starting at /Users/plavin3/.julia/packages/TikzPictures/Kichj/src/TikzPictures.jl:1

Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f]

Failed to precompile Tectonic [9ac5f52a-99c6-489f-af81-462ef484790f] to /Users/plavin3/.julia/compiled/v1.7/Tectonic/jl_BmOu0i.
ERROR: LoadError: Cannot locate artifact 'tectonic_bin' for aarch64-apple-darwin-libgfortran5-cxx11-julia_version+1.7.1 in '/Users/plavin3/.julia/packages/Tectonic/IR51S/Artifacts.toml'
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] artifact_slash_lookup(name::String, artifact_dict::Dict{String, Any}, artifacts_toml::String, platform::Base.BinaryPlatforms.Platform)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:608
  [3] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any, platform::Nothing)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:678
  [4] var"@artifact_str"(__source__::LineNumberNode, __module__::Module, name::Any)
    @ Artifacts /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Artifacts/src/Artifacts.jl:641
  [5] include
    @ ./Base.jl:418 [inlined]
  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [7] top-level scope
    @ none:1
  [8] eval
    @ ./boot.jl:373 [inlined]
  [9] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [10] top-level scope
    @ none:1
in expression starting at /Users/plavin3/.julia/packages/Tectonic/IR51S/src/Tectonic.jl:35
in expression starting at /Users/plavin3/.julia/packages/Tectonic/IR51S/src/Tectonic.jl:1

Stacktrace:
 [1] pkgerror(msg::String)
   @ Pkg.Types /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/Types.jl:68
 [2] precompile(ctx::Pkg.Types.Context; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1362
 [3] precompile
   @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1013 [inlined]
 [4] #precompile#220
   @ /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011 [inlined]
 [5] precompile()
   @ Pkg.API /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Pkg/src/API.jl:1011
 [6] top-level scope
   @ REPL[7]:1

There seems to be a tectonic jll package. Would it be better to use it directly?

First of all, thanks for having set up all of this! It saved me a ton of headaches in creating https://github.com/Krastanov/Quantikz

As I was looking up more details about this package on juliahub, I stumbled upon https://github.com/JuliaBinaryWrappers/tectonic_jll.jl (Is this something you have done? I can not find the author of this jll package)

Could you consider using that package instead of the artefacts you already have? The main reason I am hoping for this is that the jll package supports more architectures and is (supposedly) much easier to update/recompile/target another system.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.