tectonic-typesetting / tectonic Goto Github PK
View Code? Open in Web Editor NEWA modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive.
Home Page: https://tectonic-typesetting.github.io/
License: Other
A modernized, complete, self-contained TeX/LaTeX engine, powered by XeTeX and TeXLive.
Home Page: https://tectonic-typesetting.github.io/
License: Other
We should use rust-crypto for this, since we need that crate for SHA256 sums anyway.
$ tectonic Documents/xxx.tex
...
Running xdvipdfmx ...
error: cannot open "Documents/xxx.xdv
Currently there does not seem to be a way to enable SyncTeX, which is rather convenient for interactive editing.
Cannot use tectonic to process the tex files.
Machine information:
export PATH="/Users/user/miniconda3/bin:$PATH"
Expected:
Parsed the tex file and produce a pdf document.
Result:
Failure:
tectonic file.tex
note: this is a BETA release; report issues at https://github.com/tectonic-typesetting/tectonic/issues
note: indexing http://purl.org/net/pkgwpub/tectonic-default
note: resolved to https://dl.bintray.com/pkgw/tectonic/tl2016extras/2016.0r4/tlextras-2016.0r4.tar
note: downloading SHA256SUM
warning: failure requesting "SHA256SUM" from network
caused by: Connection closed
caused by: Connection closed
warning: failure requesting "SHA256SUM" from network
caused by: Connection closed
caused by: Connection closed
warning: failure requesting "SHA256SUM" from network
caused by: Connection closed
caused by: Connection closed
warning: failure requesting "SHA256SUM" from network
caused by: Connection closed
caused by: Connection closed
error: failed to retrieve "SHA256SUM" from the network
Matt ran into this one in practice.
According to a comment in #35, if you process a biblatex
/biber
document with Tectonic, you get something with unprocessed references but no messages indicating that there's been a problem. Solving #35 will take a while, but in the meantime, we should add some hacks to detect documents that require biber
and warn the user that we can't do it.
I confess that I am not fully clear as to whether the standard practice is that the user or driver manually executes biber
after the first TeX engine run, or whether some shell-escape magic can be enabled that makes it happen automatically during processing.
Problem with Tectonic 0.1.6-dev on Linux/AMD64.
Output from tectonic:
warning: could not calculate MD5 of file "bug.out": it does not exist
warning: Cannot parse cross-reference stream.
warning: Error while parsing PDF file.
error: something bad happened inside TeX; its output follows:
===============================================================================
===============================================================================
error: halted on potentially-recoverable error as specified
The input file (with file FonCSI.pdf in the current directory, downloadable from https://filebin.ca/3ObTUBGTUmmZ/FonCSI.pdf):
\documentclass{beamer}
\usepackage{tikz}
\setbeamertemplate{background canvas}{
\begin{tikzpicture}[remember picture,overlay]
\node[shift={(-0.8cm,0.6cm)}] at (current page.south east)
{\href{https://risk-engineering.org/}{\includegraphics[width=1cm]{FonCSI}}};
\end{tikzpicture}}
\begin{document}
\begin{frame}{Foo}
Foo.
\end{frame}
\end{document}
Maybe a document specfies a font that is resolvable as a system font, but it turns out to be the same thing as a font that we have in a bundle. In that case we should figure this out, use the bundle file, and suggest to the user that they specify the font in a way that results in it getting pulled from the bundle rather than having to go through the system file lookup. (In particular, you need to specify the font as a particular file name: texgyrepagella-regular.otf
, not TeX Gyre Pagella
.)
In Rust, if you have structs that can be created with a lot of different options, the recommended pattern is to use a series of functions in a factory object, for both forward-compatibility and clarity. See, for instance, std::fs::OpenOptions.
Several structs in Tectonic should be constructed in this way, but I've done things in an old-fashioned way with single functions that take lots of arguments. Examples include tectonic::io::Filesystem
, tectonic::io::LocalCache
, tectonic::engines::TexEngine
, and so on. These should be refactored to the better, Rust-y style.
Assuming this structure
|_tex
|_ main.tex
|_ content
|_ 1.tex
and main.tex
contains \include{content/1.tex}
you need to call tectonic from within the tex directory.
If you call it like tectonic tex/main.tex
you get an error:
! LaTeX Error: File `misc/header.tex' not found.
Would be nice to have an --inplace
option which always sets the working directory to the directory of your main.tex, i.e. tectonic tex/main.tex --inplace
would be valid.
Man, I can't believe this actually happened in practice, but I ended up with a manifest file looking like this:
n022023l.afmn022023l.afm 00 --
n022023l.afm.afmn022023l.afm.afm 00 --
n022023l.afm 0 -
I.e., two different processes appended simultaneously and messed up the file format. What are the odds? But, we want to be super parallel friendly, so I guess we need locking. We could try relying on rename()
to modify the manifest file atomically, but then we'll run the risk of losing work if two processes are adding entries at once.
Cf. issues like #30 or #33. When a file is just missing from the bundle, it would be good to give the user more guidance as to what to do. Namely.
You could even imagine adding a metadata file to the bundle that includes an issue URL, so that in a hypothetical world with different bundles that people can choose, you can customize the URL that they see.
It seems that some biblatex
modes require the backend program biber
as an alternative to bibtex
. (Cf issue #33.) I don't know anything about it, but perhaps we should add it.
To gauge interest, everyone is invited to add a short comment on this issue if they use biber
in their day-to-day TeX'ing.
It would be nice to have a cool logo. My personal goals are:
When you try to use tectonic with file that contain spaces in filename (MacOS) this is happening:
» tectonic file\ name\ with\ spaces.tex
note: this is a BETA release; report issues at https://github.com/tectonic-typesetting/tectonic/issues
Running TeX ...
note: indexing http://purl.org/net/pkgwpub/tectonic-default
note: resolved to https://dl.bintray.com/pkgw/tectonic/tl2016extras/2016.0r3/tl2016extras.tar
note: downloading SHA256SUM
error: something bad happened inside TeX; its output follows:
===============================================================================
===============================================================================
error: failed to open input file "file"
Could you please explain the choice of XeTeX over LuaTeX?
It surprises me a bit, since it seems that the latter has been chosen as pdfTeX successor, but also has full Lua power.
Mh, maybe are you planning to add Rust power to Tectonic? 😃
Oddly, GitHub seems to be identifying this project as using the C language, even though it is known to support identification of Rust. I presume you see the same at https://github.com/tectonic-typesetting.
The relevant API has stabilized in 1.16.0, I think: here.
James ran into this.
I would love to use this for a project that I’ve been stalled on for quite some time, because deciding on a good layout/text rendering stack was too hard and rolling my own was taking too long. If it looks like this can really suit my needs I’ll become a contributor to this project and be forever grateful to you for making it in the first place!
Windows support is an essential for this project of mine.
Compiling mkstemp-rs v0.0.2
error[E0432]: unresolved import `std::os::unix::io::FromRawFd`
--> C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\mkstemp-rs-0.0.2\src\lib.rs:17:5
|
17 | use std::os::unix::io::FromRawFd;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Could not find `unix` in `os`
error[E0425]: cannot find function `mkstemp` in module `libc`
--> C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\mkstemp-rs-0.0.2\src\lib.rs:37:33
|
37 | let fd = unsafe { libc::mkstemp(ptr) };
| ^^^^^^^ not found in `libc`
error: no associated item named `from_raw_fd` found for type `std::fs::File` in the current scope
--> C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\mkstemp-rs-0.0.2\src\lib.rs:44:29
|
44 | let file = unsafe { File::from_raw_fd(fd) };
| ^^^^^^^^^^^^^^^^^
error: aborting due to previous error
error: Could not compile `mkstemp-rs`.
I’ll look into this myself in around eight hours’ time if you don’t earlier.
I just stumbled across this project, and was very pleased to find it indeed! I managed to get it building and running on my system, though it would be great with some examples, and I really think that would help get people more interested in your project.
In any case, I'd be glad to lend a hand with this project, if you feel it could help. Perhaps you have something that could be worked on largely independently? Maybe some example programs, for a start. Just let me know, and I can work on a PR.
The following tex file
\documentclass{article}
\usepackage[brazil]{babel}
\begin{document}
\end{document}
produces this error:
note: this is a BETA release; report issues at https://github.com/tectonic-typesetting/tectonic/issues
Running TeX ...
error: something bad happened inside TeX; its output follows:
===============================================================================
(a.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo)) (babel.sty
! Package babel Error: Unknown option `brazil'. Either you misspelled it
(babel) or the language definition file brazil.ldf was not found
.
See the babel package documentation for explanation.
Type H <return> for immediate help.
...
l.310 \ProcessOptions*
No pages of output.
Transcript written on a.log.
===============================================================================
error: halted on potentially-recoverable error as specified
changing brazil to english produces another (unrelated issue, I think) this error:
note: this is a BETA release; report issues at https://github.com/tectonic-typesetting/tectonic/issues
Running TeX ...
Rerunning TeX because "a.aux" changed ...
Running xdvipdfmx ...
error: cannot open "a.xdv"
Note that in a preview execution english.ldf
was download, but none brazil related file was.
Hi, as tectonic downloads all the required files, where are they stored? Are these also removed if we use conda
to uninstall tectonic?
BTW, all my tex files compiled just fine on first try, congratulations!
Even though the Tectonic community is (ahem) small, it is important to signal that we aim to be a healthy community. We should leverage GitHub's support for project Codes of Conduct.
GitHub has an easy workflow for this. The workflow is barely even necessary, except they have CoC templates you can use — presumably the templates will be full of sensible things, so we should use them.
Tectonic doesn't support PostScript or EPS images: xdvipdfmx
gets them into PDF files by running an external "distiller" command to convert them to PDF, which is something that we absolutely don't want to do, because Tectonic aims to be self-contained and embeddable.
If xdvipdfmx
converts to PDF, presumably that’s the only technique that works, so we’d have to implement that in order to support (E)PS images. Sounds like a lot of work, unfortunately. Ideas welcome!
Installed this with conda and get this error on the first test. Running this on a Mac.
I also get Referenced from: anaconda3/lib/libharfbuzz-icu.0.dylib
Reason: image not found
As part of the error message. Perhaps I should build from scratch with Rust?
I’m not sure what version (or git revision) of XeTeX was used as the base here, but it seems to miss some of the new fixes in XeTeX (e.g. some serious bugs in OpenType math have been fixed in the last cycle which seems to be missing here).
error: cannot write format file tectonic-format-latex.fmt.gz
caused by: this I/O layer cannot save format files
Tectonic 0.1.5
macOS 10.12.5
rustc 1.17.0
cargo 0.18.0
It is undefined behavior to panic from Rust into foreign code at the moment. Thus the bridge functions in engines/mod.rs
, etc., should not panic.
At the moment, there are explicit panic!
invocations for instance here and here.
Let's make sure Travis does this automatically too.
The idea is that we want to identify when the document compilation requires "external" ("system"?) files that may make the document build not reproducible. I think there's a way to do this that's helpful but doesn't make the user experience too annoying. We probably just want to warn on the first system file rather than each one, since I expect that the usual case for this will be system fonts, which usually involves accessing a whole bunch of related files in a group.
When a fresh Tectonic install is downloading support files, I find that often you end up with an error because one of the HTTP connections gets dropped:
note: downloading cmr8.tfm
note: downloading cmmi8.tfm
warning: open of input cmmi8 failed
caused by: Connection closed
caused by: Connection closed
error: something bad happened inside TeX; its output follows:
This is bad for two reasons. First, Tectonic then dumps the engine output and ends with an error message saying
error: halted on potentially-recoverable error as specified
This scrolls the real problem off of the screen and will confuse the user.
Second, this happens often enough that we should deal with it more gracefully. The obvious thing to do is just to retry downloads a few times if they error out.
I get an NSAutoreleasePool
log message when running Tectonic 0.1.5 on macOS 10.12.5. Doesn't seem to impede the PDF generation in any way, though.
$ tectonic resume.tex
note: this is a BETA release; report issues at https://github.com/tectonic-typesetting/tectonic/issues
Running TeX ...
warning: could not calculate MD5 of file "resume.out": it does not exist
note: warnings were issued by the TeX engine; use --print and/or --keep-logs for details.
Rerunning TeX because "resume.aux" changed ...
2017-05-31 21:27:30.151 tectonic[4170:87768] *** -[NSAutoreleasePool release]: This pool has already been released, do not drain it (double release).
Running xdvipdfmx ...
Writing resume.pdf (25785 bytes)
Skipped writing 2 intermediate files (use --keep-intermediates to keep them)
We want Tectonic to depend on as few system libraries as we can get away with. This issue is for tracking the big picture of the overall project to reduce our dependence on system libraries.
The current roster of pkg-config
dependencies is:
Other libraries that the executable ends up depending on (on Linux):
(This is looking at DT_NEEDED
records in the executable; ldd
walks the tree of deps and comes up with more.)
We can probably eventually get rid of many of these!
Tectonic is still very young, but there's been enough interest that I think it might be valuable to set up some kind of community discussion forum. I would lean towards a self-hosted instance of Discourse which I think I can get up and running in a few hours.
Mailing lists / Google Groups are OK, but I think Discourse would be better, and the extra setup/maintenance overhead is probably not so big as to make it not worthwhile to go for it.
So that's my current plan. Comments welcome.
Does tectonic support the --shell-escape
flag? It is used to do things like syntax highlighting with pygments (using the minted.sty
package).
Seen in one of my sample files, no time to investigate right now. Relevant bits:
\usepackage[bf, font={small,sl}]{caption}
Leading to:
<use "lcs.pdf" > <use "lcs.pdf" >
! Font OT1/cmr/m/sl/10.95=cmsl10 at 10.95pt not loadable: Metric (TFM) file or installed font not found.
<to be read again>
relax
l.32 ...0.5]{lcs}{Yadda yadda here is some stuff.}
But the relevant cmsl10
files seem to be found in the bundle.
My beta testers will be astronomers so I might as well smooth off the rough edges.
I tried to test this on a report importing french babel (\usepackage[french]{babel}
) and I got:
===============================================================================
(report.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(tex/headers.tex (article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo)) (inputenc.sty
Package inputenc Warning: inputenc package ignored with utf8 based engines.
) (babel.sty
! Package babel Error: Unknown option `french'. Either you misspelled it
(babel) or the language definition file french.ldf was not found
.
See the babel package documentation for explanation.
Type H <return> for immediate help.
...
l.310 \ProcessOptions*
No pages of output.
Transcript written on report.log.
===============================================================================
Say that the user tried to compile a document, and the compilation failed because some needed resource file was missing from the web bundle. The web bundle is then updated with a new version that adds the needed file.
If the user re-compiles the document, though, they won't get the fixed file: the bundle manifest will log that the file is missing, so Tectonic won't re-check the bundle SHA256 and realize that it's changed. That's too bad.
The best fix might be to add an option or subcommand to force Tectonic to re-check the SHA256 of the bundle. Some of the relevant error messages could suggest this course of action, although ideally we'll have really thorough bundles such that missing files are a rare occurrence.
The Tectonic documentation tool, ironically, has no documentation itself. That needs to be fixed.
One day the docs will be written in TeX, but for the proximate future I think it is more practical to write them in Markdown so that they can appear on the website — with Unicode and decent CSS, the presentation will be sufficiently readable. Translating from MD to TeX will require some effort in the future, but it will just be a bit of busywork, not anything fundamentally challenging.
latexmk -pvc
(cf #82 and other issues)When trying to build my thesis, I get the following error. fithesis
class uses biblatex
with biber
backend.
error: something bad happened inside TeX; its output follows:
===============================================================================
(thesis.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 3 language(s) loaded.
(fithesis3.cls
Document Class: fithesis3 2016/05/15 v0.3.38 fithesis3 MU thesis class
(rapport3.cls
Document Class: rapport3 2004/06/07 v2.1a NTG LaTeX document class
(ntg10.clo)) (keyval.sty) (etoolbox.sty) (ltxcmds.sty) (ifxetex.sty)
(ifluatex.sty)) (polyglossia.sty (makecmds.sty) (xkeyval.sty (xkeyval (xkvutils
))) (fontspec.sty (expl3.sty (expl3-code.tex) (l3xdvipdfmx.def)) (xparse.sty)
(fontspec-xetex.sty (fontenc.sty (eu1enc.def) (eu1lmr.fd)) (xunicode.sty
(t3enc.def (eu1lmss.fd)) (graphicx.sty (graphics.sty (trig.sty) (graphics.cfg)
(xetex.def (infwarerr.sty))))) (fontspec.cfg)))) (gloss-english.ldf) (url.sty)
! LaTeX Error: File `biblatex.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name: ===============================================================================
error: terminal input forbidden
The AUR accepts package updates via Git, so updating an AUR package is as simple as pushing a git repository to their server. This repository must have the PKGBUILD at its root, however. One way I think we can accomplish this is to extract the dist/arch/
directory as a subtree on-the-fly, and push that to the AUR as one step in a continuous deployment pipeline. If the subtree is extracted in the same way every time, it will keep the same history, with just the commits relevant to that directory, regardless of when or where it is generated.
Doing this would mean collaborating with @jtojnar, who owns the package on the AUR.
rust-crypto is no longer maintained. RustCrypto organization aims to succeed it.
Additionally it also provides algorithms divided into separate crates united by the same traits, so you no longer need to pull the whole library just for two hashes.
For your project you can just use md-5
and sha2
crates. I can create a draft PR, but I can't check if I made all necessary changes, as unfortunately I get compilation error on my system.
If this was a design decision I apologize for the noise. It seems Tectonic does not search for tex files that may already be installed on the system. It would be a more pleasant UX if Tectonic searched for any necessary files prior to downloading them as this would save time on initial use (on the order of seconds to minutes for me) and keep the installation size down.
Tectonic is the name of a trademarked commercial product from CoreOS.
Word Mark TECTONIC
Goods and Services IC 009. US 021 023 026 036 038. G & S: Computer software, namely, software for developing, managing, updating, and maintaining online server instances and clusters hosted by third parties; computer operating system software; computer operating system software for distributed systems. FIRST USE: 20150406. FIRST USE IN COMMERCE: 20150406
IC 038. US 100 101 104. G & S: Providing access to hosted computer operating systems and computer applications through the Internet; Peer-to- peer network computer services, namely, electronic transmission of audio, video and other data and documents among computers. FIRST USE: 20150406. FIRST USE IN COMMERCE: 20150406
Standard Characters Claimed
Mark Drawing Code (4) STANDARD CHARACTER MARK
Serial Number 86560796
Filing Date March 11, 2015
Current Basis 1A
Original Filing Basis 1B
Published for Opposition December 22, 2015
Registration Number 5013800
Registration Date August 2, 2016
Owner (REGISTRANT) CoreOS, Inc. CORPORATION DELAWARE 3043 Mission Stret San Francisco CALIFORNIA 94110
Attorney of Record Brian R. Coleman
Type of Mark TRADEMARK. SERVICE MARK
Register PRINCIPAL
Live/Dead Indicator LIVE
Courtesy of http://tmsearch.uspto.gov TESS search for Serial 86560796.
Note that I have nothing to do with CoreOS, but see this as a real problem. In US trademark law, you lose them if you don't defend them. Renaming is the only sensible thing IMO since the first commit for this project was 973289e on Nov 18, 2016, and this trademark was granted before then.
I was trying some latex source I had with tectonic, and I'm having an issue with biblatex with style=philosophy-modern option:
! Undefined control sequence.
l.1637 \ifblx@load@version@legacy
Someone on stackoverflow say it is caused by an old version of biblatex (or biblatex philosophy).
This is the project I tryied to compile: https://github.com/LucaMoschella/SEProject
I'm using the pdfpages
package to include other pdf files. It seems like Tectonic can't handle paths with a .
or ..
in them, while pdflatex can. Quite minimal example:
some.tex:
\documentclass[]{article}
\begin{document}
test
\end{document}
test.tex:
\documentclass[]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[pages={-}]{./some.pdf}
\end{document}
In this example, the some.pdf
is in the same directory as the test.tex. Note that using path some.pdf
instead of ./some.pdf
will work. I get the similar exceptions when:
some.pdf
in the directory above and use ../some.pdf
to include it.subdir
and use subdir/../some.pdf
.Exception:
Running TeX ...
error: something bad happened inside TeX; its output follows:
===============================================================================
(test.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.
(article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(size10.clo)) (pdfpages.sty (ifthen.sty) (calc.sty) (eso-pic.sty (atbegshi.sty
(infwarerr.sty) (ltxcmds.sty) (ifpdf.sty)) (keyval.sty) (xcolor.sty (color.cfg)
(xetex.def))) (graphicx.sty (graphics.sty (trig.sty) (graphics.cfg)))
(ppxetex.def)) (test.aux) (pdflscape.sty (lscape.sty) (ifxetex.sty))
! Unable to load picture or PDF file './some.pdf'.
<to be read again>
}
l.6 \includepdf[pages={-}]{./some.pdf}
No pages of output.
Transcript written on test.log.
===============================================================================
error: halted on potentially-recoverable error as specified
Files from Overleaf have this embedded but it seems that XeTeX doesn't.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.