-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom argument to compilation on the fly #2836
Comments
Glad to hear it!
I think it seems like a good idea to allow an argument to *:VimtexCompile*
*<plug>(vimtex-compile)*
:VimtexCompile [options] If the compiler supports and is set to run in
continuous mode, then this command works as
a compiler toggle. If not, this command will run
a single shot compilation.
Arguments to the command will be passed on as options
when starting the compiler. This allows the user to
start the compiler with different options without
changing any configuration. That is, if the user uses
the latexmk backend, then adding any option argument
is equivalent to adding them to the `'options'` key
of |g:vimtex_compiler_latexmk|. |
I've pushed a PR for this; it would be nice if you could test if it does what you want. |
Thank you for the changes; I've checked out the branch Running |
After running this, what do you see in Notice that doing |
Output of
and
|
Ah, so it seems that the I'll look into how I can make the |
Agreed, and to confirm this, running |
Ok, I've tried to include expansion as well; please pull the latest version of the branch and test again. |
It works well, thank you! |
Great; I've merged the PR. Let me know if you find any bugs :) |
Good afternoon! I am enjoying vimtex so far (for several years now). It has been very helpful to my work.
Is your feature request related to a problem? Please describe it.
Currently I am posting problem sets, and thereafter, adding the solutions right after each question.
By using a tex macro (using xparse), the solutions can be shown or hidden, as defined by the
\jobname
.To generate the questions with the solutions, simply append
-soln
to thejobname
, i.e.To show only the questions, compile as per usual (using
:VimtexCompile
).The tex macro in the preamble handles this:
When compiled, this produces
<file>.pdf
, or<file>-soln.pdf
, depending on the\jobname
.Describe the solution you'd like
Would there be a way to add an argument such as
-jobname=%:soln
on-the-fly? One possibility is to allow:VimtexCompile
to take in arguments, ie.:VimtexCompile -jobname=%:r-soln
, which would pass the jobname argument tog:vimtex_compiler_latexmk
.Describe alternatives you've considered
g:vimtex_compiler_latexmk
could be modified, but the added argument becomes permanent, which is undesirable for a questions only output.!latexmk % -jobname=%:r-soln
, but the shell output quickly clutters the vim window after this is run.Additional context
Neovim 0.8, lualatex.
The text was updated successfully, but these errors were encountered: