All Questions
Tagged with macros cross-referencing
138
questions
3
votes
2
answers
137
views
Expand key-values with \def of \newcommand?
I have multiple repeated
\begin{enumerate}[label=A\alph*), ref=A\alph*]
and I want to reduce code duplication. I would also like to avoid creating new environments if possible. I just want a simple ...
0
votes
1
answer
89
views
How to give a name (not just label) to an equation
I have the following code:
\documentclass{article}
\usepackage[top = 2cm, bottom = 1cm, left = 1.5cm, right = 1.5cm, includefoot]{geometry}
\usepackage[italic = true]{derivative}
\usepackage{physics}...
0
votes
0
answers
29
views
Custom object that increments when inserted and can be referenced with labels
I would like to create abbreviation such as CE1, CE2, etc. that as I introduce them through the document they automatically increase the counter. I would also be able to later reference them in the ...
0
votes
1
answer
52
views
Cross Referencing and floating Point calculation inside of a tabbing environment
Based on this Q / A
I have the problem that my cross references and the corresponding calculations don't seem to work properly within a \tabbing environment. The calculation itself seems to work, but ...
0
votes
2
answers
115
views
Summarize all costs and show the result in different places of the document
Let's say there is a large document in which the costs for different expenses are listed in different places. At every point where these costs are listed, I would like to have not only the costs ...
2
votes
1
answer
45
views
How do I refer a table with custom numbering?
I have the following code that generates a table:
\documentclass[a4paper]{article}
\usepackage{booktabs}
\newcommand{\name}[4]{
\begin{table}[!htbp]
\centering
\begin{tabular}{p{\...
4
votes
2
answers
238
views
\newcommand with arbitrary number of arguments
I have a few convenience commands defined in my TeX document:
\newcommand{\figref}[2][\ref]{Fig.~#1{#2}} % Figure
\newcommand{\tabref}[2][\ref]{Table~#1{#2}} % Table
\newcommand{\equref}[2][\eqref]{...
4
votes
1
answer
129
views
Macro in `\section` names expand in context of `\nameref`
If I have a \section where its name includes a macro, if I try to reference that section via \nameref the included macro seems to be expanded at the point of the \nameref rather than the point of the \...
0
votes
1
answer
90
views
How to use a macro to create a label for figures? [duplicate]
There's another question that provides the answer I think should work (Automated label tagging in figure? Automated labeling?), but even when I directly copy and paste that code, the \ref function ...
2
votes
2
answers
261
views
Double colon in prettyref label
The prettyref package works by inspecting labels of the form \label{format:name} and creating a reference based on just the format:. The documentation says:
Do not use the character : anywhere
within ...
2
votes
1
answer
100
views
Create blocks of content to reference multiple times throughout a document
I have to create a series of exercises, all with the same items:
Title
Image
Questions
Solutions
etc..
I would like to create a separate file for each exercise and then from my main document be ...
0
votes
2
answers
296
views
Can I merge \ref and \nameref into one command?
Note: There is a question here with an almost identical title, but the person there is asking for a completely different thing.
I am currently writing a document that regularly refers to the name of a ...
1
vote
1
answer
452
views
Environments with tcolorbox, referencing
I have a large textbook written and I wish to add color boxes around my theorems, lemmas, etc without changing my main text too much. Currently, each theorem environment is defined in the usual way, e....
0
votes
1
answer
57
views
I need automatic cross - referencing of question number with answer. so that if I click the question number it will lead to answer
\documentclass[12pt,a4paper]{exam}
\usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont}
\usepackage{ifthen}
\usepackage[margin = 0.8in]{geometry}
\usepackage{gensymb}
\newcommand{\ttt}{\textbf{- T}}
\...
0
votes
0
answers
30
views
Custom Cross-Referencing of Figure does not work in HTML output
I'm currently creating the final version of a paper published at ACM. In my main latex file I declared the following command:
\newcommand*{\myref}[2][]{%
\hyperref[{#2}]{%
\ref*{#2}#1}%
}
I use ...