Let $X$ be a curve of genus $g\neq 0$ and $D$ a divisor on $X$.
If $n \in \mathbb{Z}$ and $O(D)(n)=O(D)\otimes O(n)$ is the twist of $O(D)$ by $n$, there is a manageable proceedings to find the dimension of $H^0(O(D)(n))$?
If $\deg O(D)(n) <0$ we have easily $H^0(O(D)(n))=0$
If $\deg O(D)(n) > 2g-2$ by Riemann Roch we have $\dim H^0(O(D)(n)) = \deg O(D)(k) + 1 - g $.
I'm in trouble in the other cases, where I've found just some bouds, given by degree of $O(D)(n)$, in particular, since $g>0$, if $D$ is effective we have $\dim H^0(O(D)(n)) \leq \deg O(D)(n)=n \deg D$
There are other possibly bounds? I'm even not sure about the last equivalence: $\deg O(D)(n)=n \deg D$. It is wel known in the case X is a plane curve, holds it in general?
Thank you for help!