let-def / texpresso Goto Github PK
View Code? Open in Web Editor NEWTeXpresso: live rendering and error reporting for LaTeX
License: MIT License
TeXpresso: live rendering and error reporting for LaTeX
License: MIT License
Add -I dir
to look up source files in other directories.
Our SyncTeX parser often jumps one line before the right position, but not always.
I don't know why, nor if this behavior also happens with the official parser.
Hello, first I would like to thank you for this great software! :)
Made editing LaTeX files in Emacs really pleasant experience.
The default behavior for SDL2 window is to disable composition if the Window Manager understands the hint.
KDE's KWin does (probably is in the minority). The workaround is to either set the environment variable:
export SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR=0
or execute SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");
before creating the window as someone mentioned here: mosra/magnum#184 (comment)
Not sure what version of SDL you are targeting so I'm not expecting you'll add this line of code - just wanted to put it here so others may find it if they would like to workaround the issue with the env. variable.
Thanks,
Adam.
Tectonic uses Reqwest to download TeX data, and Reqwest uses a background thread for downloading data.
On Linux, stopping the thread before forking was sufficient to get a correct behavior.
On macOS, forking is not possible from a multi-threaded process.
TeXpresso needs another backend. My thought:
Hi, thank you for your work on this!
I'm trying to run the test on Ubuntu 22.04 on WSL.
Installation seems to work fine, except for some warnings:
oded@OdedLaptop:~/texpresso$ make all
make texpresso
make[1]: Entering directory '/home/oded/texpresso'
make -C src texpresso
make[2]: Entering directory '/home/oded/texpresso/src'
make -C .. config
make[3]: Entering directory '/home/oded/texpresso'
mkdir -p build/objects
echo >Makefile.config "CFLAGS=-O2 -ggdb -I. -fPIC"
echo >>Makefile.config 'CC=gcc $(CFLAGS)'
echo >>Makefile.config 'LDCC=g++ $(CFLAGS)'
echo >>Makefile.config "LIBS=-lmupdf -lm CC=gcc ./mupdf-config.sh -lz -ljpeg -ljbig2dec -lharfbuzz -lfreetype -lopenjp2 -lgumbo -lSDL2"
Linking -lmupdf-third -lleptonica -lmujs -lgumbo
Skipping -ltesseract
echo >>Makefile.config "TECTONIC_ENV="
make[3]: Leaving directory '/home/oded/texpresso'
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/driver.o -Idvi/ driver.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/logo.o -Idvi/ logo.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/sprotocol.o -Idvi/ sprotocol.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/state.o -Idvi/ state.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/fs.o -Idvi/ fs.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/incdvi.o -Idvi/ incdvi.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/myabort.o -Idvi/ myabort.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/renderer.o -Idvi/ renderer.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_tex.o -Idvi/ engine_tex.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_pdf.o -Idvi/ engine_pdf.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_dvi.o -Idvi/ engine_dvi.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/synctex.o -Idvi/ synctex.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/prot_parser.o -Idvi/ prot_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/sexp_parser.o -Idvi/ sexp_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/json_parser.o -Idvi/ json_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/editor.o -Idvi/ editor.c
make -C dvi
make[3]: Entering directory '/home/oded/texpresso/src/dvi'
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_context.o dvi_context.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_interp.o dvi_interp.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_prim.o dvi_prim.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_special.o dvi_special.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_scratch.o dvi_scratch.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_fonttable.o dvi_fonttable.c
gcc -O2 -ggdb -I. -fPIC -I/usr/include/freetype2 -I/usr/include/libpng16 -c -o ../../build/objects/dvi_resmanager.o dvi_resmanager.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/tex_tfm.o tex_tfm.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/tex_fontmap.o tex_fontmap.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/tex_vf.o tex_vf.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/tex_enc.o tex_enc.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/vstack.o vstack.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/pdf_lexer.o pdf_lexer.c
ar cr ../../build/objects/libmydvi.a ../../build/objects/dvi_context.o ../../build/objects/dvi_interp.o ../../build/objects/dvi_prim.o ../../build/objects/dvi_special.o ../../build/objects/dvi_scratch.o ../../build/objects/dvi_fonttable.o ../../build/objects/dvi_resmanager.o ../../build/objects/tex_tfm.o ../../build/objects/tex_fontmap.o ../../build/objects/tex_vf.o ../../build/objects/tex_enc.o ../../build/objects/vstack.o ../../build/objects/pdf_lexer.o
make[3]: Leaving directory '/home/oded/texpresso/src/dvi'
g++ -O2 -ggdb -I. -fPIC -o ../build/texpresso ../build/objects/driver.o ../build/objects/main.o ../build/objects/logo.o ../build/objects/sprotocol.o ../build/objects/state.o ../build/objects/fs.o ../build/objects/incdvi.o ../build/objects/myabort.o ../build/objects/renderer.o ../build/objects/engine_tex.o ../build/objects/engine_pdf.o ../build/objects/engine_dvi.o ../build/objects/synctex.o ../build/objects/prot_parser.o ../build/objects/sexp_parser.o ../build/objects/json_parser.o ../build/objects/editor.o ../build/objects/libmydvi.a -lmupdf -lm -lmupdf-third -lleptonica -lmujs -lgumbo -lz -ljpeg -ljbig2dec -lharfbuzz -lfreetype -lopenjp2 -lgumbo -lSDL2
make[2]: Leaving directory '/home/oded/texpresso/src'
make[1]: Leaving directory '/home/oded/texpresso'
make texpresso-tonic
make[1]: Entering directory '/home/oded/texpresso'
make -f Makefile.tectonic tectonic
make[2]: Entering directory '/home/oded/texpresso'
cd tectonic && cargo build --release --features external-harfbuzz
Compiling libc v0.2.153
Compiling proc-macro2 v1.0.78
Compiling unicode-ident v1.0.12
Compiling cfg-if v1.0.0
Compiling pkg-config v0.3.29
Compiling vcpkg v0.2.15
Compiling autocfg v1.1.0
Compiling thiserror v1.0.56
Compiling memchr v2.7.1
Compiling once_cell v1.19.0
Compiling version_check v0.9.4
Compiling log v0.4.20
Compiling bitflags v2.4.2
Compiling itoa v1.0.10
Compiling pin-project-lite v0.2.13
Compiling regex-syntax v0.8.2
Compiling pin-utils v0.1.0
Compiling same-file v1.0.6
Compiling bytes v1.5.0
Compiling tectonic_dep_support v0.1.1 (/home/oded/texpresso/tectonic/crates/dep_support)
Compiling walkdir v2.4.0
Compiling siphasher v0.3.11
Compiling futures-core v0.3.30
Compiling typenum v1.17.0
Compiling ppv-lite86 v0.2.17
Compiling phf_shared v0.11.2
Compiling aho-corasick v1.1.2
Compiling generic-array v0.14.7
Compiling slab v0.4.9
Compiling futures-sink v0.3.30
Compiling num-traits v0.2.17
Compiling bitflags v1.3.2
Compiling serde v1.0.196
Compiling quote v1.0.35
Compiling anyhow v1.0.79
Compiling crossbeam-utils v0.8.19
Compiling syn v2.0.48
Compiling adler v1.0.2
Compiling tinyvec_macros v0.1.1
Compiling miniz_oxide v0.7.2
Compiling tinyvec v1.6.0
Compiling futures-channel v0.3.30
Compiling crc32fast v1.3.2
Compiling futures-io v0.3.30
Compiling futures-task v0.3.30
Compiling rustix v0.38.31
Compiling cc v1.0.83
Compiling getrandom v0.2.12
Compiling mio v0.8.10
Compiling rand_core v0.6.4
Compiling signal-hook-registry v1.4.1
Compiling rand_chacha v0.3.1
Compiling num_cpus v1.16.0
Compiling socket2 v0.5.5
Compiling rand v0.8.5
Compiling regex-automata v0.4.5
Compiling unicode-normalization v0.1.22
Compiling phf_generator v0.11.2
Compiling phf_codegen v0.11.2
Compiling libz-sys v1.1.15
Compiling tectonic_bridge_core v0.4.1 (/home/oded/texpresso/tectonic/crates/bridge_core)
Compiling linux-raw-sys v0.4.13
Compiling fnv v1.0.7
Compiling hex v0.4.3
Compiling smallvec v1.13.1
Compiling lazy_static v1.4.0
Compiling tectonic_cfg_support v0.1.4 (/home/oded/texpresso/tectonic/crates/cfg_support)
Compiling tectonic_errors v0.2.1 (/home/oded/texpresso/tectonic/crates/errors)
Compiling block-buffer v0.10.4
Compiling crypto-common v0.1.6
Compiling tracing-core v0.1.32
Compiling sha1_smol v1.0.0
Compiling texpresso_protocol v0.1.0 (/home/oded/texpresso/tectonic/crates/texpresso_protocol)
Compiling flate2 v1.0.28
Compiling digest v0.10.7
Compiling openssl-sys v0.9.99
Compiling lock_api v0.4.11
Compiling num-conv v0.1.0
Compiling home v0.5.9
Compiling powerfmt v0.2.0
Compiling parking_lot_core v0.9.9
Compiling time-core v0.1.2
Compiling minimal-lexical v0.2.1
Compiling fastrand v2.0.1
Compiling time-macros v0.2.17
Compiling nom v7.1.3
Compiling deranged v0.3.11
Compiling tectonic_status_base v0.2.1 (/home/oded/texpresso/tectonic/crates/status_base)
Compiling cpu-time v1.0.0
Compiling memoffset v0.7.1
Compiling equivalent v1.0.1
Compiling unicode-width v0.1.11
Compiling num_threads v0.1.6
Compiling xdg v2.5.2
Compiling cpufeatures v0.2.12
Compiling hashbrown v0.14.3
Compiling scopeguard v1.2.0
Compiling app_dirs2 v2.5.5
Compiling sha2 v0.10.8
Compiling bstr v1.9.0
Compiling tempfile v3.9.0
Compiling indexmap v2.2.2
Compiling crossbeam-epoch v0.9.18
Compiling time v0.3.34
Compiling tectonic_bridge_graphite2 v0.2.2 (/home/oded/texpresso/tectonic/crates/bridge_graphite2)
Compiling gix-trace v0.1.7
Compiling tectonic_bridge_flate v0.1.7 (/home/oded/texpresso/tectonic/crates/bridge_flate)
Compiling thiserror-impl v1.0.56
Compiling tokio-macros v2.2.0
Compiling futures-macro v0.3.30
Compiling serde_derive v1.0.196
Compiling tracing-attributes v0.1.27
Compiling crossbeam-deque v0.8.5
Compiling globset v0.4.14
Compiling tokio v1.36.0
Compiling futures-util v0.3.30
Compiling gix-hash v0.11.4
Compiling gix-features v0.29.0
Compiling tectonic_io_base v0.4.3 (/home/oded/texpresso/tectonic/crates/io_base)
Compiling gix-fs v0.1.1
Compiling tracing v0.1.40
Compiling gix-path v0.8.4
Compiling gix-date v0.5.1
Compiling parking_lot v0.12.1
Compiling phf v0.11.2
Compiling btoi v0.4.3
Compiling foreign-types-shared v0.1.1
Compiling percent-encoding v2.3.1
Compiling openssl v0.10.63
Compiling gix-actor v0.20.0
Compiling foreign-types v0.3.2
Compiling nix v0.26.4
Compiling gix-tempfile v5.0.3
Compiling gix-validate v0.7.7
Compiling ignore v0.4.22
Compiling openssl-macros v0.1.1
Compiling regex v1.10.3
Compiling miette-derive v5.10.0
Compiling gix-utils v0.1.9
Compiling md-5 v0.10.6
Compiling tectonic_pdf_io v0.4.1 (/home/oded/texpresso/tectonic/crates/pdf_io)
Compiling http v0.2.11
Compiling tectonic_bridge_harfbuzz v0.2.9 (/home/oded/texpresso/tectonic/crates/bridge_harfbuzz)
Compiling tectonic_bridge_freetype2 v0.2.0 (/home/oded/texpresso/tectonic/crates/bridge_freetype2)
Compiling tectonic_bridge_icu v0.2.1 (/home/oded/texpresso/tectonic/crates/bridge_icu)
Compiling ryu v1.0.16
Compiling native-tls v0.2.11
Compiling httparse v1.8.0
Compiling miette v5.10.0
Compiling tokio-util v0.7.10
Compiling gix-lock v5.0.1
Compiling parse-zoneinfo v0.3.0
Compiling futures-executor v0.3.30
Compiling gix-object v0.29.2
Compiling terminfo v0.8.0
Compiling memmap2 v0.5.10
Compiling inotify-sys v0.1.5
Compiling dirs-sys v0.3.7
Compiling async-trait v0.1.77
Compiling try-lock v0.2.5
Compiling ucd-trie v0.1.6
Compiling openssl-probe v0.1.5
Compiling pest v2.7.6
Compiling dirs v4.0.0
Compiling want v0.3.1
Compiling chrono-tz-build v0.2.1
Compiling inotify v0.9.6
Compiling gix-ref v0.29.1
Compiling futures v0.3.30
Compiling h2 v0.3.24
Compiling http-body v0.4.6
Compiling tokio-stream v0.1.14
Compiling form_urlencoded v1.2.1
Compiling gix-config-value v0.12.5
Compiling gix-glob v0.7.0
Compiling tectonic_xetex_layout v0.2.4 (/home/oded/texpresso/tectonic/crates/xetex_layout)
Compiling nibble_vec v0.1.0
Compiling crossbeam-channel v0.5.11
Compiling filetime v0.2.23
Compiling gix-sec v0.8.4
Compiling proc-macro-error-attr v1.0.4
Compiling endian-type v0.1.2
Compiling tower-service v0.3.2
Compiling syn v1.0.109
Compiling unicode-bidi v0.3.15
Compiling unicode-bom v2.0.3
Compiling unic-char-range v0.9.0
Compiling unic-common v0.9.0
Compiling either v1.9.0
Compiling httpdate v1.0.3
Compiling libm v0.2.8
Compiling which v4.4.2
Compiling pest_meta v2.7.6
Compiling idna v0.5.0
Compiling unic-char-property v0.9.0
Compiling unic-ucd-version v0.9.0
Compiling gix-config v0.22.0
Compiling radix_trie v0.2.1
Compiling notify v5.2.0
Compiling hyper v0.14.28
Compiling tokio-native-tls v0.3.1
Compiling project-origins v1.2.0
Compiling chrono-tz v0.8.5
Compiling watchexec-signals v1.0.0
Compiling proc-macro-error v1.0.4
Compiling event-listener v2.5.3
Compiling serde_json v1.0.113
Compiling byteorder v1.5.0
Compiling iana-time-zone v0.1.60
Compiling dunce v1.0.4
Compiling base64 v0.21.7
Compiling rustls-pemfile v1.0.4
Compiling ignore-files v1.3.1
Compiling chrono v0.4.33
Compiling command-group v2.1.0
Compiling async-priority-channel v0.1.0
Compiling watchexec-events v1.0.0
Compiling pest_generator v2.7.6
Compiling hyper-tls v0.5.0
Compiling clearscreen v2.0.1
Compiling url v2.5.0
Compiling unic-ucd-segment v0.9.0
Compiling serde_urlencoded v0.7.1
Compiling serde_spanned v0.6.5
Compiling toml_datetime v0.6.5
Compiling async-recursion v1.0.5
Compiling tectonic_engine_xetex v0.4.4 (/home/oded/texpresso/tectonic/crates/engine_xetex)
Compiling backtrace v0.3.69
Compiling tectonic_engine_xdvipdfmx v0.4.1 (/home/oded/texpresso/tectonic/crates/engine_xdvipdfmx)
Compiling encoding_rs v0.8.33
Compiling ipnet v2.9.0
Compiling utf8-width v0.1.7
Compiling deunicode v1.4.2
Compiling winnow v0.5.37
Compiling mime v0.3.17
Compiling unicode-segmentation v1.10.1
Compiling normalize-path v0.2.1
Compiling sync_wrapper v0.1.2
Compiling atomic-take v1.1.0
Compiling gimli v0.28.1
Compiling watchexec v2.3.2
Compiling reqwest v0.11.24
Compiling heck v0.3.3
Compiling slug v0.1.5
Compiling humansize v2.1.3
Compiling unic-segment v0.9.0
Compiling pest_derive v2.7.6
Compiling toml_edit v0.19.15
warning: [email protected]: pdf_io/dpx-mpost.c: In function ‘mps_do_page’:
warning: [email protected]: pdf_io/dpx-mpost.c:1510:3: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
warning: [email protected]: 1510 | fread(buffer, sizeof(char), size, image_file);
warning: [email protected]: | ^~~~~~~~~~~~~~~~~
Compiling addr2line v0.21.0
Compiling globwalk v0.8.1
Compiling textwrap v0.11.0
Compiling atty v0.2.14
Compiling object v0.32.2
Compiling error-chain v0.12.4
Compiling is-docker v0.2.0
Compiling vec_map v0.8.2
Compiling strsim v0.8.0
Compiling ansi_term v0.12.1
Compiling rustc-demangle v0.1.23
Compiling clap v2.34.0
Compiling tera v1.19.1
Compiling is-wsl v0.4.0
Compiling structopt-derive v0.4.18
Compiling toml v0.7.8
Compiling watchexec-filterer-ignore v1.2.1
Compiling tectonic_geturl v0.3.2 (/home/oded/texpresso/tectonic/crates/geturl)
Compiling html-escape v0.2.13
Compiling zip v0.6.6
Compiling tectonic_xdv v0.2.2 (/home/oded/texpresso/tectonic/crates/xdv)
Compiling fs2 v0.4.3
Compiling pathdiff v0.2.1
Compiling tectonic v0.15.0 (/home/oded/texpresso/tectonic)
Compiling pinot v0.1.5
Compiling structopt v0.3.26
Compiling open v4.2.0
Compiling tectonic_bundles v0.3.1 (/home/oded/texpresso/tectonic/crates/bundles)
Compiling tectonic_docmodel v0.2.2 (/home/oded/texpresso/tectonic/crates/docmodel)
Compiling tectonic_engine_spx2html v0.3.2 (/home/oded/texpresso/tectonic/crates/engine_spx2html)
Compiling watchexec-filterer-globset v1.2.0
Compiling byte-unit v4.0.19
Compiling tectonic_engine_bibtex v0.2.2 (/home/oded/texpresso/tectonic/crates/engine_bibtex)
Compiling quick-xml v0.28.2
Compiling termcolor v1.4.1
Finished release [optimized] target(s) in 2m 05s
make[2]: Leaving directory '/home/oded/texpresso'
cp -f tectonic/target/release/texpresso-tonic build/
make[1]: Leaving directory '/home/oded/texpresso'
# Build succeeded. Try running:
# build/texpresso test/simple.tex
Trying to run build/texpresso test/simple.tex
fails with the following output:
oded@OdedLaptop:~/texpresso$ build/texpresso test/simple.tex
[info] working directory: /home/oded/texpresso
[info] executable path: /home/oded/texpresso/build/texpresso
[info] document path: /home/oded/texpresso/test
[info] document name: simple.tex
texpresso logo: 512x512
[info] tectonic path: /home/oded/texpresso/build/texpresso-tonic
[dvi] loading pdftex.map
note: "version 2" Tectonic command-line interface activated
note: not in a document workspace; using the built-in default bundle
success code:P size:98
[dvi] loading kanjix.map
success code:P size:98
[dvi] loading ckx.map
success code:P size:98
[process] launched pid 50782 (using /home/oded/texpresso/build/texpresso-tonic)
note: "version 2" Tectonic command-line interface activated
texpresso: handshake success
[bundle] error loading resource latex: not found
note: Running TeX ...
[info] trace has 0 entries, growing to 8
[info] writing simple.log
[info] this is the log file
(append log 0 "**\n(simple.tex")
(append log 14 "\nLaTeX2e <2021-11-15> patch level 1\nL3 programming layer <2022-02-24>")
(append log 83 " (article.cls")
[info] writing simple.synctex
[info] this is the synctex
[info] synctex used 2 input files, is 0 pages long
(append log 96 "\nDocument Class: article 2021/10/04 v1.4n Standard LaTeX document class\n")
(append log 168 "(size12.clo")
[info] synctex used 3 input files, is 0 pages long
(append log 179 "\nFile: size12.clo 2021/10/04 v1.4n Standard LaTeX file (size option)\n")
[bundle] error loading resource lmroman12-regular: not found
[info] trace has 8 entries, growing to 16
(append log 248 ")")
[synctex] Closed input: 3
(append log 249 "\n\\c@part=\\count181\n\\c@section=\\count182\n\\c@subsection=\\count183\n\\c@subsubsection=\\count184\n\\c@paragraph=\\count185\n\\c@subparagraph=\\count186\n\\c@figure=\\count187\n\\c@table=\\count188\n\\abovecaptionskip=\\skip47\n\\belowcaptionskip=\\skip48\n\\bibindent=\\dimen138\n)")
[synctex] Closed input: 2
(append log 502 " (l3backend-xetex.def")
[info] synctex used 4 input files, is 0 pages long
(append log 523 "\nFile: l3backend-xetex.def 2022-02-07 L3 backend support: XeTeX\n\\c_kernel_sys_dvipdfmx_version_int=\\count189\n\\lcolor_backend_stack_int=\\count190\n\\gcolor_backend_stack_int=\\count191\n\\ggraphics_track_int=\\count192\n\\lpdf_internal_box=\\box50\n\\gpdf_backend_object_int=\\count193\n\\gpdf_backend_annotation_int=\\count194\n\\g_pdf_backend_link_int=\\count195\n)")
[synctex] Closed input: 4
[bundle] error loading resource simple.aux: not found
[bundle] error loading resource simple.aux.tex: not found
[bundle] error loading resource simple.aux.sty: not found
[bundle] error loading resource simple.aux.cls: not found
[bundle] error loading resource simple.aux.fd: not found
[info] trace has 16 entries, growing to 32
[bundle] error loading resource simple.aux.aux: not found
[bundle] error loading resource simple.aux.bbl: not found
[bundle] error loading resource simple.aux.def: not found
[bundle] error loading resource simple.aux.clo: not found
[bundle] error loading resource simple.aux.ldf: not found
(append log 884 "\nNo file simple.aux.\n")
[info] writing simple.aux
(append log 905 "\\openout1 = `simple.aux'.\n\n")
(append log 932 "LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 3.\nLaTeX Font Info: Trying to load font information for TS1+cmr on input line 3\n.\n")
(append log 1554 "(ts1cmr.fd")
[info] synctex used 5 input files, is 0 pages long
(append log 1564 "\nFile: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions\n)")
[synctex] Closed input: 5
(append log 1631 "\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\nLaTeX Font Info: Checking defaults for U/cmr/m/n on input line 3.\nLaTeX Font Info: ... okay on input line 3.\n")
[info] trace has 32 entries, growing to 64
[bundle] error loading resource cmr12: not found
[bundle] error loading resource cmr8: not found
[bundle] error loading resource cmr6: not found
[bundle] error loading resource cmmi12: not found
[bundle] error loading resource cmmi8: not found
[bundle] error loading resource cmmi6: not found
[bundle] error loading resource cmsy10: not found
[bundle] error loading resource cmsy8: not found
[bundle] error loading resource cmsy6: not found
(append log 2027 "LaTeX Font Info: External font `cmex10' loaded for size\n(Font) <12> on input line 6.\nLaTeX Font Info: External font `cmex10' loaded for size\n(Font) <8> on input line 6.\nLaTeX Font Info: External font `cmex10' loaded for size\n(Font) <6> on input line 6.\n")
[bundle] error loading resource lmroman8-regular: not found
(append log 2328 " [1")
[info] writing simple.xdv
[info] this is the output document
(append log 2331 "\n\n")
pre:
i: 7
num: 25400000
den: 473628672
mag: 1000
comment: tectonic
[info] output 1 pages long
(append log 2333 "]")
[info] synctex used 5 input files, is 1 pages long
(flush)
dvi_resmanager_get_fz_font: loading font lmroman12-regular
[dvi] loading lmroman12-regular
success code:E size:9
bundle_serve_hooks_cat: error loading lmroman12-regular.pfb: not found
success code:P size:98
dvi_resmanager_get_fz_font: loading font cmmi12.pfb
[dvi] loading cmmi12.pfb
success code:P size:98
[dvi] loading cmmi12
success code:P size:98
[dvi] loading cmmi12
success code:E size:9
bundle_serve_hooks_cat: error loading cmmi12.vf: not found
dvi_resmanager_get_fz_font: loading font cmr12.pfb
[dvi] loading cmr12.pfb
success code:P size:98
[dvi] loading cmr12
success code:P size:98
[dvi] loading cmr12
success code:E size:9
bundle_serve_hooks_cat: error loading cmr12.vf: not found
dvi_resmanager_get_fz_font: loading font cmsy10.pfb
[dvi] loading cmsy10.pfb
success code:P size:98
[dvi] loading cmsy10
success code:P size:98
[dvi] loading cmsy10
success code:E size:9
bundle_serve_hooks_cat: error loading cmsy10.vf: not found
dvi_resmanager_get_fz_font: loading font cmr8.pfb
[dvi] loading cmr8.pfb
success code:P size:98
[dvi] loading cmr8
success code:P size:98
[dvi] loading cmr8
success code:E size:9
bundle_serve_hooks_cat: error loading cmr8.vf: not found
dvi_resmanager_get_fz_font: loading font lmroman8-regular
[dvi] loading lmroman8-regular
success code:E size:9
bundle_serve_hooks_cat: error loading lmroman8-regular.pfb: not found
success code:P size:98
dvi_resmanager_get_fz_font: loading font cmex10.pfb
[dvi] loading cmex10.pfb
success code:P size:98
[dvi] loading cmex10
success code:P size:98
[dvi] loading cmex10
success code:E size:9
bundle_serve_hooks_cat: error loading cmex10.vf: not found
dvi_resmanager_get_fz_font: loading font cmsy8.pfb
[dvi] loading cmsy8.pfb
success code:P size:98
[dvi] loading cmsy8
success code:P size:98
[dvi] loading cmsy8
success code:E size:9
bundle_serve_hooks_cat: error loading cmsy8.vf: not found
dvi_resmanager_get_fz_font: loading font cmmi8.pfb
[dvi] loading cmmi8.pfb
success code:P size:98
[dvi] loading cmmi8
success code:P size:98
[dvi] loading cmmi8
success code:E size:9
bundle_serve_hooks_cat: error loading cmmi8.vf: not found
optimized bounds: 0.000000,0.000000 - 700.000000,900.000061
TeXpresso: cannot read from server (Connection reset by peer (os error 104))
Segmentation fault
Trying to run build/texpresso-tonic test/simple.tex
seems to work as expected:
oded@OdedLaptop:~/texpresso$ build/texpresso-tonic test/simple.tex
Running TeX ...
Rerunning TeX because "simple.aux" changed ...
Running xdvipdfmx ...
Writing test/simple.pdf (17.45 KiB)
Skipped writing 1 intermediate files (use --keep-intermediates to keep them)
Add an option to stack all pages vertically and continuously scroll between them.
Recently, a vscode extension for TeXpresso has been released. It is mentioned that
TeXpresso needs to be installed separately to use this extension, following its install guide which contains instructions for macOS, Fedora, Arch Linux, Debian, and Ubuntu.
Certainly, the number of users of Windows is large. I hope TeXpresso will soon have a release for Windows. Thank you so much for your consideration!
as title.
I am trying to install texpresso on Ubuntu 23.04
Description: Ubuntu 23.04
Release: 23.04
when running build/texpresso test/simple.tex
I get the error
[info] working directory: <mypath>/texpresso
[info] executable path: <mypath>/texpresso/build/texpresso
[info] document path: <mypath>/texpresso/test
[info] document name: simple.tex
SDL could not initialize wayland driver! SDL_Error: wayland not available
Falling back to default driver
texpresso logo: 512x512
[info] tectonic path: texpresso-tonic
[dvi] loading pdftex.map
bundle_serve_hooks_cat: cannot read answer
[dvi] loading kanjix.map
Build error on Rust 1.7.0. : No method named 'as_encoded_bytes'
I did not find, which Rust version you used to compile ``make texpresso-tonic```but on 1.7.0. I get the
Compiling tectonic v0.15.0 (/.../texpresso/tectonic)
error[E0599]: no method named `as_encoded_bytes` found for reference `&OsStr` in the current scope
--> src/bin/tectonic/v2cli.rs:515:61
|
515 | ... let mut path = path.as_os_str().as_encoded_bytes();
| ^^^^^^^^^^^^^^^^ method not found in `&OsStr`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `tectonic` (bin "texpresso-tonic") due to previous error
make[1]: *** [Makefile.tectonic:11: tectonic] Error 101
make[1]: Leaving directory '/.../texpresso'
make: *** [Makefile:55: texpresso-tonic] Error 2
Which rust version do you use and is there an alternative for as_encoded_bytes
?
My system has directory a
that is in fact a symlink to b
. If I edit a/foo.tex
using Emacs, texpresso does not see the updates unless I use M-x texpresso-signal
explicitly. Editing b/foo.tex
works as expected.
(I have not tested what happens if foo.tex
itself is a symlink.)
Hi,
I managed to compile texpresso and texpresso-tonic on my Mac version 14.6.1 using rust 1.80.1
To compile texpresso-tonic, I followed the recommendation found here: #70
to update time from version 0.3.34 to version 0.3.36.
The command
./build/texpresso ./test/simple.tex
gives me a window with the compiled .tex file that appears correctly.
However, as soon as I try to include references to sections, tables, figures, equations, pages, or try to cite references with bibtex, the file is created and displayed but I only get '?' instead of references.
On the other hand, if I call texpresso-tonic instead of texpresso, the references work, but the window no longer appears.
Is there anything special I need to do with texpresso to be able to use references and citations ?
Thanks !
It compiles, but when trying to run the test I get an abort and a coredump (NB: the "IOT instruction" means SIGABRT).
I run Arch btw. The same behaviour occurs when running texpresso
installed via the PKGBUILD.
~/src/texpresso % build/texpresso test/simple.tex
[info] working directory: /home/philipp/src/texpresso
[info] executable path: /home/philipp/src/texpresso/build/texpresso
[info] document path: /home/philipp/src/texpresso/test
[info] document name: simple.tex
texpresso logo: 512x512
[info] tectonic path: /home/philipp/src/texpresso/build/texpresso-tonic
[1] 673395 IOT instruction (core dumped) build/texpresso test/simple.tex
~/src/texpresso % coredumpctl info
PID: 673395 (texpresso)
UID: 1000 (philipp)
GID: 1000 (philipp)
Signal: 6 (ABRT)
Timestamp: Mon 2023-08-07 13:35:20 CEST (1min 5s ago)
Command Line: build/texpresso test/simple.tex
Executable: /home/philipp/src/texpresso/build/texpresso
Control Group: /user.slice/user-1000.slice/session-1.scope
Unit: session-1.scope
Slice: user-1000.slice
Session: 1
Owner UID: 1000 (philipp)
Storage: /var/lib/systemd/coredump/core.texpresso.1000.c93ab394c2f04b39a352be378571b081.673395.1691408120000000.zst (present)
Size on Disk: 27.0M
Message: Process 673395 (texpresso) of user 1000 dumped core.
Stack trace of thread 673395:
#0 0x00007ff750c8e83c n/a (libc.so.6 + 0x8e83c)
#1 0x00007ff750c3e668 raise (libc.so.6 + 0x3e668)
#2 0x00007ff750c264b8 abort (libc.so.6 + 0x264b8)
#3 0x00005619af1b5815 n/a (/home/philipp/src/texpresso/build/texpresso + 0x48815)
#4 0x00005619af1ba7f3 n/a (/home/philipp/src/texpresso/build/texpresso + 0x4d7f3)
ELF object binary architecture: AMD x86-64
Right now the only way to display another TeX file is to start a new process.
Having a command to load a different document without restarting anything, recreating a window etc, could come handy.
If TeXpresso tries to read foo.tex
(for instance because it is processing \include{foo.tex}
), when foo.tex does not exist at first, and it is then created, TeXpresso will crash.
`
Compiling tectonic_xetex_layout v0.2.4 (/Users/captain/texpresso/tectonic/crates/xetex_layout)
The following warnings were emitted during compilation:
warning: [email protected]: /opt/homebrew/Cellar/icu4c/74.2/include/unicode/localpointer.h:224:40: error: expected ';' at end of declaration list
warning: [email protected]: /opt/homebrew/Cellar/icu4c/74.2/include/unicode/localpointer.h:399:36: error: expected ';' at end of declaration list
warning: [email protected]: /opt/homebrew/Cellar/icu4c/74.2/include/unicode/ubidi.h:579:1: error: expected ';' at end of declaration list
warning: [email protected]: 7 warnings and 3 errors generated.
error: failed to run custom build command for tectonic_xetex_layout v0.2.4 (/Users/captain/texpresso/tectonic/crates/xetex_layout)
Caused by:
process didn't exit successfully: /Users/captain/texpresso/tectonic/target/release/build/tectonic_xetex_layout-b37a63f57be228df/build-script-build
(exit status: 1)
--- stdout
cargo:warning=/opt/homebrew/Cellar/icu4c/74.2/include/unicode/localpointer.h:224:40: error: expected ';' at end of declaration list
cargo:warning=/opt/homebrew/Cellar/icu4c/74.2/include/unicode/localpointer.h:399:36: error: expected ';' at end of declaration list
cargo:warning=/opt/homebrew/Cellar/icu4c/74.2/include/unicode/ubidi.h:579:1: error: expected ';' at end of declaration list
cargo:warning=
cargo:warning=7 warnings and 3 errors generated.
exit status: 1
--- stderr
error occurred: Command env -u IPHONEOS_DEPLOYMENT_TARGET "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-arch" "arm64" "-I" "layout" "-I" "/Users/captain/texpresso/tectonic/crates/bridge_core/support" "-I" "/Users/captain/texpresso/tectonic/target/release/build/tectonic_bridge_harfbuzz-9e8707849e7aac32/out" "-I" "/opt/homebrew/Cellar/graphite2/1.3.14/include" "-I" "/opt/homebrew/opt/freetype/include/freetype2" "-I" "/opt/homebrew/opt/libpng/include/libpng16" "-I" "/opt/homebrew/Cellar/graphite2/1.3.14/include" "-I" "/opt/homebrew/Cellar/icu4c/74.2/include" "-Wall" "-Wextra" "-Wall" "-Wall" "-Wdate-time" "-Wendif-labels" "-Wextra" "-Wformat=2" "-Wmissing-declarations" "-Wmissing-include-dirs" "-Wpointer-arith" "-Wredundant-decls" "-Wshadow" "-Wswitch-bool" "-Wundef" "-Wextra-semi" "-Wno-unused-parameter" "-Wno-implicit-fallthrough" "-fno-exceptions" "-fno-rtti" "-DXETEX_MAC=1" "-o" "/Users/captain/texpresso/tectonic/target/release/build/tectonic_xetex_layout-db2d797d0ccb69e2/out/layout/xetex-XeTeXLayoutInterface.o" "-c" "layout/xetex-XeTeXLayoutInterface.cpp" with args "c++" did not execute successfully (status code exit status: 1).
make[1]: *** [tectonic] Error 101
make: *** [texpresso-tonic] Error 2
`
The above error occurs when I make texpresso-tonic
It would be nice to have a (neo)vim mode :).
It is probably quite easy on TeXpresso side (one would have to implement a parser for sexp-based TeXpresso protocol, that I should document!), but requires someone knowledgeable with (modern) vim internals.
Hey!
I see that texpresso supports multiple different editors via ad-hoc plugins made separately for each one. Would it make sense to unify the interface and provide texpresso as an LSP?
This way, it would trivially work with many different editors with no need to add support one-by-one. And the LSP interface seems sufficient for texpresso's functionality.
Ivan
[info] working directory: /Users/projects/personal/texpresso
[info] executable path: /Users/projects/personal/texpresso/build/texpresso
[info] document path: /Users/projects/personal/texpresso/test
[info] document name: simple.tex
texpresso logo: 512x512
[info] tectonic path: /Users/yin/projects/personal/texpresso/build/texpresso-tonic
[dvi] loading pdftex.map
note: "version 2" Tectonic command-line interface activated
note: not in a document workspace; using the built-in default bundle
note: downloading SHA256SUM
note: downloading pdftex.map
warning: failure downloading "pdftex.map" from network
caused by: error decoding response body: operation timed out
caused by: operation timed out
There is no way usinc SyncTeX output to tell when we are done with an input file.
This can be a problem when forwarding a position from the editor: if the position is beyond the last line reported by any SyncTex entry, TeXpresso has no way to tell when it can stop searching, until reaching the end of the whole document.
This is wasteful for large documents, and it can happen a lot when the document is split in multiple files.
A solution would be to add a SyncTeX entry indicating that an input file has been closed.
Alternatively, TeXpresso could record when it receives a "close" request and correlate this with SyncTeX output, but that is much more complicated.
When starting the process with texpresso foo.tex
, foo.tex
should already exist.
This is understandable when used as a standalone viewer, but not ideal when remote controlled from an editor: the buffer might have been created in the editor but not yet saved on disk.
TeXpresso protocol allows the editor to communicate the contents of the buffer without writing to disk, however the file name should at least exist on disk (a simple touch foo.tex
is sufficient).
When remote controlled, TeXpresso should not exit and rather behave as if the file existed and was empty (waiting for the editor to communicate the actual contents).
I installed texpresso in WSL.
But when starting build/texpresso test/simple.tex
, I get the result
[info] working directory: /<mypath>/texpresso/texpresso
[info] executable path: /<mypath>/texpresso/texpresso/build/texpresso
[info] document path: /<mypath>/texpresso/texpresso/test
[info] document name: simple.tex
texpresso logo: 512x512
[info] tectonic path: texpresso-tonic
[dvi] loading pdftex.map
bundle_serve_hooks_cat: cannot read answer
[dvi] loading kanjix.map
Any idea how to get around that error? Usually also programs requiring a GUI open without a problem. (The Visual Studio Code extension via the WSL is also not working but not throwing an error.)
While trying to install this on Ubuntu 22.04.4 LTS, I was missing dependencies leptonica
and harfbuzz
and it was not so clear to me from the instructions that I would need to install them, and how.
Do you want to add the packages libleptonica-dev
and libharfbuzz-dev
to this line ?
I did the following:
apt install build-essential libsdl2-dev libmupdf-dev libmujs-dev libfreetype-dev libgumbo-dev libjbig2dec0-dev libjpeg-dev libopenjp2-7-dev cargo libssl-dev libfontconfig-dev libleptonica-dev libharfbuzz-dev
git clone --recurse-submodules [email protected]:let-def/texpresso.git
cd texpresso make texpresso
and I get this error:
make texpresso
make[1]: Entering directory '/home/weberam2/Downloads/texpresso'
make -C src texpresso
make[2]: Entering directory '/home/weberam2/Downloads/texpresso/src'
make -C .. config
make[3]: Entering directory '/home/weberam2/Downloads/texpresso'
mkdir -p build/objects
echo >Makefile.config "CFLAGS=-O2 -ggdb -I. -fPIC"
echo >>Makefile.config 'CC=gcc $(CFLAGS)'
echo >>Makefile.config 'LDCC=g++ $(CFLAGS)'
echo >>Makefile.config "LIBS=-lmupdf -lm `CC=gcc ./mupdf-config.sh` -lz -ljpeg -ljbig2dec -lharfbuzz -lfreetype -lopenjp2 -lgumbo -lSDL2"
/usr/bin/ld: cannot find -ltesseract: No such file or directory
collect2: error: ld returned 1 exit status
echo >>Makefile.config "TECTONIC_ENV="
make[3]: Leaving directory '/home/weberam2/Downloads/texpresso'
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/driver.o -Idvi/ driver.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/logo.o -Idvi/ logo.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/sprotocol.o -Idvi/ sprotocol.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/state.o -Idvi/ state.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/fs.o -Idvi/ fs.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/incdvi.o -Idvi/ incdvi.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/myabort.o -Idvi/ myabort.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/renderer.o -Idvi/ renderer.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_tex.o -Idvi/ engine_tex.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_pdf.o -Idvi/ engine_pdf.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/engine_dvi.o -Idvi/ engine_dvi.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/synctex.o -Idvi/ synctex.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/prot_parser.o -Idvi/ prot_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/sexp_parser.o -Idvi/ sexp_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/json_parser.o -Idvi/ json_parser.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/editor.o -Idvi/ editor.c
make -C dvi
make[3]: Entering directory '/home/weberam2/Downloads/texpresso/src/dvi'
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_context.o dvi_context.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_interp.o dvi_interp.c
gcc -O2 -ggdb -I. -fPIC -c -o ../../build/objects/dvi_prim.o dvi_prim.c
re2c dvi_special.re2c.c -o dvi_special.c --tags --bit-vectors
make[3]: re2c: No such file or directory
make[3]: *** [Makefile:21: dvi_special.c] Error 127
make[3]: Leaving directory '/home/weberam2/Downloads/texpresso/src/dvi'
make[2]: *** [Makefile:37: ../build/objects/libmydvi.a] Error 2
make[2]: Leaving directory '/home/weberam2/Downloads/texpresso/src'
make[1]: *** [Makefile:8: texpresso] Error 2
make[1]: Leaving directory '/home/weberam2/Downloads/texpresso'
make: *** [Makefile:2: all] Error 2
Any ideas? I find the install instructions aren't very clear...
Logging of TeX messages to the editor is almost append-only: during a run, content can only be appended, but when backtracking the current output is truncated, before appending again.
To prevent flickering or accidentally scrolling the output, it is necessary for the editor to wait a bit before reflecting these changes.
The heuristic implemented by emacs mode is to truncate only at the end of a run, and replace the output line by line during the run. This provides a decent look'n'feel, but can still feel slow if the output is updated too fun, without any benefits (e.g to receive 100 lines, it can be the case that the editor refresh the screen 100 times, once per line).
This heuristic with extra batching (e.g. wait for a buffer to fill up and delay updates by a bunch of milliseconds) is probably better implemented in TeXpresso itself rather than in the editor mode. Furthermore, if other editors were to be supported in the future (e.g. (n)vim), it is better to place as much logic as possible in TeXpresso itself.
When fragile, Beamer uses an intermediate file to temporarily save the content of the slide.
This cause SyncTeX to incorrectly report the location of this file rather than the original source. This file will have disappeared by the time SyncTeX output is processed, and the same filename is used for all slides, so SyncTeX is useless in this situation.
However TeXpresso has a detailed view of the whole process: when the files are created and removed, and which instance of the file was "alive" when a specific SyncTeX instruction was emitted. By correlating all these informations, it should be possible to recreate an approximate location of the actual source.
Scroll the pages using keyboard with HJKL.
Also add the possibility to scroll by a screen/half a screen.
Hi,
Thanks for the nice work! I am trying to use it for a journal paper, but it doesn't properly render the citations (I use .bibtex). Here is the template package I am using: https://www.ctan.org/tex-archive/macros/latex/contrib/mnras
Thanks.
I am reporting an issue as I am unable to perform the test build/texpresso test/simple.tex
After running, the program enters an infinite loop with the last few lines as follows:
success:1 size:35469
[dvi] loading cmmi8
success:1 size:1520
[dvi] loading cmmi8
success:0 size:9
bundle_serve_hooks_cat: error loading cmmi8.vf: not found
(flush)
optimized bounds: 0.000000,0.000000 - 700.000000,900.000061
I am running on Linux Mint 21.2 Cinnamon, with x86_64.
The model is Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
The source positions reported by SyncTeX are quite imprecise (one could say they suck :P).
Once we have a located the candidate lines (a mapping from a range of lines to a range of pages), we could use a sequence alignment algorithm to find a fine-grained mapping from source code characters to DVI characters.
On first start, TeXpresso downloads necessary TeX/LaTeX files from Tectonic repository.
This can take some time, during which TeXpresso appears to be frozen.
We should display some information or a spinner to keep users waiting.
One difficulty is that there are two sources of downloads and none of them have an easy to display information:
As a first approximation, I am thinking to display a simple spinner with a fixed message when there is nothing else to display (document is being processed and no page has been produced yet).
(This is not an urgent feature request, but something I thought would be nice in the long run.)
When working on a scientific document, it is frequent to navigate through the document to go back to a part written before. (For example: going back to read a definition, or the statement of a theorem, or a figure that we are now discussing.)
When using texpresso, it is tempting to always keep the viewer centered on the part of the document that we are actively editing.
To resolve the tension between these two needs, it would be nice to have support for opening several independent view windows onto the same document. (If the logic in texpresso is optimized to incrementally re-render only a single viewpoint, I think it would be fine as a first step for "secondary" widows to not show live updates.)
It is possible to realize this today by launching a separate PDF viewer to use as a secondary window and go look for definitions, figures etc. But if the texpresso viewer eventually gets support for clicking references/links to follow them ( #35 ), then that feature would naturally interact with multiple windows -- I may want the click to create a new secondary window to show the reference content, keeping the main window focused on the edition point.
Our PDF graphics interpreter only handles basic primitives.
TikZ/PGF (and hence beamer) often uses shading. The difficulty with this is that is it not done using new instructions (that we could implement), but by defining and referencing resources external to the instruction stream.
Our interpreter lacks both features: no notion of resources, no way to define nor reference them.
What is the cause of this error and how can I solve it? Thanks!
########################################################################
*make texpresso
make[1]: Entering directory '/home/yangdewu/texpresso'
make -C src texpresso
make[2]: Entering directory '/home/yangdewu/texpresso/src'
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
main.c: In function ‘find_diff’:
main.c:516:27: error: dereferencing pointer to incomplete type ‘fz_buffer’ {aka ‘const struct fz_buffer_s’}
516 | int i, len = fz_mini(buf->len, size);
| ^~
main.c: In function ‘realize_change’:
main.c:560:19: error: dereferencing pointer to incomplete type ‘fz_buffer’ {aka ‘struct fz_buffer_s’}
560 | uint8_t p = b->data;
| ^~
main.c: In function ‘interpret_command’:
main.c:866:7: warning: implicit declaration of function ‘SDL_SetWindowAlwaysOnTop’ [-Wimplicit-function-declaration]
866 | SDL_SetWindowAlwaysOnTop(ui->window, SDL_TRUE);
| ^~~~~~~~~~~~~~~~~~~~~~~~
main.c: In function ‘texpresso_main’:
main.c:1190:44: error: ‘SDL_MouseWheelEvent’ {aka ‘struct SDL_MouseWheelEvent’} has no member named ‘preciseX’
1190 | ui_mouse_wheel(ps->ctx, ui, e.wheel.preciseX, e.wheel.preciseY, mx, my,
| ^
main.c:1190:62: error: ‘SDL_MouseWheelEvent’ {aka ‘struct SDL_MouseWheelEvent’} has no member named ‘preciseY’
1190 | ui_mouse_wheel(ps->ctx, ui, e.wheel.preciseX, e.wheel.preciseY, mx, my,
| ^
make[2]: *** [Makefile:34: ../build/objects/main.o] Error 1
make[2]: Leaving directory '/home/yangdewu/texpresso/src'
make[1]: *** [Makefile:8: texpresso] Error 2
make[1]: Leaving directory '/home/yangdewu/texpresso'
make: *** [Makefile:2: all] Error 2
#########################################################
Snapshotting is done by forking the TeX process (the worker) at relevant points. All processes share the same line of communication, a bidirectional pipe.
A parent wait for their child to finish before resuming communication, therefore at any point in time, the pipe is morally owned by the most recent child process. In the meantime, the TeXpresso driver can also decide to kill sub-processes if their work is no longer needed.
This happens to cause race conditions that are difficult to precisely pinpoint. Fortunately they happen quite rarely, but the end result is a desynchronisation between the driver and the workers (guesses: partial writes by workers on the communication pipe, likely due to the delay between the decision to kill a worker and the kill signal being delivered).
Short term: Right now, the driver aborts when this happen. It would be better for the end-user if, after logging the error, it stayed alive and restarted document processing from scratch.
Long term: The shared pipe approach is inherently brittle, I am tempted to switch to UNIX domain sockets and pass a unique FD to each worker.
On top of robustness, this would simplify the workers implementation since they are relieved of process management. Each could work in isolation, with the driver being the only one aware of the running jobs.
It would also fix the linear nature of the current snapshots. By using only fork and wait, processes always form a stack: the last forked process will be the first to finish ("LIFO"). This is not efficient when processing long documents: when editing the first pages, it might seem relevant to fork the worker. Editing the following pages, a new fork might seem relevant again. Etc. We keep forking, but if we never go back, we keep pushing on the stack and there is no opportunity to cleanup the processes: either we abuse resources (processes and memory), or we have to decide at some point to backtrack, cleanup the stack, and start processing the document from an old checkpoint, temporarily making the application unresponsive.
I am on Ubuntu 20.04, which is one of the tested environments. When running the command to install all dependencies, I get the following:
Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
E: Unable to locate package libmujs-dev
I tried to proceed with the installation, to see whether the package was in fact needed. The build succeeded. However, when running the test, I get the following error:
SDL could not initialize wayland driver! SDL_Error: wayland not available
Falling back to default driver
texpresso logo: 512x512
[info] tectonic path: texpresso-tonic
[dvi] loading pdftex.map
bundle_serve_hooks_cat: cannot read answer
[dvi] loading kanjix.map
A window appears for a few instants, then closes; no PDF is generated.
Thank you for the amazing project!
But I meet problems in citation. I use \cite to cite references in .bib file. References can't be found in TeXpresso. The same project works well in Overleaf.
SyncTeX backward synchronization is implemented: our quick'n'dirty synctex parser does a good enough job that we can find source files when clicking on the window.
Synchronizing in the other direction is more complex because there needs to be coordination between synctex and the engine (progress as long as the forwarded position has not been found), and it should happen concurrently (the GUI should stay responsive) and be cancellable (maybe the position is nowhere to be found because it refers to a file that is not used in the document; the user will move to some file and we need to resume work as if nothing happened).
Increase discoverability by drawing an help screen, for instance when pressing '?'.
I'm getting this error when building:
error[E0282]:` type annotations needed for `Box<_>` --> /home/jens/.cargo/registry/src/index.crates.io-6f17d22bba15001f/time-0.3.34/src/format_description/parse/mod.rs:83:9 | 83 | let items = format_items | ^^^^^ ... 86 | Ok(items.into()) | ---- type must be known at this point | help: consider giving `items` an explicit type, where the placeholders `_` are specified | 83 | let items: Box<_> = format_items | ++++++++
It is probably related to this: rust-lang/rust#128181
So the time crate version needs updating
make -C src texpresso
make[1]: 进入目录“/home/paren/texpresso/src”
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/driver.o -Idvi/ driver.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
main.c: In function ‘find_diff’:
main.c:514:27: error: dereferencing pointer to incomplete type ‘fz_buffer’ {aka ‘const struct fz_buffer_s’}
514 | int i, len = fz_mini(buf->len, size);
| ^~
main.c: In function ‘realize_change’:
main.c:558:19: error: dereferencing pointer to incomplete type ‘fz_buffer’ {aka ‘struct fz_buffer_s’}
558 | uint8_t *p = b->data;
| ^~
make[1]: *** [Makefile:34:../build/objects/main.o] 错误 1
make[1]: 离开目录“/home/paren/texpresso/src”
libmupdf-dev 已经是最新版 (1.16.1+ds1-1ubuntu1)。
libsdl2-dev 已经是最新版 (2.0.10+dfsg1-3)。
When using a new package or a feature that requires downloading new resources to the tectonic cache, TeXpresso is likely to freeze.
This is likely because of a bad interaction between forking and downloading: the socket used for downloading files will be shared by all fork of the worker, quickly leading to corruption.
It could also be the cache that gets corrupted: file A is missing, process P2 is forked from P1, P2 downloads A, later P2 dies and P1 is resumed: it still thinks A is missing from cache, potentially corrupting some internal state. (Less likely, downloading file should be idempotent, so at worst the file is downloaded twice).
I am not yet sure how to address that: tectonic code needs to be instrumented to close the downloading socket after a fork. The drawback is that we might start more short-lived TCP connections to download files. This is probably not a problem (it happens at most once per file, and this is already what happens when using tectonic -X bundle cat
).
Alternatively, this could be handled by forking before downloading, so that a single downloading process is shared by all the workers. The drawback is more IPC.
I tend to favor the first option (short-lived TCP connections).
22.04.1-Ubuntu SMP PREEMPT_DYNAMIC 2 x86_64 x86_64 x86_64 GNU/Linux
make config
make clean texpresso
error message
rm -rf build/objects/*
make -C src texpresso
make[1]: Entering directory '/home/quchunhe/Git/texpresso/src'
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/driver.o -Idvi/ driver.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
main.c:795:1: error: static declaration of ‘SDL_SetWindowAlwaysOnTop’ follows non-static declaration
795 | SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool state)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/SDL2/SDL_events.h:33,
from /usr/include/SDL2/SDL.h:41,
from main.c:25:
/usr/include/SDL2/SDL_video.h:1123:30: note: previous declaration of ‘SDL_SetWindowAlwaysOnTop’ with type ‘void(SDL_Window *, SDL_bool)’
1123 | extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
| ^~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:34: ../build/objects/main.o] Error 1
make[1]: Leaving directory '/home/quchunhe/Git/texpresso/src'
make: *** [Makefile:8: texpresso] Error 2
Hey!
Nice to see this project! I seen texpresso support Emacs and Neovim.
Have any plan to support vscode?
Yin
Does the TeXpresso viewer support jumping to the destination of a reference?
(When working on scientific LaTeX documents it is very useful to be able to follow references, and also to have a shortcut to go back to where we where before following it.)
To observe the problem:
Step 1. will happen smoothly: when adding consecutive characters, a snapshot very close to the text caret is ready to reprocess the current page. Step 2. is likely to cause a slowdown: not problematic, but enough to be observable (100-200ms on my tests).
This situation should be better handled, for instance by keeping a snapshot close to the beginning of the page. The problem is that right now, the positioning is too naive: even if we keep enough snapshots, they are either too close or too far.
Hi! I am using Ubuntu22.04 and failed to run the testing document. And here is my guess:
The first time I tried building the project, I found myself missing tesseract
:
...
make[2]: Entering directory '/home/jalenlv/Downloads/texpresso'
mkdir -p build/objects
echo >Makefile.config "CFLAGS=-O2 -ggdb -I. -fPIC"
echo >>Makefile.config 'CC=gcc $(CFLAGS)'
echo >>Makefile.config 'LDCC=g++ $(CFLAGS)'
echo >>Makefile.config "LIBS=-lmupdf -lm `CC=gcc ./mupdf-config.sh` -lz -ljpeg -ljbig2dec -lharfbuzz -lfreetype -lopenjp2 -lgumbo -lSDL2"
/usr/bin/ld: cannot find -ltesseract: No such file or directory
collect2: error: ld returned 1 exit status
echo >>Makefile.config "TECTONIC_ENV="
make[2]: Leaving directory '/home/jalenlv/Downloads/texpresso'
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/driver.o -Idvi/ driver.c
gcc -O2 -ggdb -I. -fPIC -c -o ../build/objects/main.o -Idvi/ main.c
...
Even after I installed tesseract
using sudo apt install tesseract-ocr libtesseract-dev
and re-cloned the repo, I still failed to run the testing doc. When I tried the testing doc, I got
[info] working directory: /home/jalenlv/Downloads/texpresso
[info] executable path: /home/jalenlv/Downloads/texpresso/build/texpresso
[info] document path: /home/jalenlv/Downloads/texpresso/test
[info] document name: simple.tex
texpresso logo: 512x512
[info] tectonic path: texpresso-tonic
[dvi] loading pdftex.map
bundle_serve_hooks_cat: cannot read answer
[dvi] loading kanjix.map
and the window just popped up and shut down immediately. This was the same both with and without tessetact
installed.
Many thanks if you can help out!
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.