LaTeX document doesn't build using Visual Studio - Page 1
Forum section: electronics / general

author: Cloud
author_rank: Regular Contributor
timestamp: December 28, 2020, 08:42:52 am
content: I am experiencing a problem using Visual Studio Code and LaTeX. I would build my document normaly but suddenly it has stopped working. It just comes to the page 5 and spinss Build wheel. It shows 0 errors or problems. And if I left it all night building it will still be the same. What seems to be the problem?

author: PKTKS
author_rank: Super Contributor
timestamp: December 28, 2020, 02:01:01 pm
content: Last thing in the world MS wants is people suddenlydiscovering they can publish documents orders ofmagnitude better and more practical using TeX.So why in hell Visual Studio would be by any means expectedto work with TeX? I doubt they will do that comfy ...They will not let go their Word Cloud cash cow..Try in your Tex live distribution to the PERL companionlatex automated builder: latexmk (links to latexmk.pl)usually a handy --help (like all good PERL )Code:Latexmk 4.45: Automatic LaTeX document generation routineUsage: latexmk  [filename ...]Latexmk_options:-aux-directory=dir or -auxdir=dir- set name of directory for auxiliary files (aux, log)- Currently this only works with MiKTeX-bibtex - use bibtex when needed (default)-bibtex- - never use bibtex-bibtex-cond - use bibtex when needed, but only if the bib files exist-bm <message> - Print message across the page when converting to postscript-bi <intensity> - Set contrast or intensity of banner-bs <scale> - Set scale for banner-commands - list commands used by latexmk for processing files-c - clean up (remove) all nonessential files, exceptdvi, ps and pdf files.This and the other clean-ups are instead of a regular make.-C - clean up (remove) all nonessential filesincluding aux, dep, dvi, postscript and pdf filesand file of database of file information-CA - clean up (remove) all nonessential files.Equivalent to -C option.-CF - Remove file of database of file information before doingother actions-cd - Change to directory of source file when processing it-cd- - Do NOT change to directory of source file when processing it-dependents or -deps - Show list of dependent files after processing-dependents- or -deps- - Do not show list of dependent files-deps-out=file - Set name of output file for dependency list,and turn on showing of dependency list-dF <filter> - Filter to apply to dvi file-dvi - generate dvi-dvi- - turn off required dvi-e <code> - Execute specified Perl code (as part of latexmk start-upcode)-f - force continued processing past errors-f- - turn off forced continuing processing past errors-gg - Super go mode: clean out generated files (-CA), and thenprocess files regardless of file timestamps-g - process regardless of file timestamps-g- - Turn off -g-h - print help-help - print help-jobname=STRING - set basename of output file(s) to STRING.(Like --jobname=STRING on command line for many currentimplementations of latex/pdflatex.)-l - force landscape mode-l- - turn off -l-latex=<program> - set program used for latex.(replace '<program>' by the program name)-latexoption=<option> - add the given option to the (pdf)latex command-logfilewarninglist or -logfilewarningsgive list of warnings after run of (pdf)latex-logfilewarninglist- or -logfilewarnings-do not give list of warnings after run of (pdf)latex-M - Show list of dependent files after processing-MF file - Specifies name of file to receives list dependent files-MP - List of dependent files includes phony target for each source file.-new-viewer - in -pvc mode, always start a new viewer-new-viewer- - in -pvc mode, start a new viewer only if needed-nobibtex - never use bibtex-nodependents - Do not show list of dependent files after processing-norc - omit automatic reading of system, user and project rc files-output-directory=dir or -outdir=dir- set name of directory for output files-pdf - generate pdf by pdflatex-pdfdvi - generate pdf by dvipdf-pdflatex=<program> - set program used for pdflatex.(replace '<program>' by the program name)-pdfps - generate pdf by ps2pdf-pdf- - turn off pdf-ps - generate postscript-ps- - turn off postscript-pF <filter> - Filter to apply to postscript file-p - print document after generating postscript.(Can also .dvi or .pdf files -- see documentation)-print=dvi - when file is to be printed, print the dvi file-print=ps - when file is to be printed, print the ps file (default)-print=pdf - when file is to be printed, print the pdf file-pv - preview document. (Side effect turn off continuous preview)-pv- - turn off preview mode-pvc - preview document and continuously update. (This also turnson force mode, so errors do not cause latexmk to stop.)(Side effect: turn off ordinary preview mode.)-pvc- - turn off -pvc-quiet - silence progress messages from called programs-r <file> - Read custom RC file(N.B. This file could override options specified earlieron the command line.)-recorder - Use -recorder option for (pdf)latex(to give list of input and output files)-recorder- - Do not use -recorder option for (pdf)latex-rules - Show list of rules after processing-rules- - Do not show list of rules after processing-showextraoptions - Show other allowed options that are simply passedas is to latex and pdflatex-silent - silence progress messages from called programs-time - show CPU time used-time- - don't show CPU time used-use-make - use the make program to try to make missing files-use-make- - don't use the make program to try to make missing files-v - display program version-verbose - display usual progress messages from called programs-version - display program version-view=default - viewer is default (dvi, ps, pdf)-view=dvi - viewer is for dvi-view=none - no viewer is used-view=ps - viewer is for ps-view=pdf - viewer is for pdf-lualatex - use lualatex for processing files to pdfand turn pdf mode on, dvi/ps modes off-xelatex - use xelatex for processing files to pdfand turn pdf mode on, dvi/ps modes offfilename = the root filename of LaTeX document-p, -pv and -pvc are mutually exclusive-h, -c and -C override all other options.-pv and -pvc require one and only one filename specifiedAll options can be introduced by '-' or '--'. (E.g., --help or -help.)In addition, latexmk recognizes many other options that are passed tolatex and/or pdflatex without interpretation by latexmk. Run latexmkwith the option -showextraoptions to see a list of theseReport bugs etc to John Collins <jcc8 at psu.edu>.In short this should do the trick with parsing messages anderrors on console.. a good shell with color coding will helpCode:latexmk -pdf -pdflatex="pdflatex --shell-escape %O %S" myfoo.texPaul

author: Cloud
author_rank: Regular Contributor
timestamp: December 30, 2020, 09:40:50 am
content: Thanks I'll try this.I was told this was company policy to use Visual Studio for LaTex and of course all coworkers that know how to use it are currently on vacation and IT department has no idea what LaTeX.Visual Studio has one good feature: you can generate preview for Circuitikz image directly so you dont't have to compile whole document. But of course this is microsoft so this previews are opening randomly every 10 seconds

author: PKTKS
author_rank: Super Contributor
timestamp: December 30, 2020, 11:21:31 am
content: Quote from: Cloud on December 30, 2020, 09:40:50 amKinda odd... using "VisualStudio" for anything only willsound or make sense to MS employees or someone totallyout this world...In a pinch any TikZ code should compile straight out of thebox using latexmk ..I had done this countless times and it is really simpledoing so on a terminal where a good color parser doesa lot of help when tracking dependencies...My stuff still compiles directly .. using external bindsto gnuplot and Bode plots metalatex via TikZAttached fancy stuff.. done today in less than1 second..Paul

author: newbrain
author_rank: Super Contributor
timestamp: January 01, 2021, 05:23:11 pm
content: Cloud,it's not clear from your posts what tool you are using.Visual Studio and Visual Studio Code are very different environments, the latter being open source (-ish, still Microsoft, after all...) and available on Windows, Linux and Mac.While most of PKTKS comments are just pointless anti-MS rambling, they gave some interesting suggestions.If you are using Visual StudioCode, there are also a number of LaTeX extensions, such asthis, which might prove helpful.I don't use LaTeX myself, but I routinely use VS Code to compile my embedded projects, and, e.g. from yang to puml (with preview) using a mix of extensions and compile tasks.

author: PKTKS
author_rank: Super Contributor
timestamp: January 02, 2021, 08:27:06 am
content: no ramblings...is pointless to insist in putting MSin picture where you can and shoulduse the right tools...MS is no longer an option..this is not rambling..just see that perspectivePaul

author: mansaxel
author_rank: Super Contributor
timestamp: January 02, 2021, 09:12:26 am
content: You need to work on style. Or your comments will be seen as ramble, even if you largely are right.I would never, ever, think of something so rubegoldbergish as to try using VS for LaTeX, but that's probably because I haven't had a Windows computer as my main working environment for 20 years now.I'd try the Aarhus University TeX package (auctex) for Emacs if I was the poster. And a Makefile if I wanted to get a bit fancy.No, it does not solve the problem as presented, but it is the fastest and leanest way of making LaTeX documents I've found. Worth considering.Edit: Do try to compile into DVI from the command line, to see if there's some build step or code construct that VS barfs on.

author: newbrain
author_rank: Super Contributor
timestamp: January 02, 2021, 03:38:05 pm
content: Quote from: mansaxel on January 02, 2021, 09:12:26 amVisual Studio? Neither would I (as much as I like it as an IDE).Visual Studio Code?Probably. It's a beast of a completely different species.And, as said, you do not need Windows - it's the only editor which managed to pry emacs from my old hands on Windows, Linux and FreeBSD.I sometimes prepare docs in asciidoc, plantuml and markdown, I have no problems with VSC.QuoteThis stuff is pointless, unsubstantiated, and quite certainly false (the overlap in market and target users is a niche of a niche), does not help the OP and IMHO disqualifies the otherwise interesting information.But, hey, to each their own.

author: PKTKS
author_rank: Super Contributor
timestamp: January 02, 2021, 04:33:36 pm
content: Quote from: mansaxel on January 02, 2021, 09:12:26 amperhaps...I am definitely at home in a garage service bench ...in any language...Imagine what will be the world withoutVisualStudio and Word...Paul

author: TheAmmoniacal
author_rank: Unknown
timestamp: January 02, 2021, 04:43:04 pm
content: My LaTeX workflow is MikTeX (https://miktex.org/) + TexMaker (https://www.xm1math.net/texmaker/).Why anyone would use Visual Studio is beyond me..

author: mathsquid
author_rank: Frequent Contributor
timestamp: January 02, 2021, 08:06:23 pm
content: Quote from: mansaxel on January 02, 2021, 09:12:26 amThat does seem like a crazy way to do things.

author: larsdenmark
author_rank: Regular Contributor
timestamp: January 06, 2021, 09:11:56 am
content: People do not seem to know that there's a difference between Visual Studio and Visual Studio Code.Visual Studio Code is free and multi platform and has an addins for LaTeX (and a lot of other programming languages)https://code.visualstudio.com/The reason for using VS Code for everything is that you can then do all your programming using one environment.

author: PKTKS
author_rank: Super Contributor
timestamp: January 06, 2021, 12:47:05 pm
content: Quote from: larsdenmark on January 06, 2021, 09:11:56 amBeen there since early days of MS...the 2 cents of jambo are required to be spoken...There is absolute nothing free or multi or portable related to MSThere is only one single directive of business in MS:- dead shorting every possible way out from their products.ditto. they crapped every sort of compiler competitor andlibrary competitor and framework competitor along the lastdecades..the utmost funny asshole jerk joke is:- the future of desktop *NIX is MS *NIX.assume that is not a joke - indeed it underlies the proper goalsBeen there along decades.. they cause me several prejudiceproblems and time waste with their crappy products..Dumped their garbage products in the potty...Quote from: larsdenmark on January 06, 2021, 09:11:56 amNever worked for me not even close as being a solution.Reason being is that such thing is not sustainable...Operating System vendors and hardware manuft. go to bedwithout telling us... and they deprecate things at will turningthat into a very expensive nightmare ..Along the timeline we are required to shift the environmentto adapt new trends and formats and that is not possibleif blocked by their products and formats..In short what works better:- use the proper tools native to your OS and open code available- format free.. royalty free because you will need to change themsome time in the near future..- never ever trust that crappy shit MS sells - they will stick your back asap- the formats in which your stuff is contained must be easily changeablethe latter issue is the most important one to me ..I've been required to change the whole paradigm several timesin the last decades... and MS never ever succeed a single one time..*NIX succeeded every single time I neededbecause we have options and it is not related toa single one **** greedy jerk vendor...Even when I changed from SCO to Slackware things went smoothNo rant no rambling.. 2 cents of jamboPaul

author: RoGeorge
author_rank: Super Contributor
timestamp: January 06, 2021, 01:23:55 pm
content: "Microsoft evil" is an unrelated topic. VS Code is free and open source and can be used for any non-Microsoft products, I doubt it does any kind of "sabotaging". There is nothing hidden in VS Code to stop or cripple other's products.About LaTeX, what exactly do you use? There are so many TeX/LaTeX tools out there. Are you sure you don't use some LaTeX tools that depend on a 3rd party online processing, and the 3rd party stopped working?

author: PKTKS
author_rank: Super Contributor
timestamp: January 06, 2021, 01:59:52 pm
content: Quote from: RoGeorge on January 06, 2021, 01:23:55 pmI don't think they are evil.. I have used their shit quite a lot.They are just a bunch of crap shitThey are just a bad bad bad bad really bad product vendors.In early 90s I had invested time and effort in compilers likethe excellent Borland and quite amazing fast WATCOM ...MS doomed them all in their vertical stack of "property".The code compiled (being ASM/C/C++/RTF/TeX/whatever) in those"VISUAL SHIT" thingos from them is unportable.. they crap therules and hide several critical tools to allow proper code dependencyin short they use a patented GUI strategic lockdown.Once you have your assets locked into the GUI you are crapped.On the other hand .. makefiles and proper native tools which candeal with system wide open proper methods (like PERL /SH basedautomake) or alternatives like cmake or others... can be easilyported to other systems..TeX is no exception.TeX is already with the proper tools to compile and check thecode base.. you just have to manage them.In the 90s... I have used quite a lot NEDIT in which the MACROand SHELL escape capabilities can do pretty much any thingin which EMACS can plus the MOTIF GUI (which EMACS lacks)My MOTIF GUI still works.. ( i drag my system as needed)TODAY I CHANGED MY TEX to LYX in which i can managefar better the import export simple features...But as some features probably are not in LyX .. TeXmakeris my first choice ...but as I have posted before...LATEXMK is still my first and preferable tool for that..GUIs just keep in the way...fancy shots attachedPaul