You can stay mindful while studying by giving your full attention to what you're doing. Notice that after a while, your attention drifts away. When it does, gently bring it back to your studying.