Commit: fdab14f4ac141f26240729b792b2a59fad814be5
Parent: 932f1fa1c827e9b1f509046c510449a7454d9ca1
Author: Randy Palamar
Date: Thu, 4 Mar 2021 22:59:21 -0700
use latex on linux as well
i added a vis script to build single source files. for now it only
supports latex but other types can be added as needed
Diffstat:
9 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/.config/sys/etc/portage/make.conf b/.config/sys/etc/portage/make.conf
@@ -16,7 +16,7 @@ PKGDIR="/usr/portage/packages"
ACCEPT_LICENSE="-* @FREE"
LC_MESSAGES=C
-USE="alsa ffmpeg libressl opengl savedconfig \
+USE="alsa cjk ffmpeg libressl opengl savedconfig \
minimal udev vaapi X xinerama xft wayland zstd \
fontconfig truetype \
flac ogg opus vorbis \
diff --git a/.config/sys/etc/portage/package.env/set b/.config/sys/etc/portage/package.env/set
@@ -9,7 +9,7 @@ media-libs/flac static
media-libs/libogg static pic
#media-libs/libvorbis static
media-libs/opus static pic
-media-libs/tiff static
+media-libs/tiff static pic
media-sound/lame static pic
sys-base/sbase tcc
diff --git a/.config/sys/etc/portage/package.use/app b/.config/sys/etc/portage/package.use/app
@@ -7,3 +7,5 @@ app-emulation/qemu gtk usb -pin-upstream-blobs -curl -vnc QEMU_USER_TARGETS: x86
app-shells/bash -net
app-shells/dash static
app-text/mupdf -opengl -curl -javascript -ssl
+app-text/texlive graphics science xetex l10n_ja -X
+app-text/texlive-core xetex
diff --git a/.config/sys/etc/portage/package.use/media b/.config/sys/etc/portage/package.use/media
@@ -2,6 +2,7 @@ media-fonts/source-han-sans L10N: ja ko zh-TW
media-fonts/source-pro cjk
media-libs/audiofile -flac
media-libs/gegl -ffmpeg
+media-libs/harfbuzz icu # needed for Tex
media-libs/imlib2 -tiff
media-libs/jbig2dec -png
media-libs/libbluray aacs
diff --git a/.config/sys/etc/portage/package.use/sys b/.config/sys/etc/portage/package.use/sys
@@ -16,7 +16,7 @@ sys-fs/cryptsetup openssl urandom -argon2 -luks1_default
sys-fs/lvm2 device-mapper-only -thin
sys-kernel/gentoo-sources symlink experimental
sys-libs/binutils-libs static-libs
-sys-libs/compiler-rt-sanitizers -libfuzzer -sanitize -xray
+sys-devel/clang-runtime -sanitize # doesn't work in musl
sys-libs/ldb -python
sys-libs/zlib minizip static-libs
sys-process/procps ncurses
diff --git a/.config/sys/etc/portage/savedconfig/x11-terms/st-9999 b/.config/sys/etc/portage/savedconfig/x11-terms/st-9999
@@ -113,7 +113,7 @@ static const char *colorname[] = {
[12] = "#b694f2", /* blue */
[13] = "#eb9ac3", /* magenta */
[14] = "#7178eb", /* cyan */
- [15] = "#cccaca", /* white */
+ [15] = "#dcdccc", /* white */
[255] = 0,
diff --git a/.config/sys/var/lib/portage/world b/.config/sys/var/lib/portage/world
@@ -14,6 +14,7 @@ app-portage/gentoolkit
app-portage/smart-live-rebuild
app-shells/dash
app-shells/oksh
+app-text/texlive
app-text/zathura-pdf-mupdf
cross-avr/avr-libc
cross-avr/binutils
diff --git a/.config/vis/build.lua b/.config/vis/build.lua
@@ -0,0 +1,38 @@
+function build_files(win)
+ function error()
+ vis:info('This filetype is not supported')
+ end
+
+ function build_tex(f)
+ -- build pdf
+ vis:command(string.format('!lualatex %s >/dev/null', f))
+
+ -- reload pdf (zathura does this automatically)
+ -- vis:command('!pkill -HUP mupdf')
+ end
+
+ local lang = {}
+ lang['.tex'] = build_tex
+
+ function build()
+ -- write file
+ vis:command('w')
+
+ local f = win.file.name
+ if f == nil then error() return end
+
+ local i = string.find(f, '%.')
+ if i == nil then error() return end
+
+ local method = lang[string.sub(f, i)]
+ if method == nil then error() return end
+
+ vis:info(string.format('building \'%s\'', f))
+ method(f, out)
+ end
+
+ vis:map(vis.modes.NORMAL, ',c', build)
+ vis:command_register('build', build)
+end
+
+vis.events.subscribe(vis.events.WIN_OPEN, build_files)
diff --git a/.config/vis/visrc.lua b/.config/vis/visrc.lua
@@ -1,4 +1,5 @@
require('vis')
+require('build')
vis.events.subscribe(vis.events.INIT, function()
vis:command("set theme dark")