return to table of content

Add coffee stains to LaTeX documents (2021)

dpflan
27 replies
4h51m

View an example here: https://ctan.math.utah.edu/ctan/tex-archive/graphics/pgf/con...

Maybe the hue is off, or its a different roast or beans, feels less coffee, more science murder mystery?

codetrotter
9 replies
4h18m

First few stains look a bit poopy. And last one a bit murdery. None of them look very covfefe.

fcoury
5 replies
3h17m

Agreed, I was expecting something a bit more like this:

https://geekhack.org/index.php?action=dlattach;topic=102580....

FirmwareBurner
3 replies
20m

What keyboard is that?

graphe
1 replies
14m

If you're looking for the game ending keyboard you need this one. https://www.aliexpress.com/i/3256803782645256.html

Any mechanical switch, on its own key mount moved on a split or single magnetic board. I suggest split.

FirmwareBurner
0 replies
2m

That looks amazeballs. What I wanted my whole life.

Is it good though or is it impulse buy ewaste that just looks cool?

steve1977
0 replies
14m

That‘s the comment I expect on a site named Hacker News

guax
0 replies
1h42m

Nice keeb

geph2021
1 replies
3h16m

very murdery! Never even seen coffee that color :)

solardev
0 replies
2h25m

Maybe the poor civet had bloody bowels that day :(

https://en.wikipedia.org/wiki/Kopi_luwak

for1nner
0 replies
1h29m

This is the kind of discourse I seek out on HN. ty

elevaet
4 replies
4h31m

This page was intentionally left blank but we had to ruin it by letting you know.

Brilliant!

chanandler_bong
3 replies
3h24m

              This page intentionally left blank.

  (Well, not completely blank, since the above non-empty disclaimer
  appears on the page.  What is meant is that this page is devoid
  of meaningful content related to the rest of the document.  This
  page serves only as a separator between sections, chapters, or
  other divisions of the document.  This page is not completely
  blank so that you know that nothing was unintentionally left out,
  or that the page is not blank because of an error in duplication,
  or that the page is not blank because of some other production
  problem.  If this page were really blank, you wouldn't be reading
  anything.  This page has not been left blank by accident, but is
  left non-blank on purpose.  The statement on the page should say

         "This page was intentionally left non-blank".)
http://www.tytempleton.com/rhf/jokes/93q1/nonblank.html

JohnFen
1 replies
2h35m

My favorite was with two sides of a blank page in a document. One side read "This page is intentionally left blank", and the other side read "This page isn't."

kqr
0 replies
2h29m

I always liked the self-contradictory nature of "This page was unintentionally left blank."

cwillu
0 replies
2h8m

Plot twist: the printer accidentally added the [non-]blank page.

tantalor
1 replies
4h37m

Thanks for linking to that. Really confused why the ctan pages don't.

Tijdreiziger
0 replies
4h36m

They do, it’s the ‘English documentation’ link.

micromacrofoot
1 replies
4h28m

yeah the color if off and you can see that it's obviously a vector graphic... it's kind of posterized

wayvey
0 replies
1h43m

I wonder if blurring the edges of the shapes within the stain might help make it look more organic

kqr
1 replies
2h38m

This seems like the sort of thing that happens when one repeatedly tweaks while using the previous iteration as a reference. It might feel like most iterations improve on what came before, but before long one loses the connection to the original reference.

I think Deming compared it to the telephone game.

graphe
0 replies
12m

The recent project of the darktable developer to ansel shows this happening in other open source projects too.

zeekaran
0 replies
4h33m

Aw, these don't look nearly as good as I hoped.

wly_cdgr
0 replies
1h45m

Stains need to be subtler/fainter, waterier, with grain specks

spookie
0 replies
4h41m

Probably replicating when you scan the paper

robinsonb5
0 replies
4h37m

Maybe CMYK colour with no associated profile?

generalizations
0 replies
1h38m

Some of those are wine stains. The pkg does both.

deleterofworlds
0 replies
2h41m

hard to judge on a screen how they will look printed

dheera
19 replies
4h40m

Why aren't there mugs with hydrophobic coating on the bottom? It seems like this should be an easy problem to solve compared to all the petaflop GPU's and spacecraft we're building.

zeekaran
7 replies
4h31m

Normally, mugs are ceramic and thus the parts that had to touch the shelf in the kiln are unglazed.

Maybe we just need to make pottery in 0G.

nolongerthere
4 replies
4h24m

Could you just suspend them on a cushion of air like indoor skydiving?

bruce343434
1 replies
2h52m

How do you "just" suspend a mug on a cushion of air?

olddustytrail
0 replies
1h53m

Maybe like indoor skydiving?

sho_hn
0 replies
3h48m

One of the primary motivations behind LK99 and other efforts to create room-temp superconductors is to fashion coffee mugs that harness the Meissner effect to levitate above journal print-outs.

samatman
0 replies
1h18m

Obtaining the necessary laminar flow in the presence of the handle might be challenging.

pbhjpbhj
0 replies
3h16m

Not all tableware is barefooted / dry-footed. You can use a stilt, which is a ceramic with sharp metal (eg Kanthal) pins on which the glazed ceramic is supported. Pieces fired this way have small marks on the bottom like the injection marks some moulded plastic has.

Fully glazed ware is good for wet areas when the ceramic may not be entirely vitrified, as this prevents water from soaking into the ceramic body.

Dry-footed ware that hasn't been high-fired will soak up moisture, eg when washing, and so cause problems - crazing, and getting very hot when used in a microwave oven (which can cause more crazing, but also burn your hand!

Source: am potter.

The foot ring on dry-footed mugs is a useful knife sharpener in a pinch.

StableAlkyne
0 replies
4h15m

Huh, TIL

The bare ceramic on the bottom of the mug is of those things I've always noticed about coffee cups but never really thought about.

jhardy54
3 replies
4h31m

How would a hydrophobic coating help?

danbruc
2 replies
4h8m

I can imagine two ways. First, on the very bottom, if you place the mug into a puddle of coffee, then no coffee will wet the bottom of the mug. Second, around the side, when coffee runs down the side of the mug, a hydrophobic coating might stop a drop in its path if it is not too heavy. Not sure if the second thing would actually work.

netsharc
0 replies
3h58m

The coating around the side should form a V, with the handle being the lowest point, and make a little indentation on the bottom of the inside of handle to collect all the liquid...

0x38B
0 replies
3h41m

So make a GoreTex sleeve that waterproofs the bottom of your coffee mug?

eric__cartman
1 replies
4h17m

That's a very low tech solution. What we need is an internet connected mug that senses with a camera if it's about to be set on top of a piece of paper and starts beeping uncontrollably.

With a firmware update and an additional charge to the customer a model for detecting polished wooden furniture could also be used.

sho_hn
0 replies
3h52m

It also needs a permanent internet connection, as the inference for the paper detection is run in the cloud, and a subscription to keep it working.

I call it No-SaaS, No Stains as a Service.

DannyB2
1 replies
4h31m

Because that is a hardware fix.

Why fix in hardware what can be fixed in software? A simple Latex package could add hydrophobic coating feature to the document file.

Next: the device driver team will be tasked with a software patch to correct for the burned out light bulb on the device.

amlib
0 replies
2h59m

Oh great, one more ink cartridge for printer manufactures to sell. And, of course, the printer will refuse to work if your hydrophobic coating cartridges is empty even tough all other cartridges are fine.

simcop2387
0 replies
1h14m

They tend to get destroyed when cleaning the items. It happens a lot with clothing that has hydrophobic coatings so I'd imagine a dishwasher would ruin it almost immediately, leading to complaints and returns.

nosrepa
0 replies
2h53m

Aren't most hydrophobic coatings very toxic and wear easily?

bee_rider
0 replies
3h57m

Then how would we tell which papers have been read?

noelwelsh
7 replies
4h13m

Looking forward to using this next time I'm told I have to print, sign, and scan a document. I already have software setup to slightly rotate the page and add some grain, but this will add extra verisimilitude.

uhasker
1 replies
2h19m

I legit had to google the word "verisimilitude"

ebri
0 replies
1h12m

Me too. What a wordsmith, I am in awe! not being sarcastic, I really do appreciate it

fuglede_
1 replies
3h41m

You and me both. Maybe someone will find this useful: https://photocopy.fuglede.dk/

mck-
0 replies
3h30m

Nice! If only I knew this existed last month.

But they also needed a “company seal stamp” which I had to draw

tuatoru
0 replies
1h0m

Now we just need a similar package to smudge and blot the signature slightly, and add a little ink spatter, for the fountain pen look.

johannes1234321
0 replies
1h41m
eclipticplane
0 replies
1h43m

    convert \
        -density 150 \
        -colorspace gray \
        +noise Gaussian \
        -rotate 0.5 \
        -depth 2 \
        "$1" \
        "$(echo "$1" | rev | cut -f 2- -d '.' | rev)-scanned.pdf"

sho_hn
4 replies
4h8m

Huh, my AI-generated newspaper also adds coffee stains to a LaTeX (technically LuaTeX) document: https://imgur.com/a/NoTr8XX

I cobbled this myself, I didn't know it was such an expansive domain with prior art!

hathawsh
1 replies
3h20m

Beautiful project! How long does the 1100 mAh battery last?

sho_hn
0 replies
3h9m

About 7 months in the first run. I recently switched things to a more efficient TPS63020-based voltage converter though, which has an extremely low operating quiescent current of only 25uA in low power mode (1/4 of the MT3608 I previously used). I'm hoping for more in the next!

The comparison will also be apples-to-oranges though since I also switched it to a 3500 mAh 18650 during that revision ... self-drain and therefore the battery make itself now become a big factor ... ask me in a few years how it went? :-)

mu_killnine
0 replies
3h50m

Incredible! Thanks for sharing

engineer_22
0 replies
1h32m

Great project, would be a good expo for Hack-a-day

quijoteuniv
3 replies
4h40m

What about green tea?

DannyB2
2 replies
4h33m

Or Diet Coke.

noud
1 replies
2h0m

Or Maté?

jokeneversoke
0 replies
1h10m

or Monster?

oorza
3 replies
3h53m

What goes through someone's mind that they spend all the time and effort to create a visual gag and then don't put images of said visual gag on the documentation?

ninju
0 replies
3h51m

The supporting code repo contains a sample PDF

https://framagit.org/Pathe/coffeestains/-/blob/main/coffeest...

brbrodude
0 replies
3h14m

Old-school internet vibes

afhfah834
0 replies
44m

What do you mean? It is on the documentation?

https://ca.mirrors.cicku.me/ctan/graphics/pgf/contrib/coffee...

emmanuel_1234
3 replies
2h36m

Working in France, I remember having to provide a "Scan of an original of Bank Account information slip" (approximate translation). It's just a number! That I could have copy/pasted in an email to make sure the secretary won't fuck it up, or I could download the document from my bank and email it, but no, HR insisted it had to be an original.

I eventually downloaded one from my bank, converted it to JPEG, added a light coffee stain with Gimp and sent that, to pretend it was an actual scan of an actual document actually printed by the bank.

musiciangames
1 replies
2h14m

That almost made me nostalgic for the French love of paperwork. 'La paperasse' I seem to recall. Watching an official in action is like performance art.

xanderlewis
0 replies
23m

If you think the French love paperwork, try Japan!

lloeki
0 replies
1h27m

I eventually downloaded one from my bank

Had the same experience, but that I could not do, as my bank would only give out some crude Netscape era HTML laid out with a borderless <table>, that might just as well have been plain text. I literally had to fake something that looked like a pretty paper one, complete with the bank cooler palette and slapping a semi-transparent logo in the background.

Another marvel: once I received some paperwork, and was asked to sign and scan, which I did.

I had a nice scanner. It produced perfectly noise free, upright scans. I had a nice pen. It produced very clean scripture.

Apparently too nice as the recipient lectured me that I had to print, physically sign, and scan, that they could not accept a digital signature on a digital document. The fact that I received the paperwork on actual paper by snail mail and never could have had access to a digital version completely eluded them.

pavel_lishin
2 replies
4h51m

A lot of time can be saved by printing stains directly on the page rather than adding them manually.

Outstanding.

cf100clunk
1 replies
4h38m

Bestowing the ''golden ring of quality'' has now been automated.

diego_sandoval
0 replies
3h45m

When a measure becomes a target, it ceases to be a good measure.

philomath_mn
1 replies
4h36m

Some other great CTAN packages with an "amusements" tag: https://ctan.org/topic/amusements

sho_hn
0 replies
3h58m

realhats is pretty great.

leemelone
1 replies
4h25m

Think of all the work that was done on this package INSTEAD the paper the author should have been working on.

fghorow
0 replies
4h12m

I do hope they got tenure for this!

:D

Something1234
1 replies
4h51m

Honestly if I got a resume featuring this I would immediately call them in for an interview it counts for massive bonus points.

dylan604
0 replies
4h48m

would you lower the points awarded if they were not to scale?

throwawaaarrgh
0 replies
3h43m

I'm gonna need a decaf option

soegaard
0 replies
4h22m

The code didn't look as I expected. He more-or-less embedded an svg into the sty-file.

https://framagit.org/Pathe/coffeestains/-/blob/main/coffeest...

I am looking forward to a real generative AI that produces coffee stains.

smitty1110
0 replies
2h41m

I'm fairly sure this is either older than stated, or is based off an older package. I distinctly remember a similar package existing when I was in high school in the 00's, I turned in a paper for AP CS with a faked coffee stain once as a joke.

pvaldes
0 replies
3h3m

Or use overpic and the coffee stain filter from Gimp.

pugworthy
0 replies
2h16m

This reminds me of the old Philip and Alex's Guide to Web Publishing* posts from the 90's and his sketcherly / back of the napkin diagram style.

* http://philip.greenspun.com/panda/?

pahae
0 replies
4h48m

I actually like their take on the vacat page [0] even more.

0: https://en.wikipedia.org/wiki/Intentionally_blank_page

ok_dad
0 replies
1h16m

I remember using something similar like a decade ago, maybe one I linked below? I added one to a paper for a math class I turned in and the teacher loved it so much that the next semester he used it on almost every handout; it was quite annoying after a while, hahaha.

https://www.overleaf.com/latex/examples/latex-coffee-stains/...

http://legacy.hanno-rein.de/hanno-rein.de/archives/349

nvr219
0 replies
3h37m

Need to fork to make it bloodstains

noud
0 replies
1h58m

I used this library very often when writing a new paper. When the paper was a draft I would put coffee stains on the pages. In this way, I always knew if I was looking at a draft or the final version.

markrages
0 replies
2h2m
jrpelkonen
0 replies
2h37m

Brings back memories from time when printed documents were still the norm. A coworker used to call it my "seal of approval" if a document was on top of my desk long enough to accumulate a hefty dose of coffee stains.

jjgreen
0 replies
5h1m
fifticon
0 replies
4h6m

I still cling to doing it manually, as a bonus you get coffee too!

bluish29
0 replies
4h43m

Sometimes I exchange printed papers and documents with colleagues that have actual coffee stains. Would be interesting to have digital and physical stains at the same time. I will test that. Some will complain about the perfect shapes /s

ashdnazg
0 replies
1h3m

Package name should have been Lattex.

arnley
0 replies
2h29m

This is essential

ar7hur
0 replies
4h8m

This is why I read HN every day.

Dowwie
0 replies
4h17m
CalChris
0 replies
3h49m

Maybe you can combine coffee stains and watermarks.

BearOso
0 replies
4h17m

I'm sure the extra cost of color printing makes it less economical.

0x38B
0 replies
3h16m

Stains add a whole layer of history to a document - I remember a prof at uni once apologizing for the wine stains on our papers...

In the same vein as stains, I love how non-waterproof inks react with water; the organic smudges and splotches add a bit of watercolor to an ordinary journal page (1).

1: https://nexus.armylane.com/files/Journal-Ink-splotches.jpg