Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for full customization of watermark text #20

Open
jackm opened this issue Jan 20, 2016 · 4 comments
Open

Allow for full customization of watermark text #20

jackm opened this issue Jan 20, 2016 · 4 comments

Comments

@jackm
Copy link

jackm commented Jan 20, 2016

As it is right now, the watermark text is split into two user customizable commands, \gitMarkPref and \gitMark, with \gitMarkFormat intented to be used for text style.

However, even if the \gitMarkPref command were to be redefined to contain nothing, the watermark text will still contain a textbullet between the prefix text and the main text. I would like there to be a way to change the entire watermark text if the user wishes to. The only way to do this with the current version would be to temporarily disable the hidden textbullet or manually change the gitinfo2 package itself.

Basically what I'm asking is to allow the user to modify the following line within the package.

@cmhughes
Copy link

cmhughes commented Jul 1, 2017

Hi Brent,
Thanks a lot for this package. Just to say that I'd really like to see this feature as well -- I originally posted an issue, referenced above, but I think this one captures what I would like.
Best
Chris

@jcalov
Copy link

jcalov commented Jul 5, 2018

Hello Brent

Thank you for that great package! This improved my git workflow in a way I dreamed of.
It would be very helpful if I could define the whole watermark text, so +1 by me.

Changing the package itself is no option for me. So I hope you could move the text bullet into the \gitMarkPref default (or find another solution).

@jackm Could yo tell me how I can temporarily disable the textbullet? Would be great if you could provide a code snippet.

Best
Nachos

@jackm
Copy link
Author

jackm commented Jul 5, 2018

Here is my workaround. The way I get around it is to change the textbullet command to be empty when setting gitMarkPref, then I re-enable the textbullet command at the end of the gitMark command.

% Blank out the git watermark prefix
% Temporarily disable the \textbullet command so that it doesn't render
\renewcommand{\gitMarkPref}
{\renewcommand{\textbullet}{}}

% Custom git watermark; only show branch and short hash
% Re-enable the \textbullet command as well
\renewcommand{\gitMark}
{\gitBranch\,@\,\gitAbbrevHash\renewcommand{\textbullet}{\textbullet}}

@josephwright
Copy link

This repository is no longer active: please re-report issues at https://github.com/josephwright/gitinfo2/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants