1

I would like the [ ] to be in the center and I'm not succeeding.

\chemfig{HO-[@{left,0.25}]CH_{2}CH_{2}O-[@{right,0.25}]OH}
\polymerdelim[delimiters ={[]}, height = 10pt, depth = 10pt, indice = n]{left}{right}

enter image description here

2
  • 2
    Welcome to TSE. Please post a Minimal Working Example, instead of a code snippet. Sep 9, 2021 at 20:38
  • Ah 👌☺️ I am glad to see your comment. Thank you also to @Markus G.
    – Sebastiano
    Sep 11, 2021 at 13:24

1 Answer 1

2

Probabily that you have forgotten the 2nd size parameter (see 0.8) after @{left,0.5} (for example), and you will have the square brackets to be in the center.

\documentclass{article}
\usepackage{chemfig}
\begin{document}
\chemfig{HO-[@{left,0.5},0.8]CH_{2}CH_{2}O-[@{right,0.5},0.8]OH}
\polymerdelim[height=10pt, depth=10pt, indice=\!n, delimiters={[]}]{left}{right}
\end{document}

enter image description here

5
  • 2
    May I point out (as a chemist) that the horizontal position of the brackets is not a question of aesthetics, but carries chemical information as well. Therefore, the position should be at the same position for both, seeing as the bond is partially part of the repeating unit and partially that of the end groups. The most symmetrical solution would be using 0.5 for both, but that is then up to you.
    – Markus G.
    Sep 10, 2021 at 7:46
  • 1
    @MarkusG. Very kind Markus, I am not a chemist, sorry. I have understand that the OP would to have the symmetrical brackets. However I am glady if you would to change my code or I can freely delete my answer. My regards.
    – Sebastiano
    Sep 10, 2021 at 8:14
  • 2
    No, definitely do not delete. Your answer was perfectly fine, I just pointed out this detail because some people can be quite nitpicky about it. It was meant more as an additional information than as criticism. (I did however adjust your answer to reflect this, because you said you didn't mind.)
    – Markus G.
    Sep 10, 2021 at 16:46
  • @MarkusG. Don't worry especially with me :-). Thank you very much for your editing.
    – Sebastiano
    Sep 10, 2021 at 19:16
  • 1
    Thank you very much for the information and grateful for the help! Sep 11, 2021 at 2:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .