2

I want to optimize my CV to be ATS-friendly. Modern Applicant Tracking Systems use programmable stupidity to parse resumes and decide, whether present them to a human reader.

To my surprise I discovered that the engine LinkedIn uses accepts from - to, but not from -- to. That makes my beautiful Experience and Education section a lump of a madman gibberish instead of well-separated entries. That does not help when you are looking for a job. ;)

To address the issue I have tried the approach from https://tex.stackexchange.com/a/442814/123888 :

FROM \protect\BeginAccSupp{ActualText=-}--\protect\EndAccSupp{} TO

that hides an n-dash form pdftotext, but not from pdf2txt.py. As I have commented the horse is still there.

The other problem is string replacement. I decided to define a macro \cvdates with tex code from https://tex.stackexchange.com/a/213950/123888 (other answers does not work with n-dash):

\def\replace#1#2#3{%
 \def\tmp##1#2{##1#3\tmp}%
   \tmp#1\stopreplace#2\stopreplace}
\def\stopreplace#1\stopreplace{}

\newcommand{\cvdates}[1]{\replace{#1}{--}{\protect\BeginAccSupp{ActualText=-}--\protect\EndAccSupp{}}}

But then with

\cvdates{FROM2 -- TO2}

\cvdates{FROM3 --- TO3}

I get

FROM2 - TO2
FROM3 -- TO3 

when I run pdftotext test.pdf -

One possible solution I can think about is to display from -- to to humans as graphics with an associated invisible text (How do I create an invisible character?). But I have no idea how can I remove machine-readable text from from -- to.

Gaussler
  • 12,801
abukaj
  • 147
  • What’s ATS in this context? – Andy Clifton Mar 22 '23 at 11:57
  • @AndyClifton Applicant Tracking System, which uses programmable stupidity to parse resumes and decide which of them present to a human. – abukaj Mar 22 '23 at 18:13
  • Maybe you can determine what Unicode character ATS recognizes for the dash, and force that into the output instead of what you'd ordinarily put there. (Or maybe ATS doesn't like the spaces; I'm just guessing, since I don't know ATS at all, and fortunately no longer have a need to create a resume.) – barbara beeton Mar 22 '23 at 19:05
  • @barbarabeeton That is the point of my question. ATS recognizes minus (-), which violates typography rules. I want to present minuses to ATS and dashes (--) to humans. – abukaj Mar 22 '23 at 21:38
  • Will the brute-force input $-$ produce something that AST handles without going crazy? If so, and you're willing to accept a solution that requires two different outputs, I have an idea. I can't think of any mechanism to produce a single output that will satisfy both eyeballs and AST. – barbara beeton Mar 22 '23 at 22:04
  • @barbarabeeton AST accepts also brute-force -. The problem is humans see it as a minus, not dash. Possible solution is to have -- as graphics with - in the accompanying text. – abukaj Mar 24 '23 at 07:28
  • 1
    Do you have a font editor? You might try editing the hyphen so that it looks like a dash. To a machine reader, it will still be a hyphen. A more involved solution is to create the stretched hyphen as an OpenType feature, to be selected as needed. – rallg Mar 26 '23 at 19:13
  • @rallg Taht is an idea worth trying – abukaj Mar 28 '23 at 16:18

1 Answers1

4

If you can compile with lualatex (or xetex) and use the fontspec package, you can do something like this MWE:

\documentclass{article}
\RequirePackage{fontspec}
\setmainfont{Latin Modern Roman}
\begin{document}
1984-2001\par
1984{\addfontfeature{FakeStretch=2.5}-}2001\par
\end{document}

The first line shows an ordinary hyphen. The second line has the hyphen stretched, so it looks like a dash. The fake dash looks correct in paper print, in a PDF Reader, and probably to OCR. But if text is extracted from the PDF, the fake dash is still a hyphen.

Another strategy would be to use a font editor, and stretch the hyphen. But this is not necessary, since fontspec does all that is needed.

If you cannot use fontspec then try what I suggested in a comment (above): Use a font editor, and change the width of the hyphen. Disadvantage is that it will then be long, everywhere a hyphen appears.

EDIT: At the request of the OP, I add that solution:

In preamble: \RequirePackage{graphicx} (or \usepackage{graphicx)

In document:

\protect\raisebox{0.44ex}{\scalebox{1.88}[0.35]{-}}

Both the original solution, and this edit,do something similar: They re-draw the shape of the glyph, but preserve its identity as hyphen.

EDIT2: The OP realized that \scalebox has a propblem with pdftotext

I firmly (VERY firmly) encourage the OP, and anyone with a similar issue, to use lualatex instead of pdftex. That requires using utf-8 characters (nowadays, standard). It requires loading package fontspec rather than fontenc. It requires NOT declaring OT1 or any similar encoding. And, it requires OpenType or TrueType fonts, not Type 1. None of this is exotic. It does not require learning Lua programming. There are many math fonts that will work, and a wide choice of text fonts. Many Type 1 fonts have alternative OpenType formats.

rallg
  • 2,379
  • Sadly I can use neither lualatex nor xetex. But your idea is right. I can use \protect\raisebox{0.44ex}{\scalebox{2.2}[0.4]{-}} (and \usepackage{graphicx}) to make a hypen look as a n-dash. Please include that in your answer and I will grant you the bounty unless a better answer is found. – abukaj Mar 28 '23 at 18:25
  • \protect\raisebox{0.44ex}{\scalebox{1.88}[0.35]{-}} is even better for my document – abukaj Mar 28 '23 at 18:34
  • @abukaj Edit done. Good for you! – rallg Mar 29 '23 at 17:36
  • Sadly I have found that I need to use \scalebox{1.88}[1]{-}. That makes hyphen thicker than dash (which is actually good for the font I use when printed) , but is ripped by pdftotext properly. – abukaj Mar 30 '23 at 13:01
  • 1
    @abukaj Noted in my answer. – rallg Mar 30 '23 at 17:05
  • Sorry for missing the grace period. A bounty is coming, but I can grant it after 23h :/ – abukaj Apr 01 '23 at 19:57