20230731

PDF embedding: 2023 edition

 Solely for my own benefit, some updates to how to create PDFs from Latex/Overleaf that meet the PDF/A standard required by various publishers, whose own instructions miss out several important features. 

  • The final missing piece: make sure that hyperref receives the pdfa option.  In particular, if you are using acmclass call it with
    \documentclass[pdfa]{acmart}

    Or similar adaptation, e.g., \documentclass[sigconf, nonacm, pdfa]{acmart}.  Yes, I'm looking at you, PVLDB. 

  •  Throw in 

    \usepackage[a-2b]{pdfx}

    I've no idea if this does anything useful, but why not?

  •  Go back to your plots in python, and make sure that Matplotlib is instructed to not use type 3 fonts.  The correct answer is of course 42, as in 

    import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42

    or something similar. 
Hopefully that will do it.  Web services like https://avepdf.com/pdfa-validation can be useful at debugging things, if you don't mind uploading your documents to a random server, and running out of free goes. 

20191229

You for coffee?

In some ways, it's thoroughly reassuring that journalists are prepared to put the level of effort and research necessary to create an article like this one.

Context-free link to The High Life video:

20191219

Hindsight is 50:50

About a decade and a half ago, I was desperately seeking a Black Box Recorder cover version of "Is that all there is?".  Still no sign of that, but the PJ Harvey version is now but a few clicks away thanks to the archival nature of ute yube.

20191218

The one thousandth

The dubiously reliable internal counter for this blog indicates that this is the one thousandth entry. To mark this entirely arbitrary number based on a quirk of mammalian evolution, I've chosen to Witter on about a topic of no consequence, as an epitome of this sporadic medium.

If this post looks different to the 999 that have preceded it, it's because it has been composed on mobile telephonic device. Having recently  succumbed to this modern wonder, I find that I can express my innermost thoughts on the go by the simple expedient of texting this entry to a special number, 100 characters at a time. This could change everything. Or nothing.

Soundalikes

Iain "Duncan" Smith is increasingly starting to sound like John Lloyd.  One is a legendary producer of laughable, satirical material that no one can take seriously, the other... [you can fill the rest in yourself, do I have to do all your work for you?

20191214

Things that continue to annoy me

People who use "epsfig". It's 2008, folks! Use \includegraphics, for goodness sake.

[This is a post that seems to have got caught in the drafts section for a decade or so]

Lies My Credit Card Has Told Me

In the words of Republica, "I know my ex-boyfriend lies, oh he does it every time". In this case, it's a credit card. And not strictly lying, more like deliberately misleading. I suppose we are used to this as a society by now, but it's still somewhat annoying. In this case, I'm referring to the American Express Blue Cash Card. "Earn up to 5% back" screams the headline, and you know that it's lying to you, or at least trying to mislead.

[This is a post that seems to have got caught in the drafts section for a decade or so]

[This post appears to be an early fragment of this one for 2004:

Lying cheating swindling scum of the day

Answering my own questions

As I was asking barely 15 years ago, "What would happen if Jack Black met Jack White (the White stripes)?"

As it turns out, an answer has recently been given: 



So there you go. 

20160515

ANACs to you

These are useful numbers to use if you are dealing with POTS:
https://en.wikipedia.org/wiki/Automatic_number_announcement_circuit

20130607

PDFcrop

It's been a while, but guess what?  It's time for more exciting notes on manipulating PDFs for preparation of scientific documents!

To crop a PDF to its bounding box, just try
pdfcrop input.pdf output.pdf
That's all!
This relies on having pdfcrop installed, but it seems to be there in my install of cygwin.

20110331

Urgent Threats

A frantic email sidles its way into my inbox:

I know this might come as a suprise to you,but I made a quick trip to Madrid in Spain and was attacked by thieves.My bag,valuables,credit cards and passport were stolen.The embassy has cooperated by issuing a temporary passport.I need funds to settle outstanding hotel bills,ticket and other expenses.

To be honest,i don't have money with me at the moment. I've made contact with my bank but the best they could do was to send me a new card by post which will take 2-4 working days to arrive here. I need you to lend me some Money to sort my self out of this predicament, i will pay back once i get this over with because i need to make a last minute flight.

Western Union or MoneyGram is the fastest option to wire funds to me. Let me know if you need my details(Full names/location) to effect a transfer. You can reach me via hotel's desk phone and the number is, +34 ...

Best regards,
AlexT


Note to scam artists: try to make sure that your mark has actually heard of the person you are impersonating. In this case, I had to websearch them, and only then vaguely recognized their name as someone else distantly in the CS biz. I suppose you could argue that this is just a scattershot approach aiming to hit someone who will fall for it, but the problem is, like the traditional 419 scams, at some point even the dumbest user will start to twig that there must be something up when they received dozens of advanced fee fraud solicitations.

On the plus side, at least the country code matches the content of the message, and the from: address looks somewhat plausible.

On the minus side, one day someone is going to get robbed in a foreign country and need their friends to wire them some money, and no one will believe them.

20100509

More Misdirected Mail

Another erroneous email comes flooding into my inbox.

Hey gary and carol!!
I'm not sure if you got my texts, my phone is acting strange and not letting me call anyone! I'm in Bend and my dad says you are here too. I'm going to an artwalk in downtown bend tonight, if you are going to be around you should give me a call! My number is xxxxxxxxxx. If not, we should grab coffee or something tomorrow before I head back to school! Hope to talk to ya soon.
Caitlin
Sent from my Verizon Wireless BlackBerry
If you are in Bend, then I am sorry to hear it.

20100418

The Elders of Scion

Simon was an unremarkable boy, who grew up in an unremarkable town and went to an unremarkable school. One day a remarkable thing happened to him, the first remarkable thing that had ever happened to him, as he returned home from football practice.

A tall man strode confidently up to Simon and said, "The Elders of Scion have been watching you. We see great potential in you. From now on, everything you do will be guided by agents of the Elders of Scion. This will lead you to greatness". Then he turned around abruptly and stomped away into the twilght.

Simon thought a great deal about this encounter over the next few days. Surely this could not be real? He was, after all, quite unremarkable. Although, Simon had always believed that beneath a veneer of unremarkability, he did indeed have a great potential for greatness. Could there really be some kind of secret organization called the Elders of Scion that would help him achieve great things? It seemed unlikely, and there was no entry on the topic in the big encyclopedia in the school library.

However, now that he was watching out for signs, Simon started to notice strange events, out of place. When he played football, he seemed to get more passes to him. He scored highly on a test that he really hadn't prepared for. Then he tried asking out a girl in his class that he liked to see if the Elders of Scion could affect even that, and she said yes.

As time went on, Simon came to recognize the actions of the Elders of Scion everywhere in his daily life. Things seemed to just work out for him. Buses showed up just as he began to look for one. He got a job at a local hotel that paid well and didn't really require him to do anything. Life went well. Of course, to keep the actions of the Elders a secret from others, not everything went perfectly, but enough things went his way that he was sure that they were looking out for him.

After school, Simon got a job with the first company he applied to. It was a company that did something complicated with money that no one person who worked at the company fully understood. Filled with confidence, Simon knew he didn't really have to work too hard, and instead went to meetings, and told people exactly what he thought they should do. As a result, he quickly got recognized as a visionary and promoted.

Almost before he realized it, Simon found himself the youngest chairman of the whole company. He had everything he could ever want. He had a beautiful wife, and a beautiful home, and two beautiful daughters, and most beautiful of all, a very large amount of company stock.

But something nagged at Simon's mind. Yes, clearly he had benefited from the help of the Elders of Scion in reaching this position. But was there more to it? How many others were in his position? What else could the Elders do for him? What more did they have planned?

He decided that he would have to find the Elders of Scion, and learn all their secrets. But this was difficult. No one he mentioned the name to, casually, would admit to having heard of the organization. Not even those he most suspected being agents of the elders gave any indication that they knew what he was talking about. There was only one thing for it. He would have to find the man who had first told him about his destiny.

The number of people you would have to interview to find one man who talked to an unremarkable boy almost twenty years ago would be huge. But fortunately Simon could afford to pay private detectives a high hourly rate to do that for him. And, after several months of dead ends, at last came the news that they had found the man. What's more, they said that they were certain that he had a strong connection to the Elders of Scion.

Simon knew that he had to talk to this man in person. So he found himself at the door of an unremarkable semi in an unremarkable village near where he grew up. The man was confused to see him, but let him in anyway.

"The Elders of Scion? I was in them long time ago." he admitted to Simon. "Bit of a waste of time, if you ask me. I remember I saved about a grand to get 500 CDs made up, but we only shifted about twelve of them. Got the rest in a box in the attic, I think. How come you've heard of us?"

Simon, a little confused, told the story of how the man had changed his life, and how everything since then had been influenced by the Elders of Scion.

The man looked confused for a while. Then a short laugh erupted out of him like a belch.

"Oh, that! I'd forgotten completely till you reminded me. I was pissed. I'd been rehearsing with the rest of the band, and had a couple of beers while we were at it. On the way to the offie to get some more, I saw some scrawny little kid, and decided to scare him with some made up story. Are you telling me you really believed that?"

There was an awkward silence, and Simon soon left.

Things didn't go so well for Simon after that. A change in the market wiped out a lot of the company's investments, and a boardroom coup that he didn't see coming ejected him from the company. His wife quietly started sleeping in the guest bedroom, and his daughters were angry at him because he wouldn't buy them ponys.

He started taking long walks in the countryside, kicking his way through autumn leaves. He thought about how ridiculous his life had been, based on a silly superstition about a non-existent conspiracy centered around him.

But, over time, things started to improve. He got headhunted to a consultancy firm that didn't really need him to do anything. His daughters started talking to him again when he bought them the latest must-have toy, a robotic cat that would hiss and scratch you if you ignored it. And he began an affair with one of the secretaries at the consultancy, something he'd been meaning to do for a while but never had the time for before.

Simon still drives off into the countryside and goes for long walks. Every now and then he sees a child running or playing alone. And when he does, he tells them that the Elders of Scion have been watching them, and they see great potential. From now on, their actions will be helped by agents of the Elders, and great things await them.

Mostly, the children look back blankly, not understanding the words. Some of them accuse him of being a child molester, and tell him to piss off. But for one or two, a light goes on in their eyes. Of course they have always had potential, and now they can realize that potential, thanks to the Elders of Scion.

20100417

As I was going to Manchester...

...I met:
  • A 40-year old black man in Plymouth
  • The ward sister in a paediatric hospital in Cardiff
  • A woman in Crosby who had been burgled
  • My father who ran a youth club
  • A young man in London whose flat has been burgled five times
  • My mother, a magistrate in Newbury for 30 years
  • A man in my constituency called Clive Stone who had kidney cancer
What a busy evening!

20100306

epstopdf rotating issue

Another post more for my own benefit and future reference.

epstopdf often rotates figures that you'd prefer it didn't. That's ghostscript getting a bit eager. The following kludge will fix it:

export GS_OPTIONS=-dAutoRotatePages=/None

before running epstopdf as usual.

Edit:

Or
export GS_OPTIONS="-dPDFSETTINGS=/prepress -dAutoRotatePages=/None"
to embed fonts as well...

20100103

NetFilch

For no one's real interest, but because I've done this for the past couple of years, here are all the films that I watched on NetFlix in 2009. Fans of privacy invasion might try to use this to break the anonymity of any future releases of netflix user data, but since I'm disclosing pretty much everything that would be announced, I fail to see what it might get you.

Previously I have added some commentary on each film, but I'm not sure that I can be bothered to this time. They mostly speak for themselves, or at least for the combination of my odd selection of tastes and my habit of randomly ordering my queue so I never know what is coming next.

Casablanca
Mr. Magorium's Wonder Emporium
Fanboys
Forgetting Sarah Marshall
The Evil Dead
Naked Lunch
Titan A.E.
Watchmen: Tales of the Black Freighter
Vicky Cristina Barcelona
Burglar
Pan's Labyrinth
Saved!
Guerrilla: The Taking of Patty Hearst
Ocean's Thirteen
Afro Samurai: Season 1
A Clockwork Orange
But I'm a Cheerleader
The Girl in the Cafe
Grey Gardens
Sicko
The King of Kong
Tenacious D in: The Pick of Destiny
Run Lola Run
Being There
Ghost Rider
Murder by Death
Collected Shorts of Jan Svankmajer: Vol. 2
No Country for Old Men
The Last King of Scotland
The Weather Underground
The Monster Squad
Following
Superbad
Logan's Run
Princess Mononoke
The Kid Stays in the Picture
Harry Potter and the Order of the Phoenix
Chronicles of Narnia: Prince Caspian
National Treasure: Book of Secrets
A/k/a Tommy Chong
Superman Returns
District B13
Kevin Smith 2: Evening Harder: Disc 2
Man on Wire

20091213

Why I (don't) blog

It seems to be quite a few months since I wrote anything. Laziness, is the main reason. Also, Facebook. Now that facebook makes it easy to post an idle comment about anything that's on my mind, it makes the need to write here seem less urgent.

However, Facebook isn't everything. It also encourages more short form comments, so there's less scope to witter on at length about trivia. And, since it's done under my own name, and visible to everyone who's ever met me, there's a lot more incentive to self-censor and tone down. So I should probably make more effort to be more longwinded, obnoxious and tedious in this forum. Let's see if I can manage more of that in 2010.