Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I believe that a symbol -||- is commonly used to indicate repetition of a fragment of text. The problem is that typesetting it using dashes and pipes looks kind of ugly. Is there a predefined symbol for that?

EDIT: Seems this is a localized version of a ditto mark:

http://en.wikipedia.org/wiki/Ditto_mark

Is there a way to typeset it in LaTeX?

share|improve this question
1  
Can you point to some resource on the net where the symbol appears? –  egreg Apr 30 '12 at 15:08
1  
That's the problem, it's really difficult to google a symbol. I mostly see it in hand written text. –  julkiewicz Apr 30 '12 at 15:10
    
In what field do you believe it's used? –  egreg Apr 30 '12 at 15:11
3  
I think you are referring to a ditto mark (i.e. the two dashes looking a bit like quotation marks in the middle). The English version of the Wikipedia article doesn't mention the use of dashes around the symbol as in your question, however, while the German one does. –  diabonas Apr 30 '12 at 15:14
    
@diabonas I think you're right. There is no Polish entry for that on wiki. Seems like this is a localized version of ditto. –  julkiewicz Apr 30 '12 at 15:16
show 3 more comments

2 Answers

up vote 13 down vote accepted

You are referring to the ditto mark, which is actually a special Unicode character (U+3003) looking like this:

Unicode Character 'DITTO MARK' (U+3003): 〃

Using XeLaTeX or LuaLaTeX, you could use this character directly, provided that you use a font the has support for this symbol. However, the Wikipedia article cited above mentions that

[...] in practice closing double quotation marks (”) or straight double quotation marks (") are often used instead [of the Unicode symbol]

so you might as well use something like

\newcommand*{\dittoclosing}{---''---}
\newcommand*{\dittostraight}{---\textquotedbl---} % available in T1 encoding

(The latter requires you to use \usepackage[T1]{fontenc}).

The result looks like this:

comparison of \dittoclosing and \dittostraight

share|improve this answer
    
In fact, the dashes on either side should span the whole repeated text, no? Of course, this isn’t as easy to achieve … –  Konrad Rudolph Apr 30 '12 at 19:25
add comment

The german Wikipedia claims that the Unicode DITTO MARK is for CJK languages only … Furthermore I’d add some space around the quotation marks and lower them a little. In my eyes the qoute version don’t look very good. I like a TikZ version, as the following, since the vertical bars math the horizontal ones better … In most cases I prefer repeated text, though.

ditto

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\newcommand*{\dittoclosing}{--- \raisebox{-0.5ex}{''} ---}


\usepackage{tikz}
\newcommand{\dittotikz}{%
    \tikz{
        \draw [line width=0.12ex] (-0.2ex,0) -- +(0,0.8ex)
            (0.2ex,0) -- +(0,0.8ex);
        \draw [line width=0.08ex] (-0.6ex,0.4ex) -- +(-1.5em,0)
            (0.6ex,0.4ex) -- +(1.5em,0);
    }%
}


\begin{document}
\begin{tabular}{ll}
Some long stupid text & Text A \\
\dittoclosing & Text B \\
\end{tabular}

\begin{tabular}{ll}
Some long stupid text & Text A \\
\dittotikz & Text B \\
\end{tabular}
\end{document}
share|improve this answer
    
You can edit the German Wiki as to the statement that the ditto mark is only used in CJK languages is incorrect. In general it is good advice to repeat the words. From the Oxford Guide... Repeat information rather than use ditto marks. The mark also changes based on context. Your TikZ solution looks good though:) –  Yiannis Lazarides Apr 30 '12 at 18:18
1  
@YiannisLazarides: Thanks :-) Do you mean that the german Wikipedia is wrong? I guess what the wiki mean is not that only CJK languages use a ditto mark but that the Unicode character DITTO MARK is to be used in CJK languages. Other languages might use the quotation marks instead. –  Tobi Apr 30 '12 at 18:40
    
I don't speak German, but the way you explain it indicates that the statement in the Wiki is wrong. Perhaps if you can expand it a bit in the wiki with a longer explanation. It is always good for one's soul to contribute to Wikipedia:) –  Yiannis Lazarides Apr 30 '12 at 18:48
4  
@YiannisLazarides: The German Wikipedia is right, and "the Unicode DITTO MARK is for CJK languages only". Of course ditto marks are used in many places, but for some reason the only Ditto mark encoded in Unicode is the one for CJK. In fact it (Unicode Character 'DITTO MARK' (U+3003)) occurs in the block "CJK Symbols and Punctuation". So one should not use U+3003 with a non-CJK language. (Instead one can use some combination of quotation marks and dashes.) –  ShreevatsaR Apr 30 '12 at 19:15
1  
@YiannisLazarides: Not all script/language-specific code points in Unicode have a language name attached. In this case, U+3003 DITTO MARK (〃) is not in the Latin blocks U+0000 to U+024F, nor in the block "Latin Extended Additional" (U+1E00 to U+1EFF) nor in "General Punctuation" (U+2000 to U+206F), but specifically in "CJK Symbols and Punctuation" (U+3000 to U+303F). In this block, it occurs along with characters like U+3005 IDEOGRAPHIC ITERATION MARK (々), U+3006 IDEOGRAPHIC CLOSING MARK (〆) and U+3020 POSTAL MARK FACE (〠) which despite not saying "CJK" in the name, are meant specific to CJK. –  ShreevatsaR May 1 '12 at 6:14
show 6 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.