You are not logged in.
Hey Again Arch Forums
Been setting up my latex for assignments and reports to make, i have some trouble getting my compoilere to even open.
When i try to use the nvim command "latexPreviewOn" it start loading a compoilere but it doesn't open an pdf window or any viewer for that matter.
# Source for LaTeX lib using:
https://github.com/lervag/vimtex
https://github.com/emakman/neovim-latex-previewer
https://www.overleaf.com/
# Notes:
Don't know if it is relevant, but i have to make the PDF file manually (for now), with "pdflatex LaTeXStandardTemplate.tex"
# init.vim:
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'ncm2/ncm2'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'lervag/vimtex'
Plug 'emakman/nvim-latex-previewer'
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
"""""""""""""""""""""""""
" Settings "
"""""""""""""""""""""""""
syntax on
set number
syntax enable
set clipboard+=unnamedplus
filetype plugin indent on
let g:vimtex_view_method = 'zathura'
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_compiler_method = 'latexrun'
let maplocalleader = ","
# LaTeX file:
\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\title{Test}
\author{NAME}
\date{DATE}
\begin{document}
\maketitle{TITLE}
\section{Introduction}
\end{document}
# OutPut of the pdflatex LaTeXStandardTemplate.tex
[$NAME@archlinux nvim_templates]$ pdflatex LaTeXStandardTemplate.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/Arch Linux) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./LaTeXStandardTemplate.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/share/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/share/texmf-dist/tex/latex/graphics-def/pdftex.def)))
(/usr/share/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)
No file LaTeXStandardTemplate.aux.
(/usr/share/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/share/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)) [1{/var/lib/tex
mf/fonts/map/pdftex/updmap/pdftex.map}] (./LaTeXStandardTemplate.aux) )</usr/sh
are/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/share/texmf-dist
/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share/texmf-dist/fonts/type1/pu
blic/amsfonts/cm/cmr12.pfb></usr/share/texmf-dist/fonts/type1/public/amsfonts/c
m/cmr17.pfb>
Output written on LaTeXStandardTemplate.pdf (1 page, 36740 bytes).
Transcript written on LaTeXStandardTemplate.log.
Hope you can help me out
Last edited by ELODollZ (2023-04-23 09:22:23)
Offline
Don't know if it is relevant, but i have to make the PDF file manually (for now), with "pdflatex LaTeXStandardTemplate.tex"
That's certainly relevant as the preview tool you're using depends on latexmk. You need to configure latexmk (and install any other dependencies of the preview tool).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm still fairly new to Arch and the deep file structure within usr, etc, tmp, and all that.
Alrighty, i have installed the latexmk manuelly from with the perl script. i gave me this output, i'm slightly unsure how to add the path, and i tried testing it (not working, still just gives the compile loading, but nothing opening or showing up)
# Output from finalizing perl script install from latexmk
Add /usr/local/texlive/2023/texmf-dist/doc/man to MANPATH.
Add /usr/local/texlive/2023/texmf-dist/doc/info to INFOPATH.
Most importantly, add /usr/local/texlive/2023/bin/x86_64-linux
to your PATH for current and future sessions.
# Source:
https://ctan.org/pkg/latexmk
Offline
i have installed the latexmk manuelly from with the perl script
Undo that. Latexmk is provided by the texlive-core package which you must have already had installed if you have pdflatex (assuming you using the repo packages).
You really shouldn't manually install anything on an arch system - use your package manager (pacman).
I said you'd need to configure latexmk as that's what the vim plugin you are using calls. Set aside the vim plugin for now, and just get your tex system working so that you can use latexmk.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Alrighty, removed all from perl scripted (as far as i could find, don't know if it has add something to single files (single lines) but it's removed)
Reinstalled, texlive-core, so it's "fresh" installed.
Things i have noted:
1. my "$HOME/.latexmkrc" doesn't exist
2. the command "latexmk" works, it makes a files as dvi files exampel "Template.dvi"
List of files from the latexmk command:
Template.tex
Template.dvi
Template.log
Template.fls
Template.fdb
Template.aux
Template.pdf
3. when latexmk command runned:
Rc files read:
NONE
Latexmk: This is Latexmk, John Collins, 7 Jan. 2023. Version 4.79.
Latexmk: No file name specified, and I couldn't find any
Use
latexmk -help
to get usage information
4. The command still prints the "NONE" thing when i try to use it on latexmk on my templates, but it makes files and the pdf works fine.
Last edited by ELODollZ (2023-04-21 07:38:57)
Offline
1. my "$HOME/.latexmkrc" doesn't exist
And it will not exist until you create it. There are ample docs / tutorials available on setting up latexmk - and while I am comfortable using it for my purposes, I am not equipped to give a step-by-step tutorial in setting up latex on your system (nor are the forums the venue for that anyways).
But the answer to your question of why your vim plugin command was failing is simply that you hadn't even configured your latex system properly yet to meet it's requirements. That plugin just runs a latexmk command behind the scenes (likely with the preview flags ... which makes me wonder what the purpose of the plugin is at all as once it's configured you can just run that command directly).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
alrighty.
last questions:
1. what format should the latexmkrc be, couldn't find any or should i just make a file thats called "latexmkrc" without a format?
2. can you provide me with some sources, you know that works, you have made yours work. (anything at all, so i have something to go with, still new to LaTeX and all that)
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
omg i'm so dumb, a friend reminded me that i need to install the back-end for Zathura, otherwise it would never work sorry for the troubles.
So leasson learned, make sure you have installed all packages
Offline