May 15, 2020For and fragments I use the =texfrag= package. This allows to insert math fragments inside documents. Example: