Latex build fail on invalid reference - latex

I would like Latex build to fail when I have an invalid reference (I'm using nameref). Right now I only get a warning:
Found missing reference warnings.
LaTeX Warning: Reference `foo' on page 120 undefined on in
How can I configure Latex to give me an error instead?

Related

LaTeX Error: Environment pandoccrossrefsubfigures undefined

I'm trying to render a Markdown document as PDF using pandoc. It includes subfigures and cross-references. When producing the PDF, I get this error message:
! LaTeX Error: Environment pandoccrossrefsubfigures undefined.
I'm using macOS Catalina 10.15.7, pandoc 2.14.1, and pandoc-crossref.
Is there any way to avoid this error?
The problem here is perfectly described in the error message: the environment pandoccrossrefsubfigures doesn't exist, and this prevents the creation of the PDF file.
To solve the problem, just create a new, known environment to replace the missing one:
\newenvironment{pandoccrossrefsubfigures}
{
\begin{figure}
}
{
\end{figure}
}
As a result, the environment named pandoccrossrefsubfigures will be replaced by one named figure that pandoc will recognize.
For more information about this problem, there is an issue on GitHub where pandoc-crossref's author explains the reasons behind this problem, and also provides multiple solutions.

Sphinx cross-reference in LaTeX

I have the following reference identified in file A:
.. _my-label:
and I reference it in file B :
this is a reference to file A :ref:`my-label`
This generates a cross-reference as expected when outputting HTML. However, when outputting LaTeX, it does not and I have the classical warning:
LaTeX Warning: Hyper reference `my-label:my-label' on page XX undefined on input line YY.
Is there a LaTeX trick like double compilation or something similar that I am not doing correctly?
I encountered the same issue. HTML compiled without errors for me, but LaTeX compilation did throw the hyperref errors you described. It seems to me that, for some obscure reason, Sphinx does not create the labels that hyperref tries to reference.
I came up with the following solution: since I do not know how to include the missing labels, I will just make it so that LaTeX does not look for them anymore. In detail, I am doing this by overwriting the \hyperref command.
I included the following code in my conf.py file:
latex_elements = {
'preamble': r'''
\renewcommand{\hyperref}[2][]{#2}
'''
}
This includes the \renewcommand{... in the preamble of the LaTeX document created by Sphinx. It will overwrite the \hyperref command so that it won't try to insert a link, but just print the link text.
Obviously, with this solution, the reference that caused the errors will not appear as hyperlinks in your PDF document, but at least it is compiling without errors.
Note
What I described worked perfectly fine for my use case, however, it is described in the Hyperref manual that the \hyperref command can be invoked in two different ways (\hyperref{URL}{category}{name}{text} and \hyperref[label]{text}). I am only overwriting the second one, as that seems to be the one that Sphinx is using for cross references. However, not accounting for the first one when overwriting the command might lead to issues in some cases.

type ip_address() undefined type ip_port() undefined

I am trying to build a piece of Erlang code on Ubuntu 14.04. I got the following error. It seems to be something wrong with the header file. I can not figure it out
type ip_address() undefined
type ip_port() undefined
The code you're looking at is quite old, and includes kernel/include/inet.hrl. This file used to define the ip_address() and ip_port() types, but those are now instead exported from the inet module.
Just replace ip_address() with inet:ip_address(), and ip_port() with inet:ip_port().
Though do note that there may have been other breaking changes in Erlang since that code was published.
Looks like your code uses non-standard types. You can find all standard (built-in) types in the official documentation.

Atom keybindings and the LaTeX package

I want to change the keybinding for building in LaTeX from the default ctrl-alt-b to cmd-b. Settings suggests I copy paste
'atom-text-editor[data-grammar~='latex']':
'cmd-b': 'latex:build'
into the keymap.cson file but upon saving it I get the error message
[stdin]:20:34: error: unexpected latex
'atom-text-editor[data-grammar~='latex']':
^^^^^
Since the whole expression is inside a pair of single quotes, you need to use different quotes around latex:
"atom-text-editor[data-grammar~='latex']":
or
'atom-text-editor[data-grammar~="latex"]':
Also note, that you will likely run into a conflict with existing keybindings. The keybinding-resolver package is a great helper to find conflicting keybindings.

Xcode: ignored symbols warnings while linking for finalizer

I have problems integrating finalizer to xcode project I get the warnings like this
Warning: Ignored symbols were detected in this build. In some cases ignored symbols could cause incorrect finalization. This may be caused by different static libraries containing the same symbol.
warning: no debug symbols in executable (-arch armv7)
Along with a long list like this
Ignored symbol '_int_update' defined at address 0xfb2cc -- it was already defined at 0xd2c94
Ignored symbol '_init' defined at address 0xfcbd8 -- it was already defined at 0xfcba4
Ignored symbol '_update' defined at address 0xfcbe4 -- it was already defined at 0xfcbb0
Ignored symbol '_final' defined at address 0xfcbf0 -- it was already defined at 0xfcbbc
Any help or suggestions would be appreciated.
If there are 2 or more symbols defined among all the relocatable object files having the same name, the linker will choose one of them and the other symbols are ignored.
If these symbols have different types, it may lead an incomprehensible bug at run-time.
There is an example in chapter 7 of Computer Systems_A Programmer-'s Perspective:

Resources