Graphics, Figures & TablesRescaling for commutative Diagram

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
JonTsu
Posts: 9
Joined: Sun Jan 08, 2012 3:54 pm

Rescaling for commutative Diagram

Post by JonTsu »

Hi LaTeX Community,

I have a long exact sequence, which, for the sake of aesthetics, I decided to present in a tikzcd array. Below is the LaTeX code I used to produce it:

Code: Select all

\begin{tikzcd}
  0 \rar & \,~H^0(X,\F'')\,~ \rar & H^0(X,\F) \rar & \,~H^0(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} & \\
  & \,~H^1(X,\F'')\,~ \rar & H^1(X,\F) \rar & \,~H^1(X,\F') \,~\ar[out=0, in=180, looseness=3,overlay]{dll} \\
  & {\color{white}{\,~H^1(X,\F'')\,~}} & \vdots & {\color{white}{\,~H^1(X,\F')\,~}} \ar[out=0, in=180, looseness=3,overlay]{dll} \\
  & \,~H^p(X,\F'') \,~\rar & H^p(X,\F) \rar & \,~H^p(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} \\
  & H^{p+1}(X,\F'') \rar & H^{p+1}(X,\F) \rar & H^{p+1}(X,\F') \ar[out=0, in=180, looseness=3,overlay]{dll} \\
  & {\color{white}{H^{p+1}(X,\F'')}} & \vdots & {\color{white}{H^{p+1}(X,\F')}}
\end{tikzcd}
I'm happy with the width of the diagram and would not like to alter this. However, I would like to 'squash' it vertically so that it takes up half to two thirds of the space it's currently occupying. It would be ideal if this could be done by reducing the space between the rows, but a brute force size reduction would also be much appreciated.

I'd be most appreciative if anyone could provide any help.

Thanks and best wishes,
Jon
Last edited by cgnieder on Thu Apr 18, 2013 8:24 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Rescaling for commutative Diagram

Post by svend_tveskaeg »

(1) Please provide a minimal working example.

(2) I think you have posted the question in the wrong subforum; I would put it in Graphics, Figures & Tables.

(3) Use the code make-up botton Code just above the editing window to highlight the code.

P.S. I don't know TikZ myself, but the chance of getting help increases if you follow my advice.
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Rescaling for commutative Diagram

Post by cgnieder »

svend_tveskaeg wrote:(2) I think you have posted the question in the wrong subforum; I would put it in Graphics, Figures & Tables.
I moved the topic accordingly.
svend_tveskaeg wrote:(3) Use the code make-up botton Code just above the editing window to highlight the code.
I also added code markup.

I agree with Svend regarding the Infominimal working example (MWE). I tried with adding the necessary parts and guessed you used tikz-cd (from the used tikzcd environment mostly) but that still gives undefined control sequences. You would help us help you if you'd completed your code snippet so we can just copy, paste and compile it. Like this maybe:

Code: Select all

\documentclass[12pt]{article}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{tikz-cd}
\def\F{F}% add your definition of \F here

\begin{document}
  \begin{tikzcd}
    0 \rar & \,~H^0(X,\F'')\,~ \rar & H^0(X,\F) \rar & \,~H^0(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} & \\
    & \,~H^1(X,\F'')\,~ \rar & H^1(X,\F) \rar & \,~H^1(X,\F') \,~\ar[out=0, in=180, looseness=3,overlay]{dll} \\
    & {\color{white}{\,~H^1(X,\F'')\,~}} & \vdots & {\color{white}{\,~H^1(X,\F')\,~}} \ar[out=0, in=180, looseness=3,overlay]{dll} \\
    & \,~H^p(X,\F'') \,~\rar & H^p(X,\F) \rar & \,~H^p(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} \\
    & H^{p+1}(X,\F'') \rar & H^{p+1}(X,\F) \rar & H^{p+1}(X,\F') \ar[out=0, in=180, looseness=3,overlay]{dll} \\
    & {\color{white}{H^{p+1}(X,\F'')}} & \vdots & {\color{white}{H^{p+1}(X,\F')}}
  \end{tikzcd}
\end{document}
Regards
site moderator & package author
JonTsu
Posts: 9
Joined: Sun Jan 08, 2012 3:54 pm

Rescaling for commutative Diagram

Post by JonTsu »

Ah, apologies - I realize how unhelpful my question was. Thanks for the LaTeX community pointers, Svend and Clemens. I've included a working example of the code below (I had forgotten that I had defined \F).

Code: Select all

\documentclass[titlepage]{article}
\usepackage{amsmath, amssymb,anysize,graphicx,float,mathrsfs}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\marginsize{2.4 cm}{2.4cm}{1.5cm}{1.5cm}
\usepackage{tikz}
\usetikzlibrary{matrix,arrows,decorations.pathmorphing}
\usepackage{tikz-cd} 
\newcommand{\F}{\mathscr{F}}

\begin{document}
  \begin{figure}[!ht]
    \centering
    \begin{tikzcd}
      0 \rar & \,~H^0(X,\F'')\,~ \rar & H^0(X,\F) \rar & \,~H^0(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} & \\
      & \,~H^1(X,\F'')\,~ \rar & H^1(X,\F) \rar & \,~H^1(X,\F') \,~\ar[out=0, in=180, looseness=3,overlay]{dll} \\
      & {\color{white}{\,~H^1(X,\F'')\,~}}  & \vdots & {\color{white}{\,~H^1(X,\F')\,~}} \ar[out=0, in=180, looseness=3,overlay]{dll} \\
      & \,~H^p(X,\F'') \,~\rar & H^p(X,\F) \rar & \,~H^p(X,\F')\,~ \ar[out=0, in=180, looseness=3,overlay]{dll} \\
      & H^{p+1}(X,\F'') \rar & H^{p+1}(X,\F) \rar & H^{p+1}(X,\F') \ar[out=0, in=180, looseness=3,overlay]{dll} \\
      & {\color{white}{H^{p+1}(X,\F'')}} & \vdots & {\color{white}{H^{p+1}(X,\F')}}
    \end{tikzcd}
  \end{figure}
\end{document}
Thanks for the help,
Jonathan.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Rescaling for commutative Diagram

Post by localghost »

Section 2.1 of the tikz-cd manual suggests to use the row sep key for a corresponding customization.

Just for the record. The anysize package is obsolete. Use geometry instead to set up page and paper dimensions.


Thorsten
JonTsu
Posts: 9
Joined: Sun Jan 08, 2012 3:54 pm

Re: Rescaling for commutative Diagram

Post by JonTsu »

Brilliant! Thanks Thorsten :D
Post Reply