0

Minimal example:

\documentclass{article}

\begin{document}

\begin{enumerate}
  \item See below
  \item [2\textsuperscript{*}.] This isn't right. Or?
  \item [3*.] This neither.
  \item [4.*] Even worse.
  \item See above
\end{enumerate}

\end{document}

Shouldn't instead both the dot and the asterisk be directly at the number?

(I found this answer https://tex.stackexchange.com/a/298893/36836 but I am not familiar with the \up command. Is it just equivalent with \textsuperscript?)

Edit

I agree that the the title of a question marked as duplicate (Add asterisk after labels in enumerate) can be read to ask the same question. However my question added in the body of the question points to a more particular request that seems neither in the other question nor in any of the answer given to that question. I could change the title of my question slightly but that would render some of the answers given to my question look strange. So I leave it with this edit.

Edit 2

Based on a comment (How to typeset enumerations with asterisk?) I prefer as a solution:

\newcommand{\aster}{\makebox[0pt][l]{*}}
Daniel
  • 1,787
  • Either way is typographically awful, and also very bad from the programming point of view. Have you considered 1) and 2*) rather than 1. and 2*. or 2.* ? – yo' Jun 13 '16 at 09:39

4 Answers4

2

From your information I gather that you are trying to have some items stand out using stars, and you want it typeset directly above the dot. There are numerous ways to do this. Here I made a function, which do the counting for you. You could improve this using the enumitem package, so you don't need to write [\printnum] for every item. That all depends on how often you will need to do a list like this in your document.

\documentclass{article}
\usepackage{xparse}
\newcounter{itemC}
\NewDocumentCommand{\printNum}{s}{%
    \stepcounter{itemC}
    \IfBooleanTF{#1}%
    {%
        %Do Starred%
        \theitemC.\makebox[0pt]{*}%
    }{%
        %Do Unstarred%
        \theitemC.%
    }%
    }

\begin{document}

\begin{enumerate}
  \item [\printNum]  See below
  \item [\printNum*] This isn't right. Or?
  \item [\printNum*] This neither.
  \item [\printNum*] Even worse.
  \item [\printNum] See above
\end{enumerate}

\end{document}

enter image description here

Runar
  • 6,082
  • Thanks a lot. This seem to reach the same result as http://tex.stackexchange.com/a/314480/36836. So my choice of answer is a bit arbitrary. I already loaded the calc package in my document which probably many do. So I went with that answer. – Daniel Jun 13 '16 at 09:16
  • I like the way you've fixed the numbering, I think I prefer your answer to mine. – Chris H Jun 13 '16 at 09:53
2

I would personally never use any of 1.* or 1*. or 1{* above .}, all of them just look wrong. I would stick to the 1) and 1*) style. Also, I think you shouldn't have to number the list manually, so I coded a \staritem for you:

enter image description here

\documentclass{article}

\usepackage{enumitem}

\setlist[enumerate,1]{label=\arabic*)}

\makeatletter
\newcommand\staritem{\@noitemargtrue\@item[\arabic{enumi}*)]}
\makeatother

\begin{document}

Some text some text some text some text some text
some text some text some text some text some text.
\begin{enumerate}

\item Foo foo foo foo foo foo foo foo foo foo foo
 foo foo foo foo foo foo foo foo foo foo foo foo.

\staritem Bar bar bar bar bar bar bar bar bar bar
 bar bar bar bar bar bar bar bar bar bar bar bar.

\item Baz baz baz baz baz baz baz baz baz baz baz
 baz baz baz baz baz baz baz baz baz baz baz baz.

\end{enumerate}
Some text some text some text some text some text
some text some text some text some text some text.

\end{document}
yo'
  • 51,322
  • I kind of have to use the 1*. version because I am extending a numbering from a quote which uses 1.. That is also why manual numbering is okay in this case. – Daniel Jun 13 '16 at 10:13
1

Yet not sure to have fully understood, but loading the enumitem package, this gives an automatic label:

\documentclass{article}
\usepackage{enumitem, makebox}
\setlist[enumerate, 1]{label =\arabic*\rlap{\textsuperscript*}\protect\makebox*{\textsuperscript*}{.}}

\begin{document}

\begin{enumerate}%
\item Is this OK? 1
\end{enumerate}

\end{document} 

enter image description here

Bernard
  • 271,350
1

Assuming you want the asterisk over the top of the dot, with no spacing:

\documentclass{article}
\usepackage{calc}

\makeatletter
\newcommand{\aster}{%
    \newlength{\l@aster}%
    \settowidth{\l@aster}{*}%
    *\hspace{-\l@aster}%
}
\makeatother

\begin{document}

\begin{enumerate}
  \item See below.
  \item [2\textsuperscript{*}.] This isn't right. Or?
  \item [3*.] This neither.
  \item [4.*] Even worse.
  \item [5\aster{}.] How about this?


\end{enumerate}

\end{document}

asterisk over dot

I've called the new asterisk command \aster because I couldn't immediately think of anywhere else that's used. I suggest you pick your own name, pairing the new length \l@aster with it.

Personally I'd go for a different version (\item[*6.]):

my choice

Chris H
  • 8,705
  • 2
    why not use \makebox[0pt]{*}here instead? – Runar Jun 13 '16 at 09:20
  • @runartrollet because I didn't think of it! :) – Chris H Jun 13 '16 at 09:21
  • IMHO option 5 is the worst, the two symbols souldn't be atop each other. Also, the space after the star is now too short because the star protrudes to the right of the dot. – yo' Jun 13 '16 at 09:41
  • @yo'. I'm inclined to agree with you, but if it's what the OP wants... I'd go for \item[*5.] personally. The manual numbering bugs me too. – Chris H Jun 13 '16 at 09:45
  • @ChrisH The manual numbering is solvable of course (see my answer). – yo' Jun 13 '16 at 09:52
  • @runartrollet The \makebox[0pt]{*} seems not to work in the optional argument of an enumerate environment. – Daniel Jun 13 '16 at 10:18
  • 1
    @Daniel You have to brace it, if it is inside an optional argument: \item[5{\makebox[0pt][l]{*}}] – egreg Jun 13 '16 at 10:25