I want to write some simple gene regulations in math mode in LaTeX. Activation is denoted with a normal arrow, so I can write $A \rightarrow B$
for A activates B, but I'm failing to find an arrow with a straight-line head for repression. Is there some symbol/package that I can use to write something like $A \repressionarrow B$
and obtain the following.
2 Answers
A solution with tikz
, probably a bit overkill
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\tikzset{
regulations/.cd,
act/.style={-{Stealth}}, % Style for activation
rep/.style={-{Bar}}, % Style for repression
}
% Command for regulations (both activation and repression, default activation)
\newcommand{\regulationarrow}[1][act]{%
\tikz[baseline] {\draw[regulations/#1] (0,0.5ex) --++ (1.5em,0);}%
}
\begin{document}
$a \regulationarrow b$
$A \regulationarrow B$
$a \regulationarrow[act] b$
$A \regulationarrow[act] B$
$a \regulationarrow[rep] b$
$A \regulationarrow[rep] B$
\end{document}
You can find most symbols through detefixy. There doesn't seem to be something close to what you're looking for, so BambOo's answer might be the best way to go.
If you do want to hack something together, you can start with a symbol that looks close to what you want and tweak it a bit. Warning: this may produce some ugly artefacts like lines of the wrong thickness (see e.g. the third example), so this is not really the "correct" solution.
I included a normal arrow for comparison.
\documentclass{article}
\usepackage{amssymb} %for intercal
\usepackage{graphics} %for raisebox, rotatebox, and scalebox
\begin{document}
$A \to B$
$A \dashv B$
$A\ \raisebox{.4ex}{\scalebox{1}[.5]{$\dashv$}}\ B$
$A\ \raisebox{-.2ex}{\rotatebox{90}{$\bot$}}\ B$
$A\ \raisebox{-.2ex}{\rotatebox{90}{\scalebox{1}[1.2]{$\bot$}}}\ B$
$A\ \raisebox{1.3ex}{\rotatebox{-90}{$\intercal$}}\ B$
\end{document}