## Another mirror for LaTeX Hypertext Help

January 1, 2014 Posted by stefan

Sometimes when I’m posting advice and code in LaTeX forums I’m linking used commands to a LaTeX reference site. Then there’s no need to explain a command and its syntax further because the reader could just click on it to get all basic information. In German forums I’m using the reference of Weinelt, keeping in mind that it’s still LaTeX 2.09, in international forums I’m using the classical LaTeX hypertext help derived from the basic LaTeX help and improved by Dr. Sheldon Green.

Because it’s allowed to copy those documents and to install it on other web servers there are several mirrors worldwide sharing the load. Perhaps not every server is reliable, further the structure of servers of reliable institutions may change and links could become dead. Just one example: once the location of the GISS reference has been changed, now there’s a lot of dead links to it and also dead deep links to command pages, just search for the obsolete location, there are even wikibooks and tex faqs using the dead link. Further there’s no redirection to the moved site, just an error 404 will appear when you visit http://www.giss.nasa.gov/latex/.

That’s why I’ve decided to host just another mirror. For now it’s still a mirror, at the moment I don’t know if it’s reasonable to make improvements by myself, but I will see.

You are invited to use that reference too for linking commands in forums/ discussion boards, the LaTeX Hypertext Help is linked above and in the navigation bar on the left side.

## beamer: How to get rid of hyperref warnings and further

January 1, 2014 Posted by stefan

Many users of the beamer class are irritated by several beamer warnings at every compiler run that are not caused by themselves, I’m referring to the beamer version 3.07. Those warnings are not really important, but it’s a good habit to debug all warnings instead of just ignoring them, otherwise an important warning could easily be overlooked.

When I compile this really small example:

\documentclass{beamer}
\begin{document}
\begin{frame}
Test
\end{frame}
\end{document}


I’m getting 6 warnings, after the second compilation of course less, but these 4 warnings remain:

1. Package pgf Warning: This package is obsolete and no longer needed on input line 13.
2. Package hyperref Warning: Option pdfpagelabels’ is turned off
(hyperref) because \thepage is undefined.
Hyperref stopped early
3. LaTeX Font Warning: Font shape OT1/cmss/m/n’ in size <4> not available
(Font) size <5> substituted on input line 6.
4. LaTeX Font Warning: Size substitutions with differences
(Font) up to 1.0pt have occurred.

Let’s eliminate those warnings:

1. beamer.cls is loading the obsolete package pgfbaseimage.sty that does nothing but loads pgfcore and prints out this warning. If you put a file with the same name pgfbaseimage.sty somewhere into your texmf directory (TEXMFHOME for example) or into the directory of your tex document containing just the line \RequirePackage{pgfcore} the warning will disappear.
2. Set pdfpagelabels to false by yourself, by providing a beamer class option: hyperref={pdfpagelabels=false}
3. beamerbasefont.sty defines the commands \Tiny and \TINY to choose very small font sizes. Redefine at least \Tiny or load a font providing that size, for instance Latin Modern.
4. fixed by 3.

The new file:

\documentclass[hyperref={pdfpagelabels=false}]{beamer}
\let\Tiny=\tiny
\begin{document}
\begin{frame}
Test
\end{frame}
\end{document}


will not cause warnings any more. Using those workarounds you won’t be annoyed by unnecessary warnings during development of presentations. Though the redefinition of \Tiny will fix it for Computer Modern fonts I recommend to consider to use Latin Modern instead:

\usepackage{lmodern}


## blowup: package for scaling pages – for pdf with hyperref

December 31, 2013 Posted by stefan

CTAN Announcements informed that the package blowup has been released. It can be used to upscale or downscale all pages of a document. For a first test I created this short a5paper document:

\documentclass[pdftex,a5paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{hyperref}
\begin{document}
\tableofcontents

\section{One}
\blindtext[3]

\section{Two}
\blindtext[4]

\end{document}


It’s pdf output can be opened here. The pdfinfo tool printed:
Page size: 419.528 x 595.276 pts

Now I used the \blowUp macro to upscale the document pages to fit a4 paper size:

\documentclass[a5paper,10pt]{article}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{hyperref}
\usepackage{blowup}
\blowUp{paper=a4}
\begin{document}
\tableofcontents

\section{One}
\blindtext[3]

\section{Two}
\blindtext[4]

\end{document}


The new pdf output can be opened here. pdfinfo output:
Page size: 595.276 x 841.89 pts (A4)

Of couse you could inspect the paper sizes by using the Adobe Reader.

The blowup package includes several source code examples. During the test I’ve noticed one small mistake in the documentation, the user-level macro \blowUp is described as \blowup, that will cause an error. But I’m sure this will be corrected soon, at least I will report it to the package author.

## TeX Live 2012 released

December 30, 2013 Posted by stefan

TeX Live 2012 has been released. TeX Live is a comprehensive TeX and LaTeX system for Windows, Mac OS X, Linux and other Unix systems. A special version called MacTeX 2012 is available for Mac OS X.

Changes compared to TeX Live 2011:

• tlmgr supports updates from multiple network repositories.
• The parameter XeTeXdashbreakstate is set to 1 by default. This allows line breaks after em-dashes and en-dashes, which has always been the behavior of other engines and formats such as plain TeX, LaTeX, and LuaTeX. Explicitly set XeTeXdashbreakstate to 0 for perfect line-break compatibility for existing XeTeX documents.
• The output files generated by pdftex and dvips, among others, can now exceed 2gb.
• The 35 standard PostScript fonts are included in the output of dvips by default.
• In the restricted write18 execution mode, set by default, mpost is now an allowed program.
• A texmf.cnf file is also found in ../texmf-local, e.g., /usr/local/texlive/texmf-local/web2c/texmf.cnf, if it exists.
• The updmap script reads a per-tree updmap.cfg instead of one global config.
• Platforms: armel-linux and mipsel-linux added; sparc-linux and i386-netbsd are no longer in the main distribution, but are available for installation as custom binaries, along with a variety of other platforms.

## Use hyperref without any link coloring, and with dotted TOC lines

December 30, 2013 Posted by synaptik

Currently, my document is of the following form:

\documentclass[11pt,a4paper]{article}

\usepackage{hyperref}

\begin{document}

\tableofcontents

\section{Introduction to Problem}

There is the relation
$$R = k^2, \label{eq:myequation}$$
which we have previously discussed.

\section{Potential Solution}

Using the relation in Equation~(\ref{eq:myequation}), we can ...

\end{document}


Given the way the above document looks when compiled with pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian), I wish to make only 2 changes:

1. No colored boxes surrounding any of the TOC, figure, equation, etc., links
2. Dotted lines connected the TOC entries to their corresponding page numbers on the right side of the page

How can I make these changes?

## How to enable smart references when using xr-hyper package for producing multi-volume book?

December 28, 2013 Posted by Igor Kotelnikov

I'm using xr-hyper package by @David Carlisle and smartref package by Giuseppe Bilotta to compile a multi-volume book. xr-hyper enables cross-references between different volumes as shows the following code chunk:

\newcommand{Volume}{1}% put this is PlasmaBook1.tex

% This is the code shared by all volumes
\usepackage{xr-hyper}
\usepackage{hyperref}

\ifnum\Volume=1
\externaldocument{PlasmaBook2}
\externaldocument{PlasmaBook3}
\else\ifnum\Volume=2
\externaldocument{PlasmaBook1}
\externaldocument{PlasmaBook3}
\else\ifnum\Volume=3
\externaldocument{PlasmaBook1}
\externaldocument{PlasmaBook2}
\fi\fi\fi


And the package smartref is used to hide a portion of equation number as explained in How do I discard a portion of an equation number when cross-referencing?

\usepackage{smartref}
\newcommand*{\srefaux}[1]{%
\ischapterchanged{#1}% checks if section number has changed
\ifchapterchanged% if current chapter is different
\chapterref{#1}.% put the section reference
\fi% else do nothing
\ref*{#1}%  <- we changed this to ref*
}

\makeatletter
\renewcommand \theequation {\@arabic\c@equation}
\renewcommand \thefigure   {\@arabic\c@figure}
\renewcommand \thetable    {\@arabic\c@table}
\makeatother

\newcommand*\sref[1]{\hyperref[#1]{\srefaux{#1}}}
\newcommand*\seqref[1]{(\hyperref[#1]{\srefaux{#1}})}


Unfortunately, smartref mechanism is working only within a single volume. I think this is because xr-hyper package reads in only \newlabel strings from aux files and ignores \newsmartlabel tags written by smartref as shows the following example borrowed from an actual aux file:

\newlabel{ch01}{{1}{6}{Общие сведения о плазме}{chapter.4}{}}
\newsmartlabel{ch01}{{1}{1}}


So my question is

how to instruct xr-hyper to read both \newlabel and \newsmartlabel tags?

Perhaps, appropriate code could be included into new version of xr-hyper package.

## Multiple footmark messes with hyperref. Hyperlinks pointing to wrong footnotes or dead

December 23, 2013 Posted by Nikos Papandreou

When setting multiple footmarks inside an environment that doesn't allow any (equation), the ids correspond to the correct footnotetexts but not the hyperlinks.

\documentclass{article}

\usepackage{amsmath}
\usepackage{hyperref}

\begin{document}

Text\footnote{text1} Text\footnote{text2}

$$\refstepcounter{equation} J=b a^3 \tag{\theequation\footnotemark{}\footnotemark{}}$$

\stepcounter{footnote}\footnotetext{a}
\stepcounter{footnote}\footnotetext{b}

\newpage\null\thispagestyle{empty}\newpage

\end{document}


## Add dot to the end of section numbering in PDF bookmarks

December 22, 2013 Posted by szantaii

I have dots at the end of section, subsection, etc. titles using the secdot package. And I'd like to insert a dot at the end of each section number in the PDF bookmarks too (I'm using hyperref).

Here is a screenshot what I'd like to achieve (see section 5 in the bookmarks on the left ), and a minimal working example (included packages and parts of the preamble which may cause problems, clashes):

\documentclass[12pt]{article}

\usepackage[a4paper, hscale=0.85, vscale=0.85]{geometry}
\usepackage[T1]{fontenc}
\usepackage{url}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[dotinlabels]{titletoc}
\usepackage{secdot}

\hypersetup{bookmarks=true,%
bookmarksnumbered=true,%
pdfencoding=unicode,%
pdfborder={0 0 0},%
citecolor=blue,%
urlcolor=blue,%
filecolor=blue}

\sectiondot{section}
\sectiondot{subsection}
\sectiondot{subsubsection}
\sectiondot{paragraph}
\sectiondot{subparagraph}

% changing the style of \paragraph and \subparagraph titles, so
% text after \paragraph and \subparagraph are broken into new lines
\makeatletter
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{0mm}%
{-\baselineskip}%
{.3\baselineskip}%
{\normalfont\normalsize\bfseries}}
\renewcommand\subparagraph{%
\@startsection{subparagraph}{5}{0mm}%
{-\baselineskip}%
{.3\baselineskip}%
{\normalfont\normalsize\bfseries}}
\makeatother

\setcounter{secnumdepth}{5}

\begin{document}

\section{section}

section

\subsection{subsection}

subsection

\subsubsection{subsubsection}

subsubsection

\paragraph{paragraph}

paragraph

\subparagraph{subparagraph}

subparagraph

\end{document}


I've started to look into hyperref's code, but I couldn't find the part that I have to modify/patch/renew.

## Problem with list of figures [duplicate]

December 22, 2013 Posted by Mohammad Fajar

Paragraph ended before \Hy@setref@link was complete
when I insert table of contents in book class documents and the error dissapear when I place a comment in \usepackage{hyperref}?