3

I have seen that in Category Theory there is a symbol which seems like two parallel lines with text above and text below. This means that the thing above corresponds in an 1-1 way with the thing below. I have no idea how to write it in a clever way in latex. I, therefore, want to write something like:

\underset{x\in F(C)}{\overset{y_{C}\to F}{=}}

enter image description here

but I want the two parallel line to behave as \xrightarrow.

I also want to stack more than two "=", like:

enter image description here

  • 1
    Welcome to TeX.SE! Could you perhaps post an image of the desired result, i.e. an example of how these two parallel lines are exactly used? – Jasper Habicht Nov 21 at 21:22
7

I add my humble proposal (off-topic) (I think) using the simple tikz-cd package to create one of the images made so excellent user @Schrödinger's cat. You could put more close A and B using the row sep and column sep parameters used within the environment \begin{tikzcd} ... \end{tikzcd}.

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[r,dash, yshift=0.2ex, "y_{C}\to F"] \arrow[r,dash, yshift=-0.2ex, "x\in F(C)"']
& B 
\end{tikzcd}
\end{document}

Here there is the screenshot of the output. enter image description here

  • @down-voter(s) Always thank you. Is there some mistakes into my code or is it the problem the tag? – Sebastiano Nov 21 at 23:57
4

Welcome! This is just copied from amsmath.sty and mathtools.sty, and adjusted. EDIT: Used GUM's kind suggestion, which is less likely to cause viewer-dependent issues, and is also simpler.

\documentclass[12pt]{article}
\usepackage{mathtools}
\makeatletter
\def\DoubleFill@{\arrowfill@\Relbar\Relbar\Relbar}
\providecommand*\xDouble[2][]{%
  \ext@arrow 0055{\DoubleFill@}{#1}{#2}}
\makeatother
\begin{document}
\[ A\xDouble[x\in F(C)]{y_{C}\to F}B\]
\[ \scriptstyle A\xDouble[x\in F(C)]{y_{C}\to F}B\]
\Huge
\[ A\xDouble[x\in F(C)]{y_{C}\to F}B\]
\[ \xDouble[{\xDouble[\mathrm{presheaf}]{x\in F(C)}}]{y_{C}\to F}\]
\end{document}

enter image description here

  • Thank you, but how can I add more? – richarddedekind Nov 21 at 22:49
  • @richarddedekind I do not quite understand what you mean by that. What do you want to add? – Schrödinger's cat Nov 21 at 23:33
  • 1
    Not really important, but IMHO \def\DoubleFill@{\arrowfill@ \std@equal\Relbar\std@equal}, or—better—\newcommand*\DoubleFill@{\arrowfill@ \Relbar\Relbar\Relbar}, would be more elegant. See also this question (of mine), – GuM Nov 22 at 20:19
  • @GuM Thanks for the heads up, very much appreciated. I will add these options once it is clear what the OP means by adding more. – Schrödinger's cat Nov 22 at 20:21
  • By more I mean have more double dashes like the second image in the post. – richarddedekind Nov 30 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.