Goal. I would like to calculate the product of the formal dimension of a discrete series representation of $GL(2,\mathbb{Q}_p)$ with trivial central character (so, an irreducible unitary representation of $PGL(2,\mathbb{Q}_p)$ that is a subrepresentation of $L^2(PGL(2,\mathbb{Q}_p))$) and the covolume of a torsion-free (cocompact) lattice in $PGL(2,\mathbb{Q}_p)$. First, the formal dimension and the covolume must be calculated with respect to the same Haar measure.
Background and attempt. The local Jacquet-Langlands correspondence (Section 15 of [1], or Section 4 of [2]) gives a bijection between irreducible representations of the unit group of the quaternion algebra over a local field $F$ and the discrete series representations of $GL(2,F)$, in which the central characters on both groups are the same. Let $Z$ denote the center of $GL(2,F)$, which we may identify with $F^\times$. As explained in [3], if the Haar measure on $GL(2,F)/Z$ is normalized so that the formal dimension of the Steinberg representation of $GL(2,F)$ is $1$, then the formal dimension of the discrete series representation of $GL(2,F)$ is equal to the actual dimension of the corresponding representation of the unit group of the quaternion algebra over $F$. For the rest of this post, specialize to the case $F=\mathbb{Q}_p$, where $p \neq 2$. If I understand Section 2.2 of [3] correctly, normalizing the Haar measure on $GL(2,\mathbb{Q}_p)/Z$ so that the measure of $Z . GL(2,\mathbb{Z}_p) / Z=\frac{1}{2}(p-1)$ will force the formal dimension of the Steinberg representation to be $1$.
Suppose we have an irreducible representation of the unit group of the quaternion algebra over $\mathbb{Q}_p$ of dimension $m$ with trivial central character. (I haven't looked closely at the dimensions calculated in [3] yet, but these would supply the main examples of formal dimensions for my project.) If the Haar measure on $GL(2,\mathbb{Q}_p)/Z$ is normalized so that the measure of $Z . GL(2,\mathbb{Z}_p) / Z=\frac{1}{2}(p-1)$, as in the previous paragraph, then the formal dimension of the corresponding representation of $GL(2,\mathbb{Q}_p)$ will be $m$. Since the central character of the representation of the unit group of the quaternions is trivial, the central character of the corresponding representation of $GL(2,\mathbb{Q}_p)$ is trivial, and we have an irreducible unitary representation of $PGL(2,\mathbb{Q}_p)$ that is a subrepresentation of $L^2(PGL(2,\mathbb{Q}_p))$, with formal dimension $m$.
Ihara showed (Corollary to Theorem 1 in [5]) that any torsion-free discrete subgroup $\Gamma$ of $PGL(2,\mathbb{Q}_p)$ (or any other locally compact field under a discrete valuation) is isomorphic to a free group, over a set of at most countable generators; and if $\Gamma \backslash PGL(2,\mathbb{Q}_p)$ is compact, then the number of free generators $n$ of $\Gamma$ is equal to $ \frac{1}{2} (p-1) h + 1$, where $h$ is the cardinality of $\Gamma \backslash PGL(2,\mathbb{Q}_p) / PGL(2,\mathbb{Z}_p) $. (Observations: According to Ihara's results, the free group on $n$ generators can be found in $PGL(2,\mathbb{Q}_p)$ only if $h=2(n-1)/(p-1)$ is an integer, since $h$ is the cardinality of a (finite) set of double coset representatives. As for existence, he gives a construction in Section 4.)
Let $\Gamma$ be a free group situated as a lattice in $PGL(2,\mathbb{Q}_p)$, and let $n$ be the number of generators of $\Gamma$. Normalize the Haar measure on $GL(2,\mathbb{Q}_p)/Z$ so that the measure of $Z . GL(2,\mathbb{Z}_p) / Z \cong GL(2,\mathbb{Z}_p) / \mathbb{Z}_p^\times = PGL(2,\mathbb{Z}_p)$ is $1$. Then the measure of $\Gamma \backslash PGL(2,\mathbb{Q}_p)$ is just the cardinality of $\Gamma \backslash PGL(2,\mathbb{Q}_p) / PGL(2,\mathbb{Z}_p)$, which is $h=2(n-1)/(p-1)$. Next, multiply this measure by $\frac{1}{2}(p-1)$ to get the measure on $GL(2,\mathbb{Q}_p)/Z$ in Section 2.2 of [3]. Now the measure of $\Gamma \backslash PGL(2,\mathbb{Q}_p)$ is just $n-1$.
So, if my understanding is correct, the product of the formal dimension of the discrete series representation of $PGL(2,\mathbb{Q}_p)$ in the second paragraph of this "Background and attempt" section --- an integer $m$, in the normalization of Section 2.2 of [3] --- and the measure of $\Gamma \backslash PGL(2,\mathbb{Q}_p)$ --- $n-1$, in the same normalization --- is equal to $m(n-1)$.
Question. Have I correctly dealt with the Haar measure involved in calculating the formal dimension and the covolume? According to the remarks in Section 4 of [6], if the representation is supercuspidal, the product should indeed be an integer.
(Apologies for this "Can someone check my work?"-type question! I thought others might benefit from seeing the product calculation worked out.)
References.
[1] Jacquet and Langlands, Automorphic forms on $GL(2)$, 1970
[2] Gérardin and Li, Fourier transforms of representations of quaternions, 1985
[3] Corwin, Moy, and Sally, Degrees and formal degrees for division algebras and $GL_n$ over a $p$-adic field, 1990
[4] The Jacquet-Langlands correspondence for $GL(2)$ math.stanford.edu/~conrad/JLseminar/Notes/L20.pdf
[5] Ihara, On discrete subgroups of the two by two projective linear group over $\mathfrak{p}$-adic fields, 1966
[6] Borel and Harder, Existence of discrete cocompact subgroups of reductive groups over local fields, 1978
EDIT: I don't know if the central character of the irreducible representation of the unit quaternions given in Section 1.4.2 of the notes [4] can be trivial, so for now, I cannot use $2$ (the dimension there) as the dimension in my example. I have replaced "$2$" in the first version of this post with some unknown dimension "$m$". Maybe I will ask about the possible dimensions of irreducible representations of unit quaternions with trivial central character in a separate question later.