# Tag Info

10

showkeys defines \SK@def to hook itself on to other commands, I think you want \makeatletter \SK@def\Cref#1{\SK@\SK@@ref{#1}\SK@Cref{#1}}% \makeatother in the preamble after loading both packages.

7

In order to split a long label without spaces, you can use the \seqsplit command from the seqsplit package. The following is an adaption of David's answer and also shows the necessity of wrapping long labels: \documentclass{article} \usepackage[%showframe, % show helper lines paperwidth=10cm, paperheight=7cm, hmargin=24mm,vmargin=4mm,...

7

Having labels like this is really a misuse of the label system, labels are intended to be short symbolic names, but anyway \documentclass{article} \usepackage{showkeys} \renewcommand*\showkeyslabelformat[1]{% \fbox{\parbox[t]{\marginparwidth}{\raggedright\normalfont\small\ttfamily#1}}} \begin{document} \begin{figure}[ht] \centering \rule{1cm}{1cm} \...

6

showkeys relies on the fact that \underbar can be used also in text, which is not true any more for \underbar as redefined by unicode-math. Workaround: save the original meaning of \underbar and make showkeys use it instead of the redefined \underbar. \documentclass{article} \usepackage{showkeys,etoolbox} \makeatletter \let\latex@underbar\underbar \...

6

There has been a change in showkeys from version 3.15 (in TeX Live 2013) and version 3.17 (the current one on TeX Live 2014). In the older version showkeys hooked to the \cite command, while now it hooks to \@citex, for fixing some issues: here's the annotation in the source file % \changes{v3.17}{2014/04/24} % {rededine \cs{@citex} rather than \...

5

Using the url package with as many breaking options turned on as possible and making a fixed width box placed appropriately can help. \documentclass[10pt]{article} \usepackage[verbose]{geometry} \geometry{letterpaper} \geometry{margin=1.5cm,marginparwidth=1.1cm,marginparsep=0.1cm} \usepackage{showkeys} \usepackage{todonotes} \usepackage[obeyspaces,...

5

showkeys makes things safe with \meaning so that labels with & or \$ or other special character do not blow up when typeset. so you are comparing catcode 12 ("other") eq with catcode 11 (letter) eq and these are not equal.

5

Putting the label at the start of a paragraph is always slightly tricky (latex has to work quite hard to make that not change the spacing normally, and that interacts with showkeys somewhat badly.....) Putting the \label more or less anywhere else is better (perhaps showkeys could catch this case and do better, but not today) \documentclass{article} \...

5

showkeys uses the following command to typeset the label \providecommand*\showkeyslabelformat[1]{% \fbox{\normalfont\small\ttfamily#1}} so you can redefine that in any way you want, \documentclass{article} \usepackage{showkeys} \renewcommand*\showkeyslabelformat[1]{% \fbox{\parbox[t]{2cm}{\raggedright\normalfont\small\ttfamily\hyphenchar\font=`\:#1}}}...

5

Regular expressions in expl3 are category code agnostic. \documentclass{article} \usepackage{amsmath} \usepackage{amsthm} \usepackage{showkeys} \newtheorem{lemma}{Lemma} \ExplSyntaxOn \NewDocumentCommand{\beginwithTF}{mmmm} {% #1 = string to search in, #2 = string to search, #3 = true, #4 = false \regex_match:nnTF { \A #2\: } { #1 } { #3 } { #4 } } \...

4

Here's a solution with \marginnote: \documentclass[10pt]{article} \usepackage{showkeys} \usepackage{todonotes} \usepackage{marginnote} \let\oldig\includegraphics \renewcommand{\includegraphics}[2][]{\oldig[#1]{#2}\marginnote{\fbox{#2}}} \begin{document} \begin{figure}[t] \centering % \captionsetup{justification=centering} %\...

3

I illustrate the situation by a modified code: \documentclass[twocolumn]{article} % twocolumn for smaller snapshot \usepackage{amsmath} \usepackage[notref, notcite]{showkeys} \begin{document} A numbered equation $$\label{eqA} b = 1$$ Cite using \verb+\ref+ $$\label{eqB} \ref{eqA}$$ Cite using \verb+\...

3

The package author, Norman Gray, provided a solution: \makeatletter \showlabels{blx@bibitem} \makeatother

3

Just change the order of the calls (hyperrefshould be the last package to be called!) MWE: \documentclass[10pt,a4paper]{report} \usepackage{fontspec} \usepackage{showkeys} % <======================================== \usepackage{twoopt} % <======================================== \usepackage{hyperref} %\usepackage{twoopt} % <=====================...

3

The hyperref manual states in Section 8: Packages that typeset the contents of the \label and \ref macros, such as showkeys. Since the hyperref package redefines these commands, you must set implicit=false for these packages to work. Your example appears to work for me if the document starts as follows: \documentclass{article} \usepackage{showkeys} \...

3

You can try the package showlabels that solved similar issue for me. It has a number of options to display labels at various sides of the page or in the text.

2

You don't state what result you hope to achieve but here are a two options based on the showlabels package instead of showkeys. If you want the internal label used by exam class, use tthe inline option. This does not require any additional information to appear after your questions, as shown below. \documentclass[a4paper,11pt,spanish,answers]{exam} \...

2

You need to do a little more to shove entries over to the right of your document. Another patch pushes it over by \textwidth+\marginparsep: \documentclass{article} \usepackage{showkeys,etoolbox,showframe} \newcommand{\fullrlap}[1]{% \rlap{\kern\dimexpr-\@totalleftmargin+\textwidth+\marginparsep\relax#1}} \begin{document} \begin{thebibliography}{x} \...

2

\eqref is not robust, thus in some cases it needs protection, that is \protect\eqref

2

I've come across similar package showlabels that solved the issue. It has a number of options to show specified labels on the left or right margins of the page as well as in an inline mode.

2

Because i don't directly see \bibitem in the source when I'm using bibtex, I had not realized that the same sort of \showlabels command that is documented to work with cite will also handle \bibitem(once bibtex is used to create the .bbl file). Added: However, the labels on items within the actual References list no longer appear if one uses an external ....

2

Packages like showkeys work at a quite deep level and make some assumptions about how certain things such as theorem labels are produced. In this case, your abuse of headpunct for inserting a \vspace confuses showkeys. It turns out that the competitor in the field works for this special case: \usepackage{showlabels} This package is even more customizable ...

2

As mentioned in the documentation, you can redefine the printing command. This will affect \label. \ref (and \nameref}) uses another command and there seem not to be an official interface. But redefining an internal command seems to work. \documentclass{book} \usepackage{showkeys} \usepackage{nameref} \begin{document} \chapter{ch1}\label{ch:first} \section{...

2

Ooooh, I was just about to answer and say this was hard (because catcodes), when David replied with a solution using \hyphenchar. Cunning! So I'll simply chip in by remarking that the exact same command works in showlabels, with only a change of name. \renewcommand*\showlabelsetlabel[1]{% \fbox{\parbox[t]{2cm}{% \raggedright\normalfont\small\ttfamily ...

1

The problem is the presence of the package showkeys. A MWE for the solution: \documentclass[10pt,twoside]{book} \usepackage{showkeys} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsthm} \theoremstyle{definition} \newtheorem{theorem}{Theorem}[chapter] \newtheorem{example}{Example} \begin{document} \chapter{Some} \section{Introduction} \...

1

The final option for the showkeys package calls \endinput in the style file before it has read anything into it. Here is the top of showkeys.sty, with the line (*) in question marked: \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{showkeys} [1997/06/12 v3.12 Show cite and label keys (DPC)] \DeclareOption{notref}{\let\SK@ref\@empty} \DeclareOption{...

1

Until I find a way to make a short patch, here is something that seems to work \makeatletter \AtBeginDocument{ \@ifpackageloaded{hyperref}{% \@ifpackageloaded{showkeys}{% \renewcommand*{\sf@@memsub@label}[1]{% \@bsphack \SK@\SK@@label{#1}% <-- added \protected@write\@auxout{}{% \string\newlabel{#1}% ...

1

Here's one possibility: \documentclass[10pt]{article} \usepackage{graphicx} \begin{document} \let\origincludegraphics\includegraphics \def\includegraphics[#1]#2{% % \marginpar and \vadjust would be nice here, % but we're in the wrong mode for either \vbox to 0pt{\hbox to \linewidth{\hfil\hbox to 0pt{file: #2\hss}}\vss}\par \origincludegraphics[#1]...

1

this perhaps \documentclass{article} \usepackage{amsmath} \usepackage{hyperref} \usepackage[notref]{showkeys} \renewcommand*\showkeyslabelformat[1]{% \fbox{\parbox[t]{\marginparwidth}{\raggedright\path{#1}}}} \begin{document} These are the constraint equations \begin{align*} \dot{x} &= \frac{R}{2}(\dot{\varphi_1}+\dot{\varphi_2})\sin\theta \\ \...

Only top voted, non community-wiki answers of a minimum length are eligible