12

What would be a neat way of typing a question mark without a dot? I thought I could use such a punctuation for questions in the middle of a sentence (and so justify continuing lowercase after the question mark). There is apparently

\textraiseglotstop

that uses the package

tipa

but I would be more comfortable using a macro that e.g. removes the dot of the question mark of the corresponding font I chose for the document.

Alp Uzman
  • 284
  • 2
    May be overlapping a white rectangle in the bottom of the question mark? Or may be clipping a box? – Manuel Apr 15 '16 at 19:05
  • 5
    I'd question the premise, here. The reason we conventionally follow question marks with a capital letter is that the question mark usually ends the sentence, not because the question mark happens to contain a dot. There's no need to invent your own punctuation for your situation. Just use an ordinary question mark and follow it with a lower-case letter, as you want to. That will be much more natural to your reader. – David Richerby Apr 15 '16 at 22:11
  • @DavidRicherby Thanks for the comment. I am no grammar expert, but in conventional grammar isn't it also the case that the question mark is only used at the end of the sentence? You seem to suggest that I should stick to conventions, but violate them at the same time. Probably a better suggestion would be to modify the syntax so that I don't need a question midsentence. I am aware that "?" is not made by modifying ".", but I would like to think that way. Though clearly my question is a gimmicky one. – Alp Uzman Apr 15 '16 at 23:07
  • 2
    Conventionally, yes, question marks are only used at the end of a sentence. But, given the choice of breaking convention by using a question mark in the middle of a sentence versus breaking convention by inventing a new punctuation mark, I'd go with the first one any time. Inventing punctuation marks looks weird, no?, but writing in a slightly unorthodox way just looks slightly unusual. – David Richerby Apr 15 '16 at 23:32
  • 2
    @DavidRicherby I understand your standpoint, thanks! – Alp Uzman Apr 15 '16 at 23:41
  • 1
    In Spanish, the inverted question mark is used to mark the beginning of an interrogative clause, not necessarily a sentence. Now that I've mention that ¿do you see the point I am about to make? It is reasonable ¿no? to block off a question clause within a sentence. ¿Why should the question have to be the final clause? unless you are an ultra-orthodox grammarian. – Danny Rorabaugh Aug 18 '17 at 00:44
  • @Danny I believe this comment is off-topic. – Alp Uzman Aug 18 '17 at 08:13
  • 1
    @AlpUzman While it doesn't address the original posted inquiry, I felt it fit with the ensuing conversation. – Danny Rorabaugh Aug 18 '17 at 18:46

3 Answers3

10

EDITED to work with all sizes of a given font. EDITED to take hooy's suggestion of calling it \?.

\documentclass{article}
\usepackage{trimclip}
\def\?{\setbox0=\hbox{?}\raisebox{.2\ht0}{\clipbox{0pt .2\ht0 0pt -.1\ht0}{?}}}
\begin{document}
Is this is a test\? of something?

\Huge ?\?
\end{document}

enter image description here

  • 1
    Or ex since it's more vertically related. In any case, wouldn't this be a nice use for \? rather than \Qmark? :) – Manuel Apr 15 '16 at 19:24
  • 1
    @hooy Yes. But I redid it already in terms of percentages. – Steven B. Segletes Apr 15 '16 at 19:24
  • @StevenB.Segletes Yes, my mistake. Elegant solution :-) – sodd Apr 15 '16 at 19:25
  • 1
    I can't really take credit for the \? suggestion, that should go to @Manuel :-) – sodd Apr 15 '16 at 19:30
  • @StevenB.Segletes I had to modify .2's into .25's, otherwise the dot would be still partially visible in Huge size. Though this might be because I run lots of packages by default. – Alp Uzman Apr 15 '16 at 23:34
  • 1
    @A.AlpUzman My multipliers may be font dependent, if you are not using Computer Modern. Egreg's answer was trying to remove even the font-dependency from the method, if I understand it. – Steven B. Segletes Apr 16 '16 at 00:31
  • This renders what comes after it whitespace in a standalone document, and @egreg's answer is no different. – oneofvalts Feb 26 '23 at 14:31
  • I posted a separate question with the standalone class problem: https://tex.stackexchange.com/q/676602/215887 – oneofvalts Feb 26 '23 at 14:47
9

For example, you can remove the dot by white rectangle with height of dot.

\input opmac

\def\nodot#1{\setbox0=\vbox{\kern.01em\hbox{.}\kern.01em}\setbox1=\hbox{#1}%
   #1\kern-\wd1{\localcolor\White \vrule height\ht0 width\wd1}}

Aha \nodot? next text?

\end

Edit I don't understand why my answer is ignored here. The question was not LaTeX specific so my answer didn't use LaTeX.

I show second solution using only \pdfliteral (i.e. without any packages, without trimclip). The clipping path is calculated.

{\lccode`\?=`\p \lccode`\!=`\t  \lowercase{\gdef\ignorept#1?!{#1}}}
\def\nopt#1,{\expandafter\ignorept\the#1 }

\def\nodot#1{%
   \leavevmode\setbox0=\vbox{\kern.01em\hbox{.}\kern.01em}\setbox1=\hbox{#1}%
   \pdfliteral{q 0.9963 0 0 .9963 0 0 cm 
                 0 \nopt\ht0, \nopt\wd1, \nopt\ht1, re W n}%
   \rlap{#1}\pdfliteral{Q}\kern\wd1}

Aha\nodot? next text?
wipet
  • 74,238
  • What do you mean 'ignored'? The OP hasn't even returned to the site yet (judging by her/his profile page)..? Maybe she or he has other things to do and this is only a small problem in her/his life.... – jon Apr 15 '16 at 20:44
  • @jon "ignored" means zero votes while egreg is gathered points:) – wipet Apr 15 '16 at 20:56
  • 2
    Good luck getting more votes than egreg. I don't even think that's a LaTeX vs TeX thing as much as it's a critical mass thing. Nearly all of us fail in this regard, regardless of who gave the better answer (and, for the record, it's not usually me). People vote for what they know, just like most people tend to like songs whose chorus they already know.... – jon Apr 15 '16 at 22:30
  • Myself, I am not sure I should vote up an answer with no idea whether it actually is an answer beyond the fact that it is posted as an answer. So I look for some kind of clue it will probably do what's wanted. I could try to follow-through the meaning of the code but, you know, life is short. So I'm more likely to vote up an answer which demonstrates that it is an answer rather than merely being an answer, however good. To put this another way: I'm more likely to vote if there's a screen shot unless the code happens to be something I know really well. – cfr Apr 15 '16 at 23:13
  • I think you should point out the disadvantages of these solutions as well as the advantages. The point about trimclip I had no idea about until I searched through the page to find it used in somebody else's answer. My initial assumption was that this was some opmac thing, but I couldn't see how your first solution used it, so was confused as to the advantages of the second. But I take it the clipping bit is the advantage of the second: the first requires a white background and has dimensions. The second will only work with certain engines. Is not needing trimpclip/opmac so good? – cfr Apr 15 '16 at 23:19
  • 1
    Do please note that I only wrote the above comments because you asked why your answer might not have received votes or as many votes. I would consider my comments rude in other circumstances. – cfr Apr 15 '16 at 23:21
7

The idea of clipping is good; it's not necessary to guess, since we can use the height of the period for deciding how much to clip.

In order to take care of the overshoots, it's necessary to work a bit harder: the clipping is done 10% higher than the period and the bounding box is similarly increased by 10% at the top.

The bounding box is then reset using a phantom, because the clipped question mark is made into having height and depth zero.

\documentclass{article}
\usepackage{trimclip}

\newcommand{\?}{%
  \makebox[0pt][l]{%
    \sbox0{.}\sbox2{?}%
    \hspace{-.1\wd2}%
    \raisebox{1.1\ht0}[0pt]{%
      \clipbox*{{-.1\wd2} {1.1\ht0} {1.1\width} {1.1\height}}{?}%
    }%
  }%
  \phantom{?}%
}

\begin{document}

?\?

\Huge ?\?

\fontfamily{qtm}\selectfont

?\?      

\end{document}

enter image description here

egreg
  • 1,121,712