[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-657827-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-657827-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","amscd-how-to-create-commutative-diagrams-with-rectangular-arrows","amscd - How to create commutative diagrams with rectangular arrows","","amscd is a LaTeX package for producing commutative diagrams using only rectangular arrow layouts. It supports plain labelled arrows and equal signs, with automatic stretching so arrow labels fit. The guide explains diagram row rules (alternating horizontal and vertical arrows, ending rows with \\\\) and lists available arrow types. It also covers troubleshooting for mismatched stretching using “phantom” labels or centred shorter labels, and adjusting arrow widths to fit large diagrams on a page.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/amscd-how-to-create-commutative-diagrams-with-rectangular-arrows/657827/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/amscd-how-to-create-commutative-diagrams-with-rectangular-arrows/657827.png","ImageObject",300,407,{"name":42,"@type":43},"notyourbestiee","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-30","2026-10-26",true,{"@type":52,"interactionType":53,"userInteractionCount":30},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What kinds of arrows does amscd support in commutative diagrams?","Question",{"text":62,"@type":63},"It supports plain labelled arrows and equal signs, using a fixed set of arrow types (left, right, up, down, horizontal equals, vertical equals, and an empty arrow).","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What formatting rules must be followed for rows inside the CD diagram environment?",{"text":67,"@type":63},"Rows with horizontal arrows must alternate with rows with vertical arrows, and every row except the last must end with \\\\.",{"name":69,"@type":60,"acceptedAnswer":70},"How can you fix cases where a lower arrow does not stretch to match the upper arrow?",{"text":71,"@type":63},"Add a “phantom” label to the lower arrow (e.g., using \\phantom{...}) so it reserves space and stretches consistently.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},657827,1792991594,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":30,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":26,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":79,"read_time":96},962094243716,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","The amscd package  \nThe American Mathematical Society's package amscd can produce only rectangular diagrams (no diagonal arrows) and supports only plain labelled arrows and equal signs, but its arrows do stretch to match labelsand it is easy to use. Load it with the command \\usepackage{amsmath,amscd}  \nIts syntax is illustrated by the following example:  \nA  \n?  \n? b  \ny  \nC  \na 􀀀􀀀􀀀􀀀! B  \n?  \n? c  \nyd  \n􀀀􀀀􀀀􀀀! D  \n\\begin{CD}  \nA @>a>> B\\\\  \n@VVbV @VVcV\\\\  \nC @>d>> D  \n\\end{CD}  \nRows with horizontal arrows must alternate with those with vertical arrows, and each row except the last must end with \\\\ .  \nThe possible arrows (or their replacements) are:  \n@\u003C\u003C\u003C left arrow @>>> right arrow  \n@AAA up arrow @= horizontal equals  \n@VVV down arrow @| vertical equals  \n@ . empty arrow.  \nTheir use is illustrated by:  \nA 􀀀􀀀􀀀􀀀 B 􀀀􀀀􀀀􀀀! C  \n􀀍 x  \n􀀍 ?  \n􀀍 ?  \nD ~~ ~~ E  \n$\\begin{CD}  \nA @\u003C\u003C\u003C B @>>> C\\\\@ . @| @AAA\\\\  \n@ . D @= E \\end{CD}$  \nItems inserted into the code for the arrows will appear in scriptstyle (the size of sub/superscripts) as labels on the arrows, as illustrated by:  \nA  \n?  \nl ? r  \ny  \nC  \na 􀀀􀀀􀀀􀀀!  \nb  \na  \n􀀀􀀀􀀀􀀀  \nb  \nB  \nx  \nl ? r  \n?  \nD  \n$\\begin{CD}  \nA @>a>b> B\\\\  \n@VlVrV @AlArA\\\\  \nC @\u003Ca\u003Cb\u003C D \\end{CD}$  \nArrows stretch to match long labels:  \nA 􀀀􀀀􀀀􀀀! B  \n? ?  \n? ?  \ny y  \nD 􀀀􀀀􀀀􀀀! E  \nvery long label 􀀀􀀀􀀀􀀀􀀀􀀀􀀀! C  \n?? y  \n􀀀􀀀􀀀􀀀! F  \n$\\begin{CD}  \nA @>>> B@>\\text{very long label}>>C\\\\  \n@VVV @VVV @VVV\\\\  \nD @>>> E@>>> F  \n\\end{CD}$  \nNotice that the lower arrow doesn't stretch to match the upper arrow. To ﬁx this, add a “phantom” label:  \nThis is part of: Guide to Commutative Diagrams, [www.jmilne.org/not/CDGuide.html](www.jmilne.org/not/CDGuide.html)[ ](www.jmilne.org/not/CDGuide.html)August 6, 2011  \nA 􀀀􀀀􀀀􀀀! B  \n? ?  \n? ?  \ny y  \nD 􀀀􀀀􀀀􀀀! E  \nvery long label 􀀀􀀀􀀀􀀀􀀀􀀀􀀀! C  \n?? y  \n􀀀􀀀􀀀􀀀􀀀􀀀􀀀! F  \n$\\begin{CD}  \nA @>>> B @>{\\text{very long label}}>> C \\\\  \n@VVV @VVV @VVV \\\\  \nD @>>> E @>{\\phantom{\\text{very long label}}}>> F \\end{CD}$  \nTo get a shorter label centred on the lower arrow, use the following code:  \n@>{\\rlap{$\\scriptstyle{\\ \\ \\ \\text{shorter}}$}\\phantom{\\text{very long label}}}>>  \nA 􀀀􀀀􀀀􀀀! B  \n? ?  \n? ?  \ny y  \nD 􀀀􀀀􀀀􀀀! E  \nvery long label 􀀀􀀀􀀀􀀀􀀀􀀀􀀀! C  \n?? y  \nshorter 􀀀􀀀􀀀􀀀􀀀􀀀􀀀! F  \nAlternatively, increase the minimum length of a horizontal arrow by replacing the code with \\[\\minCDarrowwidth55pt\\begin{CD} . . .\\end{CD}\\] .  \nvery long label  \nA 􀀀􀀀􀀀􀀀􀀀􀀀􀀀􀀀! B 􀀀􀀀􀀀􀀀􀀀􀀀􀀀􀀀! C  \n? ? ?  \n? ? ?  \ny y y  \nshorter  \nD 􀀀􀀀􀀀􀀀􀀀􀀀􀀀􀀀! E 􀀀􀀀􀀀􀀀􀀀􀀀􀀀􀀀! F  \nThis trick also allows you to shorten arrows if necessary to ﬁt a long diagram onto a page. Amscd doesn't handle large objects or tall labels well:  \nA 􀀀􀀀􀀀􀀀! B  \n? ?  \n? ?  \ny y  \nC 􀀀􀀀􀀀􀀀! D  \nA 􀀂 A 􀀂 A 􀀂 A 􀀂 A  \n?  \n? b  \ny  \nC  \na  \n􀀀􀀀􀀀􀀀!  \nd  \n􀀀􀀀􀀀􀀀!  \nB  \n?  \n? c  \ny  \nD  \nA  \n??  \ny  \nC  \n􀀀􀀀􀀀􀀀! B  \n??  \n  y  \nAAA 􀀀􀀀􀀀􀀀! D  \nTo ﬁx the last problem, add the lines:  \n\\newcommand{\\tlap}[1]{\\vbox to 0pt{\\vss\\hbox{\\#1}}}  \n\\newcommand{\\blap}[1]{\\vbox to 0pt{\\hbox{\\#1}\\vss}} to your document, and then write  \nC@>\\tlap{\\scriptsize$\\overline{A^{A^A}}$}>>D  \nA  \n??  \ny  \nC  \n􀀀􀀀􀀀􀀀! B  \n??  \n  y  \nAAA 􀀀􀀀􀀀􀀀! D  \nSee [http://tex.stackexchange.com/questions/23845/](http://tex.stackexchange.com/questions/23845/ for alternatives)[ for alternatives](http://tex.stackexchange.com/questions/23845/ for alternatives).","cbCaisVpi5u7r73h","https://ap.wps.com/l/cbCaisVpi5u7r73h","pdf",82650,"English","# amscd package overview\n# Installing and loading amscd\n# Syntax rules for CD diagrams\n## Row alternation and line endings\n# Supported arrow types\n# Arrow stretching and labeling\n## Phantom labels to align arrows\n## Centered shorter labels\n# Practical layout adjustments\n## Increasing minimum horizontal arrow width\n## Handling large objects and tall labels","[{\"question\":\"What kinds of arrows does amscd support in commutative diagrams?\",\"answer\":\"It supports plain labelled arrows and equal signs, using a fixed set of arrow types (left, right, up, down, horizontal equals, vertical equals, and an empty arrow).\"},{\"question\":\"What formatting rules must be followed for rows inside the CD diagram environment?\",\"answer\":\"Rows with horizontal arrows must alternate with rows with vertical arrows, and every row except the last must end with \\\\\\\\.\"},{\"question\":\"How can you fix cases where a lower arrow does not stretch to match the upper arrow?\",\"answer\":\"Add a “phantom” label to the lower arrow (e.g., using \\\\phantom{...}) so it reserves space and stretches consistently.\"}]","amscd - How to create commutative diagrams with rectangular arrows | PDF"]