Latex: allow phantomsection in captions#10688
Conversation
|
If you want this PR to be considered, please explain in words what it is doing and why. |
I find the following html would result in latex a |
|
Complete example: <table>
<caption>...<span id="test">test</span>...</caption>
<tr><td>A</td><td>b</td></tr>
</table>gets converted to \begin{longtable}[]{@{}ll@{}}
\caption{...\phantomsection\label{test}{test}...}\tabularnewline
\toprule\noalign{}
\endfirsthead
\endhead
\bottomrule\noalign{}
\endlastfoot
A & b \\
\end{longtable}and compiling this produces the LaTeX error Adding What isn't clear to me is whether there would be any drawbacks if we add |
|
It seems to work in my tests with |
`\phantomsection` is used for anchors. When these occur inside a caption, a LaTeX error is raised unless the `\phantomsection` is protected using `\protect`. So we now `\protect` every `\phantomsection` (even outside of captions -- this seems to be harmless).
`\phantomsection` is used for anchors. When these occur inside a caption, a LaTeX error is raised unless the `\phantomsection` is protected using `\protect`. So we now `\protect` every `\phantomsection` (even outside of captions -- this seems to be harmless).
`\phantomsection` is used for anchors. When these occur inside a caption, a LaTeX error is raised unless the `\phantomsection` is protected using `\protect`. So we now `\protect` every `\phantomsection` (even outside of captions -- this seems to be harmless).
https://tex.stackexchange.com/questions/228973/argument-of-captionydblarg-has-an-extra