Cómo crear un archivo en formato LaTeX sin una instalación TexLive existente

Cómo crear un archivo en formato LaTeX sin una instalación TexLive existente

Mi máquina no tiene una instalación de TexLive existente. Logré construir un binario XeTeX a partir de fuentes (pasos enCómo construir XeTeX y dvipdfmx desde el código fuente (TexLive 2020))

Ahora estoy intentando crear archivos de formato (el script completo que ejecuto esaquí). Recibo un error al xelatex -ini -etex latex.ltxindicar que no puede localizar las fuentes. Las fuentes están presentes en ./texliveel directorio poblado por ./install-tl.

¿Cómo le indico xetexal binario que busque en este directorio? (Yo copié cp xetex xelatex).

@DonHosekSugerí que creara una pregunta separada para esta parte de la depuración. Contexto más amplio: estoy intentando actualizar obsoletoxetex-jsytexlive.jsa TexLive 2020 para crear un renderizador LaTeX simple en el navegador.

Local config file preload.cfg used

=====================================
(base/preload.cfg (base/preload.ltx
kpathsea: Running mktextfm cmex10
mktextfm: No such file or directory
kpathsea: Appending font creation commands to missfont.log.

! Font \OMX/cmex/m/n/10=cmex10 not loadable: Metric (TFM) file or installed fon
t not found.
<to be read again>
                   \relax
l.41 ...ame OMX/cmex/m/n/10\endcsname=cmex10\relax
TEXLIVE_BASE_URL=http://mirrors.ctan.org/macros/latex/base.zip
TEXLIVE_INSTALLER_URL=http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz

# path to my newly built xetex
XELATEX_EXE=$PWD/prefix/bin/xelatex

mkdir -p texlive
echo selected_scheme scheme-basic > texlive/profile.input
echo TEXDIR $PWD/texlive >> texlive/profile.input
echo TEXMFLOCAL $PWD/texlive/texmf-local >> texlive/profile.input
echo TEXMFSYSVAR $PWD/texlive/texmf-var >> texlive/profile.input
echo TEXMFSYSCONFIG $PWD/texlive/texmf-config >> texlive/profile.input
echo TEXMFVAR $PWD/home/texmf-var >> texlive/profile.input

wget $TEXLIVE_INSTALLER_URL
pushd texlive
tar xzvf ../install-tl-unx.tar.gz
./install-tl-*/install-tl -profile profile.input
rm -rf bin readme* tlpkg install* *.html texmf-dist/doc texmf-var/web2c
echo "Done! Please run 'make texlive.lst' now!"
popd

wget $TEXLIVE_BASE_URL

mkdir -p latex_format
pushd latex_format
unzip -o ../base.zip
pushd base
$XELATEX_EXE -ini -etex unpack.ins
$XELATEX_EXE -ini -etex latex.ltx

ACTUALIZARde alguna manera kpathseano puedo encontrar mktextfmcuál está en $TEXLIVE_SOURCE_DIR/texk/texlive/linked_scripts/texlive. Si lo agrego a PATH, ./prefix/bin/kpsewhichno puedo encontrar mktex.optcuál está en ./texlive/texmf-dist/web2c/mktex.opt. ./prefix/share/texmf-dist/web2c/texmf.cnfno sabe nada sobre ./texlive. ¿Cómo me aseguro de que ./prefix/bin/kpsewhichpueda descubrir ./texlivey producir archivos de formato?

Respuesta1

Tuve que agregar export TEXMFDIST=$PWD/texlive/texmf-distpara kpsewhichpoder descubrir la instalación nativa como se sugiere enhttps://github.com/lyze/xetex-js/issues/4#issuecomment-682257902.

mi completoguiones para completar:

# http://www.linuxfromscratch.org/blfs/view/svn/pst/texlive.html
# https://www.tug.org/texlive/build.html
# https://www.tug.org/texlive/doc/tlbuild.html#Build-one-engine

export MAKEFLAGS=-j20

TEXLIVE_TEXMF_URL=ftp://tug.org/texlive/historic/2020/texlive-20200406-texmf.tar.xz
TEXLIVE_SOURCE_URL=ftp://tug.org/texlive/historic/2020/texlive-20200406-source.tar.xz
TEXLIVE_TLPDB_URL=ftp://tug.org/texlive/historic/2020/texlive-20200406-tlpdb-full.tar.gz
TEXLIVE_BASE_URL=http://mirrors.ctan.org/macros/latex/base.zip
TEXLIVE_INSTALLER_URL=http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
TEXLIVE_SOURCE_DIR=$PWD/texlive-20200406-source

ROOT=$PWD
TEXLIVE=$PWD/texlive
PREFIX=$PWD/prefix
CACHE=$PWD/config.cache
XELATEX_EXE=$PREFIX/bin/xelatex
XETEX_EXE=$PREFIX/bin/xetex
mkdir -p $PREFIX

wget --no-clobber $TEXLIVE_SOURCE_URL
tar -xvf $(basename $TEXLIVE_SOURCE_URL)
cd $TEXLIVE_SOURCE_DIR
mkdir -p texlive-build
cd texlive-build


#  --disable-dvipng                                 \
#  --disable-dvisvgm                            \
#  --disable-dvi2tty                            \
#  --disable-luatex                              \
#  --disable-luajittex                           \
#  --disable-luahbtex                            \
#  --disable-luajithbtex                         \
#  --disable-mflua                               \
#  --disable-mfluajit                            \
#  --disable-etex                               \
#  --disable-detex                              \
#  --disable-lcdf-typetools                         \
#  --disable-ps2eps                                 \
#  --disable-psutils                            \
#  --disable-t1utils                            \
#  --disable-texinfo                            \
#  --disable-xindy                              \
#  --disable-biber                              \

../configure                                    \
  --cache-file=$CACHE                           \
  --prefix=$PREFIX                              \
  --enable-static                               \
  --enable-xetex                                \
  --enable-dvipdfm-x                            \
  --disable-shared                              \
  --disable-multiplatform                       \
  --disable-native-texlive-build                \
  --disable-all-pkgs                            \
  --without-x                                   \
  --without-system-cairo                        \
  --without-system-gmp                          \
  --without-system-graphite2                    \
  --without-system-harfbuzz                     \
  --without-system-libgs                        \
  --without-system-libpaper                     \
  --without-system-mpfr                         \
  --without-system-pixman                       \
  --without-system-poppler                      \
  --without-system-xpdf                         \
  --without-system-icu                          \
  --without-system-fontconfig                   \
  --without-system-freetype2                    \
  --without-system-libpng                       \
  --without-system-zlib                         \
  --with-banner-add=" - BLFS"

make $MAKEFLAGS
make $MAKEFLAGS install
cd texk/web2c
make $MAKEFLAGS xetex
cp xetex $XETEX_EXE
cp $XETEX_EXE $XELATEX_EXE

cd $ROOT
mkdir -p $TEXLIVE
echo selected_scheme scheme-basic > $TEXLIVE/profile.input
echo TEXDIR $TEXLIVE >> $TEXLIVE/profile.input
echo TEXMFLOCAL $TEXLIVE/texmf-local >> $TEXLIVE/profile.input
echo TEXMFSYSVAR $TEXLIVE/texmf-var >> $TEXLIVE/profile.input
echo TEXMFSYSCONFIG $TEXLIVE/texmf-config >> $TEXLIVE/profile.input
echo TEXMFVAR $PWD/home/texmf-var >> $TEXLIVE/profile.input
wget --no-clobber $TEXLIVE_INSTALLER_URL
cd $TEXLIVE
tar xzvf ../install-tl-unx.tar.gz
./install-tl-*/install-tl -profile $TEXLIVE/profile.input
rm -rf bin readme* tlpkg install* *.html texmf-dist/doc texmf-var/web2c

cd $ROOT
export TEXMFDIST=$PWD/texlive/texmf-dist
wget --no-clobber $TEXLIVE_BASE_URL
mkdir -p latex_format
cd latex_format
unzip -o ../base.zip
cd base
$XELATEX_EXE -ini -etex unpack.ins
touch hyphen.cfg
$XELATEX_EXE -ini -etex latex.ltx
                                                                            ```

información relacionada