Compiling Error on LaTeX - pdflatex

I was trying to compile an article, so I could see the PDF version of it, but it appeared an error that says "Impossible to start the command. latex -interaction=nonstopmode %.tex". Does someone knows what this means? (This was supposed to be my first article in LaTeX. I'm using MilkTex and Tex Maker). Thank you.
(I've been looking for what it could be, and some say it is about path, but I don't understand what is that)
\documentclass[a4paper, 11pt]{article}
\usepackage[portuguese]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\author{-------}
\title{xxxxxx}
\date{\today}
\begin{document}
\maketitle
First adocument in LaTeX
\end{document}

Related

biblatex citation problem "Citation x on page y undefined on input line z"

Im having the "Citation x on page y undefined on input line z" problem but everyone online just keeps saying:
https://i.stack.imgur.com/5jc8b.png
Please explain in detail what this actually means and how to solve this issue.
I aim initialising biblatex in sublime and adding the bib resource with full file paths.
However the file paths have a space in them and I have yet to find out how to deal with this in sublime.
\usepackage[style=numeric, backend=bibtex]{biblatex}
\addbibresource{C:/Users/DrSalty//Google Drive//PhD/Reports/library.bib}
\addbibresource{C:/Users/DrSalty//Google Drive//PhD/Reports/ManualRefs.bib}
\begin{document}
\title{x}
\author{y}
\date{Day Month Year}
\maketitle
\pagenumbering{arabic}
\pagebreak
\section{Introduction}
Blah \cite{Todo2019}
\printbibliography
\end{document}
So I shouldn't actually have to even care about the compiling order as it IS automatic. I wish people would stop saying this as a response to the "Citation x on page y undefined on input line z" issue.
The real solution was that sublime cant deal with spaces in file paths automatically and neither can bibtex/biblatex (as I expected), but the '//' method I'm used to using for dealing with this in the cmd for things like python doesn't work.
Instead for some god awful reason! it supports LEGACY DOS PATHS!?
The link to the solution and explanation of this god awful thing:
https://www.edwinwenink.xyz/posts/32-bibtex_dynamic_path_w_spaces/

How to open an uml2 .tex?

I apologize if this this is an extremely amateur question. But before yesterday I had never even heard to tex, latex, mactex, all this stuff.
Basically I have cloned a git repo in which the UML documents appear to be in a .tex file. Following google, this has led me to install MacTex, try to open these files. Click 'typeset' which I presume is how it produces the document, but it gives an error about 'uml2' being invalid syntax.
What program, or what anything, am I supposed to use to open a .tex file which has stuff like this in it:
\tikzstyle{uml2} = [
fill=rupBody,
draw=rupBorder,
font={\ttfamily},
]
Is this even something your supposed to open in a program and view visually? I suppose this file named uml.tex will show a UML diagram once opened. Or do I have completely the wrong idea? Sorry if this is extremely amateur, like I said I've never heard of this since before yesterday, and google isn't turning up lots of information on this. Any direction would be much appreciated.
You need to install pgf from http://ctan.org/pkg/pgf The easiest is to use TexLive. Once you got all packages installed you can typeset the TeX file. I'm using TexShop which is a nice app for the Mac.
Since you indicate you never heard of TeX before: TeX is a program written by Donald Knuth many, many years ago when computers were engined with steam. But it's the best you can find for typesetting. It's mature, crude and more than 99,99% error free. Donald Knuth has a bounty for each error you find in the code and he did not have to pay since many years. What you do is to create those TeX files (there are different macro packages were LaTeX is the most famous) and send them to the TeX processor. That will create the output (now its PDF and formerly it was some DIV (device independent viewer IIRC)).
Edit I downloaded tikz-uml from here: http://perso.ensta-paristech.fr/~kielbasi/tikzuml/index.php and moved the tikz-uml.sty to folder where the main .tex source is placed. After including
\usepackage{tikz-uml}
in the header I was able to compile the source.
Note: there is a global location for .sty files but that depends in the app you use. Use Google to find this place. But putting .sty near your .tex is fine anyway. A \usepackage directive first looks in the source folder before looking into the global ones.

Error on using Vim-latex ("can't find file ~")

I'm not sure if this question is appropriate here but I have nowhere else to ask. I recently started to typeset some 'mathsy' stuff using Latex and it became a hobby for me. I've been using TeXnicCenter for this, but feeling that I've got familiar with Latex language, I decieded to improve 'efficiency' of typesetting by changing the editor.
So I decided to use Vim (latest version, 7.4) with Suite-Latex. I've just installed Vim and Suite-Latex, following exactly what was instructed here. I made every necessary changes mentioned here, and it seemed to me that installation was successful (I got what was expected on Step 4)
Then I started to work through this tutorial and everything went fine until this section.
When I press F9 for autoreference, I see that Vim is working on something for split seconds and red error message refering to "can't find [some file name]" in my user/appdata/local/temp directory. The "file name" changes every time I do this (so its kind of temporary file as its directory suggests?). And then it produces a new window with title __ OUTLINE __ where 2 empty lines are showing up.
If I press n (in the new window described above) error message saying "E486: Pattern not found: rf" pops up and pressing j results in going down one row. If I press enter key, message ":call Tex_FinishOutlineCompletion()" pops up.
More frustratingly, if I try to compile a file by entering command \ll, a new window pops up where there are two lines saying:
1.ll I can't find file `newfile.tex'. newfile.tex
2.ll Emergency stop
and below these is a message saying
[Quickfix list]: latex -interaction=nonstopmode -file-line-error-style newfile.tex
So I thought it maybe is something to do with VIM not being able to find files in my computer (so something wrong with grep?), and I tried to resolve it by downloading a software called "cygwin" on which developers said their tests were successful, but it changed nothing.
But I think the two problems are related.
As it is, I am completely newbie in this type of editing environment (or any kind of programming) but I really would like to learn some Vim seeing how efficient it is in typesetting etc. Sorry for not being a pro at typing codes here. Thanks for reading!
I believe you need a latex compiler---I've had this issue and well, one thing that's left out of the conversation a lot is the compiler (pdflatex, latexmk, etc). As of now, you should download a compiler since vim-latex (latex-suite) doesn't actually come with a compiler (that I know of) and it's just a plug in with some cool stuff in it, but not what you need to make a file.pdf out of your file.tex.
It happened to me before. I found out that this problem may happen when you have special characters (such as white space and other symbols) in your file name or folder path. Try again with file name and path only in English letters.

emacs haskell-mode repl can't find hugs. how to use ghci instead?

To set up my haskell-in-emacs environment, I dutifully followed the instructions here:
http://tim.dysinger.net/posts/2014-02-18-haskell-with-emacs.html
When I load Main.hs, it syntax-highlights correctly. When I do Ctrl-c Ctrl-l as instructed, it reports:
Searching for program: No such file or directory, hugs.
I'm pretty sure the problem is that it should be using ghci, but I'm new to these packages.
The contact page of the person that wrote the above page says that he does not want to be contacted. So here we are. Any help appreciated.
I'm on OS X 10.9.2 (Mavericks). I already had emacs installed. Otherwise I followed the instructions.
I'm grepping all the places that seem relevant but I can't find a direct mention of a hugs executable anywhere.
Does anyone know where this error message is coming from, and what I can do to get this working?

LaTeX: How to find package(s) that a command belongs to?

It is a simple question to which I am not able to find the answer:
Given a LaTeX command, how do I find out what package(s) it belongs to or comes from?
For example, given the \qquad horizontal spacing command, what package does it come from? Especially troublesome since it works without including any package!
Given a LaTeX command, how do I find out what package(s) it belongs to or comes from?
Consult your references:
If it's in the index to the TeXbook, it's inherited from TeX, the engine that drives LaTeX.
Otherwise, if it's in the index to the LaTeX manual, it's probably defined in latex.ltx or in one of the standard class files, not in a package.
Otherwise, if it's in the index to The LaTeX Companion, the page number probably tells you what package it's from.
Otherwise, you could do some fancy grepping on the results of find /usr/share/texmf -name '*.sty', but be prepared for a painful exercise.
Or, you could ask on http://stackoverflow.com. But then some idiot will respond by asking why you want to know...
You can search http://www.ctan.org/tex-archive/info/symbols/comprehensive/ for that information and more.
Remember that LaTeX is a macro language on top of TeX, and all the macros are made up of TeX which doesn't need to be imported. \qquad is in that category.
As far as I know, there is no really good general answer to this. But there are a number of techniques you might try for any given command. In the case of \qquad, it's part of basic TeX. Remember that you can always use TeX in interactive mode:
$ tex '\show\qquad'
This is TeX, Version 3.141592 (Web2C 7.5.6)
> \qquad=macro:
->\hskip 2em\relax .
\show\qquad
? x
No pages of output.
Some macros are added by LaTeX on top of TeX, such as \begin:
$ tex '\show\begin'
This is TeX, Version 3.141592 (Web2C 7.5.6)
> \begin=undefined.
\show\begin
? x
No pages of output.
whereas
$ latex '\show\begin'
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
%&-line parsing enabled.
entering extended mode
LaTeX2e
Babel and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, greek, monogreek, ancientgreek, ibycus, pinyin, loaded.
> \begin=macro:
#1->\#ifundefined {#1}{\def \reserved#a {\#latex#error {Environment #1 undefine
d}\#eha }}{\def \reserved#a {\def \#currenvir {#1}\edef \#currenvline {\on#line
}\csname #1\endcsname }}\#ignorefalse \begingroup \#endpefalse \reserved#a .
\show\begin
? x
No pages of output.
Everything else comes from packages. If you really wanna know which package a macro comes from (other than by google or grepping your texmf tree), you can check after each package you load whether it's defined. Try defining this before any \usepackage commands:
\let\oldusepackage\usepackage
\renewcommand\usepackage[1]{
\oldusepackage{#1}
\ifcsname includegraphics\endcsname
\message{^^Jincludegraphics is defined in #1^^J}
\let\usepackage\oldusepackage
\fi}
Then when you run latex on your .tex file, look for a line in the output that says includegraphics is defined in graphicx. It's not likely, but some devious packages might do bad things with \usepackage so there's a chance this might not work. Another alternative would be to simply define the command you're interested in before loading any packages:
\newcommand\includegraphics{}
Then you might get an error message when the package that defines the command is loading. This is actually less reliable than the former approach, since many packages use \def and \let to define their macros rather than \newcommand, bypassing the "already-defined" check. You could also just insert a check by hand in between each load: \ifcsname includegraphics\endcsname\message{^^Jdefined after graphicx^^J}\fi
Due to lack of reputation I cannot comment on Steve's answer, which was very helpful to me, but I would like to extend it a bit.
First, in his second approach (fiddling with usepackage) the case where usepackage has optional arguments is not dealt with. Secondly, packages are often loaded by other packages via RequirePackage which makes it hard to find the actual place of definition of a command. So my refinement of Steve's answer is:
\usepackage{xargs}
\let\oldusepackage\usepackage
\let\oldRequirePackage\RequirePackage
\renewcommandx{\usepackage}[3][1,3]{
\oldusepackage[#1]{#2}[#3]
\ifcsname includegraphics\endcsname
\message{^^Jincludegraphics is defined in #2^^J}
\let\usepackage\oldusepackage
\let\RequirePackage\oldRequirePackage
\fi}
\renewcommandx{\RequirePackage}[3][1,3]{
\oldRequirePackage[#1]{#2}[#3]
\ifcsname includegraphics\endcsname
\message{^^Jincludegraphics is defined in #2^^J}
\let\usepackage\oldusepackage
\let\RequirePackage\oldRequirePackage
\fi}
The xargs package is used here to get the unusual options of usepackage right (first and third parameter are optional).
Putting this directly after documentclass should tell where includegraphics is defined.

Resources