cryptocode
cryptocode copied to clipboard
Fonts for keys
I think it's somewhat inconsistent to use serif (mathsf
) for multi-letter variable identifier such as pk
while sticking to italics for single-letter variables. For example, in \sigma <- Sign(sk, m)
, why should sk
have a different font than \sigma
or m
? It's certainly common to use serif for algorithms and maybe events but I think it's not that common for keys and variables like state
.
Now this is mostly a matter of taste, and I'm not asking for an agreement. I'm of course happy about any comments but I think what I'm asking for is if it would make sense to have an option to change the font?
Currently I use
\renewcommand{\pckeystyle}[1]{{\ensuremath{\mathit{\protect\vphantom{p}#1}}}}
(changed mathsf
to mathit
).
I think it would already be very useful to document pckeystyle
and the possibility to redefine (and also use!) it.
I am not sure how a nice option for fonts could look like. So far I would have always recommended to just do what you did and redefine the corresponding \pcxyzstyle
. (btw. it is documented, if also not very prominently in Section 2.17.)
If you have a good idea for a more convenient way of switching fonts (that ideally works not only for keys), let me know (or even better, create a PR :D)
I am not sure how a nice option for fonts could look like. So far I would have always recommended to just do what you did and redefine the corresponding
\pcxyzstyle
. (btw. it is documented, if also not very prominently in Section 2.17.)
Oh indeed! But maybe it should mention the \vphantom
thing explicitly.
If you have a good idea for a more convenient way of switching fonts (that ideally works not only for keys), let me know (or even better, create a PR :D)
Now that I think about it, I guess redefining the macro is in fact the most convenient way.