Open Masacroso opened 1 year ago
I agree. The diagrams are so small, and it seems no commands are responsible for altering the size of it.
I found a way to manually adjust the size of a commutative diagram in the tikzcd environment: when you are making a diagram you always need to use & symbol to space two objects out. For example, if you want to make a triangle diagram, you probably need to insert:
This shows how you made an inverted triangle.
Instead of just inserting the necessarily many of & symbol, you can try to add more &. Still using the convention above, but this time you try:
to make the diagram bigger. Don't forget to change the command for directions meanwhile.
I think this would be helpful!
if like me you're looking to literally scale everything and not just space them out, do something like this (taken from this se post):
\usepackage{tikz-cd}
% -- IMPORTANT HERE
\tikzcdset{scale cd/.style={every label/.append style={scale=#1},
cells={nodes={scale=#1}}}}
\begin{document}
% -- "scale cd" defined above (adjust paramater for scales other than 2x)
\begin{tikzcd}[scale cd=2]
Fc && Gc \\ \\ {Fc'} && {Gc'} \arrow["Ff"', from=1-1, to=3-1] \arrow["{\alpha_c}", from=1-1, to=1-3] \arrow["Gf", from=1-3, to=3-3] \arrow["{\alpha_{c'}}"', from=3-1, to=3-3]
\end{tikzcd}
\end{document}
It does some scaling, unfortunately not too much. However it scales the text more than the arrows, what can be seen if you change the scale from 2 to 5. Anyway it is the best temporary solution. But this problem must be solved scaling the DIV where the diagram is, that is, out of LaTeX.
This scaling can be done by css, it could be resolved by adding some parsing for width and height settings in the codeblock:
i.e.
```tikz width:300px height:200px
<code here>
And then the plugin parsing that and applying the css to the relevant svg. @artisticat1, If you can provide a direction on how you'd like to fix this, I'd be happy to take a go at it!
This scaling can be done by css, it could be resolved by adding some parsing for width and height settings in the codeblock:
i.e.
```tikz width:300px height:200px <code here>
And then the plugin parsing that and applying the css to the relevant svg. @artisticat1, If you can provide a direction on how you'd like to fix this, I'd be happy to take a go at it!
This would be very nice. As now there is little tools to plot commutative diagrams in obsidian, I must rely on creating png with other programs and paste it inside the document.
testing the package with some commutative diagrams, using the tikz-cd library I see that embedded SVG is very tiny. I tried to zoom it using some LaTeX command, by example the option \begin{tikzcd}[scale=10] or the solutions shown here but they don't work.
My code of example is this: