Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

bracket order

11 views
Skip to first unread message

Phillip Helbig---undress to reply

unread,
Jan 2, 2012, 5:25:38 PM1/2/12
to
Some journals (I won't mention any names (but (perhaps) you can guess
them)) want the first part of this sentence written as

Some journals {I won't mention any names [but (perhaps) you can guess
them]}

This is even trickier than it seems when one takes into account that
innermost parentheses can be produced by a macro such as \citep. Also,
while one might be able to type it in relatively easily, mistakes can
creep in if one later modifies the text to change the number of nested
parentheses.

Is there any LaTeX package which can handle this automatically? Of
course, one should also be able to define the bracket order, which in
the above example is {[(0)]}. Also, this might be desired in text mode,
in math mode, both or neither.

Lars Madsen

unread,
Jan 5, 2012, 6:29:31 AM1/5/12
to
also in text? I've inly seen this in relation to math

--

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html

Phillip Helbig---undress to reply

unread,
Jan 5, 2012, 7:10:46 AM1/5/12
to
In article <4f05899b$0$285$1472...@news.sunsite.dk>, Lars Madsen
<dal...@RTFMSIGNATUREimf.au.dk> writes:

> > Is there any LaTeX package which can handle this automatically? Of
> > course, one should also be able to define the bracket order, which in
> > the above example is {[(0)]}. Also, this might be desired in text mode,
> > in math mode, both or neither.
>
> also in text? I've inly seen this in relation to math

Yes. I suspected only math as well, but I didn't have any nested
parentheses in equations. Then I got the proof and found that they had
been corrected in the text. Even if someone corrects the proof (even
better if someone actually reads it, rather than doing it automatically,
since this can catch real errors one couldn't catch automatically), I
prefer to submit a manuscript which needs no corrections.

Lars Madsen

unread,
Jan 5, 2012, 7:20:24 AM1/5/12
to
since csquotes can do this with quotes, I would asume it would be rather
'easy' to implement, csquotes \enquote macro can handle this correctly:

\enquote{blah blah \enquote{blah blah} blah}

Dan

unread,
Jan 5, 2012, 4:59:43 PM1/5/12
to
On Jan 5, 6:20 am, Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> wrote:
> Phillip Helbig---undress to reply wrote, On 2012-01-05 13:10:
>
>
>
>
>
>
>
>
>
> > In article <4f05899b$0$285$14726...@news.sunsite.dk>, Lars Madsen
Quotes usually have the following rule: outer quotes are always
the same (say, doublequotes), first level inner quotes are always
the same (say, singlequotes), etc. Thus each open quote has only
to increment the nesting leve and place the open quote mark
attached to that level. Then each close quote places the close quote
mark and decrements the level. Of course, there can be other
complications, but the implementation of nesting is usually pretty
simple.

On the other hand, the rules for fences are usually the reverse:
innermost fences are always (), next outer are [], etc. This means
the opening fence has to wait until all the fences between it and
the matching close have been detected before it can decide whether
to be ( or [ or {.

I can only think of a two-stage process: the first stage merely
executes the contents in a box, each nested fence merely
incrementing a depth parameter. Afterward the command
places the fence associated with the depth around its contents.
Something like the following pseudocode:
\fence{X}
-> incr depth (globally)
run X in box z
case depth
1 -> (box z)
2 -> [box z]
3 -> {box z}
endcase
decr depth

Caveat: not even implemented, much less tested.


Dan

Peter Flynn

unread,
Jan 6, 2012, 3:49:46 AM1/6/12
to
On 02/01/12 22:25, Phillip Helbig---undress to reply wrote:
> Some journals (I won't mention any names (but (perhaps) you can guess
> them)) want the first part of this sentence written as
>
> Some journals {I won't mention any names [but (perhaps) you can guess
> them]}

a. Am I the only one to find this astonishing? We know that journal
publishers are anal-retentive, but this seems to take things to an
extreme.

b. Writing which requires parenthetical expression three levels deep
should be rewritten in plainer language.

///Peter

Phillip Helbig---undress to reply

unread,
Jan 6, 2012, 4:30:40 AM1/6/12
to
In article <9mnqtb...@mid.individual.net>, Peter Flynn
In this case, I had a few rather long footnotes. The paper was accepted
quickly and essentially the only recommendation was to move the longer
footnotes into the main text. This sometimes resulted in an extra level
of parentheses.

0 new messages