There are a number of ways in which advanced costs could be
related to litigation expenses, and this
ABA ethics opinion lists three specifically, and how each
should be handled. Rule 1.8(e) most often comes into play for cases
with large expenditures, such as certain contingent fee cases,
where a law firm has so much money at stake that it has, in effect,
an interest in the litigation. But, disbursements and in-house
services, apart from general overhead, also represent common, small
and irregular litigation costs that get advanced, as well.

The revised Massachusetts Rule 1.5 requires written fee agreements
in most cases, which is to include information respecting 'the
basis or rate of the fee and expenses for which the
client will be responsible' (emphasis added), at (b)(1).
Per comment [1B] to the rule, lawyers have the choice, respecting
in-house expenses, to charge either 'an amount that reasonably
reflects the cost incurred by the lawyer' or 'a reasonable amount
to which the client has agreed in advance'. Where those in-house
expenses charged to the client do not reflect the actual
out-of-pocket expenses of the law firm, the fee agreement must
outline how the expenses are calculated. For more on the practical,
ethical application of marking up litigation costs, see section (2)
of this
article from the BBO.

As a matter of practice, however, it does not make good business
sense to mark up advanced costs in bills to clients, given the
reasons elucidated in the above-referenced ABA ethics opinion. The
client is also unlikely to agree to the arrangement in the first
place. Additionally, the practice makes the lawyer look cheap, and
supplies the easy intimation that maybe business is not going so
well after all, if the firm appears very willing to nickel-and-dime
clients in that way. Marking up costs is also a surefire way to
upset those clients of yours who do examine their bills
closely -- good luck getting a referral from a client to whom
you've marked up costs. For those reasons, and others, most
attorneys just advance fees and costs (where appropriate), and
charge their clients without a markup.