Throughout my document I have several formula elements named s with variants marked as s'. Furthermore, I need to mark these using some other means. Currently, I use \widetilde, giving me \widetilde{s'}.

However, when \widetilde{s} and \widetilde{s'} appear close together (which happens frequently), the difference in height is quite disturbing (as the tilde is placed above the ' character).

The same problem happens with \overline{s'}.

Could you hint me to at least two ways that make it possible to differentiate between s, \markOne{s}, and \markTwo{s}, while s', \markOne{s'}, and \markTwo{s'} still look nice? As I already often use subscripts, playing around with those is not possible.

EDIT: I should point the following additional facts:

  • I also have items wider than s to mark, at the moment I can see \widetilde{pp'_i} (although, as mentioned, \widetilde{pp}'_i might solve this particular problem)
  • The document is quite large and currently I have \something{x} where x may include primes and subscripts, e.g. \something{pp'_i}. Thus, it would be rather hard to replace it by \somethingElse{pp}'_i automatically.

EDIT2: If no better solution pops up, I'll use some Regexp magic to work around the problem mentioned in the last bullet point of my first edit.


Instead of \widetilde{s'}, you might try \widetilde{s}' or \tilde{s}'. If you choose \tilde{s}', shown in the third row below, you should probably also go with \tilde{s} instead of \widetilde{s}.

Speaking for myself, I find the \widetilde diacritic to be both too wide for the relatively narrow "s" character and placed too far above the "s" character. In comparison, both the size and the vertical positioning of the \tilde diacritic are better suited for use with s. Naturally, what "looks good" is clearly a matter of taste, and there's no arguing about tastes...

enter image description here

$s$ $s'$ 

$\widetilde{s}$ $\widetilde{s}'$ $\widetilde{s'}$

$\tilde{s}$ $\tilde{s}'$ 
  • I like the looks, but sadly the implementation would not work for me. I'll update my question now. – C-Otto Feb 17 '14 at 7:40
  • On second thought, a bit of Regexp magic might help. Thanks :) – C-Otto Feb 17 '14 at 9:17
  • You've got to be careful here semantically though - as an example, if prime is first derivative and widetilde is mean value (bar would be more common for this I know). Then \widetilde{x'} and \widetilde{x}' are the mean of the first derivative and the first derivative of the mean respectively. while in your case only one meaning might make sense, you might wan to take pity on the poor uninitiated reader. – Chris H Feb 17 '14 at 10:34

Another variant:

$s$ $s'$

$\widetilde{s}$ $\widetilde{s}'$ \fbox{$\myprime{s}$}

$\tilde{s}$ $\tilde{s}'$

  • Thanks, but as I just updated my question it sadly is unfeasible for me to replace every occurence manually. – C-Otto Feb 17 '14 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.