Reputation
966
Top tag
Next privilege 1,000 Rep.
See votes, expandable usercard
Badges
6 18
Newest
 Yearling
Impact
~15k people reached

17h
awarded  Yearling
May
20
accepted How to \show the code of the command \autoref?
May
20
revised How to \show the code of the command \autoref?
Is a duplicate.
May
20
comment How to \show the code of the command \autoref?
Neat trick. Using \expandafter\show\csname autoref \endcsname works too.
May
20
asked How to \show the code of the command \autoref?
May
19
comment \phantomsection inside tabular: alignment problems
I have found a solution to my problem, which could be rephrased as putting a hyperref anchor inside a table, and have that anchor be above the line, instead of on the baseline (otherwise clicking on links to that anchor bring the PDF reader at the wrong point, see screenshots). Thanks for helping, anyway!
May
19
comment \phantomsection inside tabular: alignment problems
This is just a MWE showing the problem I have. What I am doing is using a \customlabel{the-label}{the-name} macro I wrote to be able to use \ref{the-label} and have it show the-name, for referencing small parts of a figure or table (on line $a$, we see that… on line $b$, blah blah), but with the safety net that if I rename/renumber/reorder my labels in the table or figure, they will automatically be changed in the paragraphs containing references to them.
May
19
accepted \phantomsection inside tabular: alignment problems
May
19
comment \phantomsection inside tabular: alignment problems
I had just found a solution using \raisebox here, but it aims one line too high when used in a paragraph. Using \leavevmode\vadjust pre{\phantomsection} works well, both inside table, inside paragraph, and at the beginning of a paragraph (thanks to \leavevmode).
May
19
comment \phantomsection inside tabular: alignment problems
I used \phantomsection just as a shorthand to avoid using a dummy counter and have a shorter MWE. Your code exhibits the exact same problem as mine, when compiled using pdflatex, namely the \ref{line:x} points to the baseline of Line $x$, not to the top of the line.
May
19
revised \phantomsection inside tabular: alignment problems
Greatly simplified MWE, as the problem is there with \phantomsection too.
May
19
asked \phantomsection inside tabular: alignment problems
Mar
9
awarded  Notable Question
Jan
23
awarded  Popular Question
Dec
10
awarded  Excavator
Oct
17
awarded  Popular Question
Oct
13
awarded  Nice Question
Oct
3
awarded  Popular Question
Jul
2
awarded  Curious
May
31
awarded  Popular Question