question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal - make synctex command configurable

See original GitHub issue

Will it be possible to make synctex command configurable from the settings file?

I am trying to run all LaTeX commands within docker containers. I am able to run both toolchain and chktex commands, for example, with these settings:

"latex-workshop.linter_command_active_file": [
  "sh",
  "-c",
  "docker run --rm -i -v $(pwd):$(pwd) -w $(pwd) harmish/latex chktex -wall -n22 -n30 -e16 -q -I0 -f%f:%l:%c:%d:%k:%n:%m\n"
],
"latex-workshop.linter_command_root_file": [
  "sh",
  "-c",
  "docker run --rm -i -v $(pwd):$(pwd) -w $(pwd) harmish/latex chktex -wall -n22 -n30 -e16 -q -f%f:%l:%c:%d:%k:%n:%m %DOC%.tex\n"
],
"latex-workshop.toolchain": [
  "docker run --rm -t -v $(pwd):$(pwd) -w $(pwd) harmish/latex latexmk -synctex=1 -interaction=nonstopmode -file-line-error -pdf %DOC%.tex"

Same way, it would be great if I can invoke the synctex command also from within a container.

I quickly checked by replacing synctex with docker run --rm -i -v $(pwd):$(pwd) -w $(pwd) harmish/latex synctex in lines 66 and 78, which works fine.

And thank you, the authors, for creating this nice and powerful extension.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
James-Yucommented, Apr 6, 2017

Great! Will work on that.

What I suppose is that the API should support reading configs even not registered in package.json. If so, we can pop red alerts when the global/workspace config has obsolete config keys and encourage users to adopt the new pattern. I’ll have a short AFK and return with some more things!

1reaction
harmishhkcommented, Apr 11, 2017

@jabooth thank you for the information. The new way of defining configurations seems better. However, my docker related configurations had problems with this solution. It is combination of how spawn of child_process works and how configuration strings are passed on to docker. But, I have found a better way of defining LaTeX commands with docker. Rather then playing with configurations, I just added a small executable script latexmk in my PATH, for Linux it would be like:

#!/bin/bash
docker run --rm -i -v $(pwd):$(pwd) -w $(pwd) harmish/latex latexmk "$@"

With this I do not need to change configuration in LaTeX-Workshop at all, and this should work regardless of using spawn or exec and whatever tool I’m using to call latexmk. Similar script for chktex also works fine 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to enbale SyncTex in LyX? - TeX - LaTeX Stack Exchange
The question is: Since LyX 2.0 has specific settings for enabling SyncTex, why it is not enough to enable it there as the...
Read more >
Skim / Wiki / TeX_and_PDF_Synchronization - SourceForge
To use SyncTeX you need to use a TeX distribution that includes this new technology (e.g. TeX Live 2008) and supply the command...
Read more >
AUCTeX - EmacsWiki
AUCTeX is a comprehensive customizable integrated environment for writing input files for TeX/LaTeX/ConTeXt/Texinfo using Emacs or XEmacs.
Read more >
Create a key binding for LaTeX Jump to PDF -- synctex
[In the future, I plan on writing some code to use the -output-directory option to /tmp and automatically copy the *.pdf back to...
Read more >
User defined Quick Build command (sage) does not work in ...
I have to write the whole path for the command sage in Texmaker. I replace my pipeline in Options → Configure → QuickBuild...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found