Many of us learn in math and physical science classes to use parentheses (), brackets , and braces {} (or round, square, and curly brackets or whatever you want to call them) to separate parts of an equation and to specify order of operations. Sometimes a particular type of bracket will be used on it’s own to signify some meaning, such as {Poisson brackets} or [concentrations]. Sometimes, such as when writing the formulas of coordination compounds, the order of brackets is changed. For example, you can end up with [{{()}}] instead of ({[()]}).
In prose, we often use parentheses to enclose supplemental information. Nested parentheses are discouraged. However, in technical writing, I’ve run into some instances where nesting occurs. I’m wondering how best to approach this. I realize that there is no right and wrong when it comes to style. However, there can be right and wrong with respect to a particular style guide. I’m a chemist, so I normally look to the ACS style. They don’t address this matter. Here are two examples:
The calculated transfer potential (Asub[/sub] --> Bsub[/sub]) decreases when Ruken asks about it on the SDMB.
vs
The calculated transfer potential [Asub[/sub] --> Bsub[/sub]] decreases when Ruken asks about it on the SDMB.
and,
The observed rate constant (1.1(2) x 10[sup]-4[/sup]) was awesome.
vs
The observed rate constant [1.1(2) x 10[sup]-4[/sup]] was awesome.
In the first case, (g) indicates phase. In the second, (2) indicates the standard deviation associated with the measurement.
Do any style guides, manuals, journal instructions, etc. address this issue? If not, is there a trend that favors one form over another in the literature? I’ve actually been having trouble finding examples, and what few I found were mixed.
I suspect it may come down to personal preference. I certainly have one.
Multiple layers of nested parentheses (all the same type) are acceptable. The use of other types of delimiters for different levels of nesting is just for the convenience of the reader, to make it clear which go with each other. Size of delimiters can also serve this purpose. In your first example, since the inner parentheses are subscripted, it’s pretty clear anyways, so there’s no real need to use any other delimiter. The second example is a bit more debatable, but with only one character in the innermost level and characters on either side of it in the next level, it’s probably also unnecessary.
Now if you should happen to take up computer programming, the rules are generally clear, in ALL programming languages I have seen. The three common types of brackets () and { } and in some languages even < > each have distinctly different uses and are CANNOT be used interchangeably.
If you need to have nested brackets of any of those types, you just nest multiple layers of the same. For example, a complicated arithmetic expression may be like:
SQRT(((A * B) + (C * D)) / (E + F))
Square brackets are used (in most modern languages) to indicate sub-scripts and little (if anything) else. Thus, A[sub]5[/sub] is written A[5]
Curly braces are used to enclose blocks of code, and these too can be nested, curly braces within curly braces:
if (a = b) {
if (c = d) {
for ( i = 1, i < 10, i++ ) {
}
}
else if ( x = y ) {
}
}
Given this habit, it’s become common to use multiple layers of regular parentheses in arithmetic expressions, even outside of computer programs. I saw it a lot in calculus classes.
ETA: Exercise for the reader: Look up some on-line examples of Lisp programs!
The main goal in these situations is clarity. So, given that you have a variety of symbols that mean the same thing (for humans anyway), there seems nothing wrong with using whatever seems best, provided that you are relatively consistent throughout your writing.
I would say that the forms with are probably the best for both of your examples, but more desirable for the second example because the brackets are on the same “level,” although none of your examples is particularly confusing. I, myself, would probably rewrite both sentences to avoid the nonmathematical brackets, but that’s just me and my personal idiosyncrasies.
The calculated transfer potential, Asub[/sub] → Bsub[/sub], decreases when Ruken asks about it on the SDMB.
The observed rate constant of 1.1(2) × 10[sup]-4[/sup] was awesome.
For the opinion of professional editors, you may want to check out the Q&A section of the Chicago Manual of Style at Page Not Found. You can ask them a question by clicking on a link on the left of the page.
In at least some versions of BASIC, the [square brackets] and (round parentheses) can be used interchangeably. I think the round ones were supposed to be the standard, but I mostly ended up using the square ones, since they’re unshifted and hence slightly more convenient.