I'm trying to write the line diagram of the glass electrodo to measure pH. I've got a working code:
\documentclass{article}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage[version=4]{mhchem}
\begin{document}
\begin{equation*}
\overbrace{\underbrace{\ce{Ag (\textit{s}) | AgCl (\textit{s}) | KCl (\textit{aq, sat}) }}_{E_{ref1}} \underbrace{||}_{E_j}}^{\text{Electrodo de referencia 1}} \overbrace{\ce{H^+ (\textit{aq}, a_1)}}^{\text{Analito}} \overbrace{\underbrace{|}_{E_1} \text{Membrana de vidrio} \underbrace{|}_{E_2} \textcolor{blue}{\ce{H^+ (\textit{aq}, 0,1M), }} \underbrace{\textcolor{blue}{\ce{Cl^- (\textit{aq}, 0,1 M)}}\ce{|AgCl (\textit{s})|Ag (\textit{s})}}_{\text{Electrodo de referencia 2, }E_{ref2}}}^{\text{Electrodo de vidrio}}
\end{equation*}
\end{document}
and the result look like this:
I need to make it a little more narrow without losing information, and my best option is to save the empty space in the brackets for the interfaces (Ej, E1 and E2).
Is there a way to do that?
Best Answer
To really economize on space, I'd ditch the
\underbrace
machinery and instead resort to vertical arrows as pointers that direct explanatory stuff towards the items being explained.