6

So I am getting used to using tikz-cd package to draw relatively straightforward commutative diagrams. I have two questions.

Question 1 Here is the code:

\documentclass[10pt, draft]{amsart}
\usepackage{pgf}
\usepackage{tikz}
\usepackage{tikz-cd}
\usetikzlibrary{arrows, matrix}
% With tons of other packages not relevant here I guess
\begin{document}
 % With some text ....
\[ 
\begin{tikzcd}
Y \arrow[dashrightarrow]{d} \arrow{rd} &  \\
Y_{0} \arrow{r}{\pi_{0}} & X \\
\end{tikzcd}
\]
\end{document} 

What happens here is that the arrow tips for the diagonal arrow is extremely light compared to the other two, you can see that in the picture below. I would like to know how to fix that. enter image description here

Question 2 In the following diagram, (which also suffers from the same issues of question 1 above), I would want to fix the hook on the arrow labelled i so that it points the correct way (and perhaps make it more prominent).

enter image description here

Here is the code I am using for that part.

  \[
  \begin{tikzcd}[column sep =small] 
   & (X_{0},x)\arrow[hookrightarrow]{dl}{i}\arrow[hookrightarrow]{dr}{i^{\prime}}
     &   \\  
   (X,x) \arrow{dr} \arrow{rr}
   & & (X^{\prime}, x) \arrow{dl} \\
   & (U,u)
     & 
  \end{tikzcd}
  \]
4
  • 2
    Re 1: This is most likely a viewer issue. I don’t have the same problem. Try zooming and or using another viewer. Code snippet 2 is not compilable as it is ({i^{\prime} is missing a } and can simply be written as {i'}) and empty lines are not allowed in math-mode. What is the “correct” way. More prominent? It suffers the same rendering issues in your view as the diagonal arrow. – Qrrbrbirlbel Jun 16 '13 at 19:58
  • 1
    The arrow thickness issue might be caused by an old installation of TikZ? – John Wickerson Jun 16 '13 at 20:03
  • 1
    I don't see thickness problems. For the hook, say \arrow[left hook->]{dl} – egreg Jun 16 '13 at 22:49
  • @Qrrbrbirlbel the issue with { i^{\prime} has been fixed thanks for pointing that out. I was using the document viewer on ubuntu and after changing the document viewer to orca my question one seems to be no question at all. – DBS Jun 17 '13 at 3:23
6

The thickness problem seems to be a viewer issue. For the hook in the second diagram you can use a direct TikZ expression for the arrow; with the key swap you can change the side of the arrow chosen for the label.

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{arrows}

\begin{document}
\[
\begin{tikzcd}[column sep=small] 
&  
  (X_{0},x) 
  \arrow[hookrightarrow]{dr}{i'}
  \arrow[left hook->,swap]{dl}{i} % <-- reflect the direction of the hook
\\
(X,x)
  \arrow{dr} \arrow{rr} 
&&
(X', x)
  \arrow{dl} \\
&
(U,u)  
\end{tikzcd}
\]
\end{document} 

It's easier to type i' for i^{\prime} and the output is exactly the same. Never leave blank lines in the code for a tikzcd.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.