Is the following sentence grammatically correct? What could be an appropriate form to imply the similar meaning in technical writing?
Use one of the following relations depending on whether X is used with or without reference, respectively.
Questions on English Language & Usage Stack Exchange are expected to relate to English language and usage within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
Yes, it is grammatically correct, but pretty obtuse. I'm also not sure if respectively can be used to refer to objects that have not yet been listed, but the intent is clear either way. A simpler phrasing might be: