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

draft mode with watermark #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions paper/header.tex
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
pdfkeywords = {Julia, Optimization, Game theory, Compiler},
}

\usepackage{draftwatermark}

2 changes: 1 addition & 1 deletion paper/journal_dat.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
\def\@journalName{Proceedings of JuliaCon}
\def\@volume{1}
\def\@issue{1}
\def\@year{2019}
\def\@year{2021}
4 changes: 2 additions & 2 deletions paper/paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
\documentclass{juliacon}
\setcounter{page}{1}

\begin{document}

\input{header}

\begin{document}

\maketitle

\begin{abstract}
Expand Down
6 changes: 6 additions & 0 deletions paper/prep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
issue = ENV["JLCON_ISSUE"] === nil ? 1 : ENV["JLCON_ISSUE"]
volume = ENV["JLCON_VOLUME"] === nil ? 1 : ENV["JLCON_VOLUME"]
year = ENV["JLCON_YEAR"] === nil ? 2021 : ENV["JLCON_YEAR"]
draft = ENV["JLCON_DRAFT"] === nil ? true : ENV["JLCON_DRAFT"] == "true"
journal_name = "Proceedings of JuliaCon" # hard-coded for now

open('header.tex', 'w') do |f|
Expand Down Expand Up @@ -40,6 +41,11 @@
keyword_list = metadata['keywords'].join(', ')
f << "pdfkeywords = {#{keyword_list}},\n"
f << "}\n\n"

# draft mode
if draft
f << "\\usepackage{draftwatermark}\n\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this disabling the draft?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no? Why would that be? I think adding the package adds the watermark

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just curious why the double \\ at the start of \\usepackage{draftwatermark}\n\n? I had interpreted this as the command being commented out... but I now realize that's not how LaTeX works :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was escaping special characters like \n

end
end

open('journal_dat.tex', 'w') do |f|
Expand Down