[Tex/LaTex] What does ! You can’t use `\raise’ in vertical mode. mean

errorsraisevertical alignment

I am trying to use latex to layout some cards. I'm using two files. The first is a static file that defines the basic layout card.tex:

\documentclass[11pt,letterpaper,landscape]{memoir}

\pagestyle{empty}
\setlength{\textwidth}{9in}
\setlength{\hoffset}{0in}
\setlength{\voffset}{0in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\textheight}{8in}
\setlength{\topmargin}{-1.75in}

\usepackage{pstricks}
\usepackage{pst-barcode}

\begin{document}
\setlength{\unitlength}{1in}
\input{uuid.tex}
\end{document}

The second file is called uuid.tex and, as you can see, is referred to in card.tex. The file is generated from a database and looks like:

\newpage{
\put(0,0.0){
\iffalse halcon.gaming.library.Copy : 1090 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{431ab17c-49c2-4601-86a3-cc464cd34aca}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Risk: Lord of the Rings}
\put(0, -0.50){Brian Crocker}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1091 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{b168d7b0-91b2-4b07-a13c-cdc728ce857b}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Risk: Lord of the Rings}
\put(0, -0.50){Hal-Con}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1078 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{a9f43129-b534-41e6-82a3-8cd12b6926a3}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Legendary}
\put(0, -0.50){Cliff Emberley}
\end{picture}
}
\put(0,4.0){
\iffalse halcon.gaming.library.Copy : 1084 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{89628689-9411-4fcd-bd1c-accd506d1ae3}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Werewolves of Millers Hollow}
\put(0, -0.50){Cliff Emberley}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1096 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{1912b126-838f-4046-a21b-f6335ddcc5a1}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Ticket To Ride Collector's Edition}
\put(0, -0.50){Hal-Con}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1051 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{f1875abb-dd7e-43e4-a019-7873b2003fa8}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Santiago de Cuba}
\put(0, -0.50){Jason Smith}
\end{picture}
}
}
\newpage{
\put(0,0.0){
\iffalse halcon.gaming.library.Copy : 1080 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{3d10f9f3-5a6a-4b93-b66f-1ef4561c2a64}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Lanterns}
\put(0, -0.50){Kate Thompson}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1092 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{64fa45bf-d870-47d0-aa13-d88e2b45ed7a}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){The Simpsons Monopoly}
\put(0, -0.50){Hal-Con}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1093 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{3831ee1f-8141-4b20-a559-7df1074df80f}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){The Good, The Bad and the Munchkin}
\put(0, -0.50){Cliff Emberley}
\end{picture}
}
\put(0,4.0){
\iffalse halcon.gaming.library.Copy : 1052 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{06ab5896-ca47-44aa-afb4-d01f21835221}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Pairs}
\put(0, -0.50){Jason Smith}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1089 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{5f35b997-5078-40a8-a37d-1a773e8bf0e1}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Qwirkle}
\put(0, -0.50){Brian Crocker}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1049 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{222c4f71-5863-4627-ab26-5150db61b9aa}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Spyfall}
\put(0, -0.50){Jason Smith}
\end{picture}
}
}
\newpage{
\put(0,0.0){
\iffalse halcon.gaming.library.Copy : 1047 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{69710db9-c4f2-44b3-b1e0-2f811cef6fd6}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Jaipur}
\put(0, -0.50){Jason Smith}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1087 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{c3d07754-247f-4bd0-be5d-6db0b5ff0bc4}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Takenoko}
\put(0, -0.50){Jennifer Lambe}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1045 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{325514b0-f190-49da-9323-ae146564fb85}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Android: Netrunner}
\put(0, -0.50){Jason Smith}
\end{picture}
}
\put(0,4.0){
\iffalse halcon.gaming.library.Copy : 1079 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{470168f0-549c-4986-a9c9-3886867ae4c0}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Bang! Heroes of the Storm}
\put(0, -0.50){Cliff Emberley}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1095 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{51f2a3ff-a9bf-4568-92e3-47dc432860d6}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Munchkin Fu}
\put(0, -0.50){Cliff Emberley}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1046 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{b9d83641-e29c-4850-9a0b-abecbe3ab72c}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){D&D: Castle Ravenloft}
\put(0, -0.50){Jason Smith}
\end{picture}
}
}
\newpage{
\put(0,0.0){
\iffalse halcon.gaming.library.Copy : 1081 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{f7e1568b-9eb8-4e41-91ea-194fa173b80c}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Rink Ratz}
\put(0, -0.50){Hal-Con}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1050 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{72f50795-392a-4edf-a250-c03043efdd5e}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Lost Cities}
\put(0, -0.50){Jason Smith}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1083 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{dda467a8-ad7e-4a30-9968-1e9309ec2911}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Epic Spell Wars of the Battle Wizards: Duel at Mt. Skullzfyre}
\put(0, -0.50){Cliff Emberley}
\end{picture}
}
\put(0,4.0){
\iffalse halcon.gaming.library.Copy : 1048 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{80b4ccf1-3d42-46a7-9772-2141a35d2b7d}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Kittens in the Blender}
\put(0, -0.50){Jason Smith}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1086 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{92e98c56-0d00-4241-9e24-dda81a8167be}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Tokaido}
\put(0, -0.50){Jennifer Lambe}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1094 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{b25b27c4-149e-4702-afcc-355df227214f}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Munchkin Legends}
\put(0, -0.50){Cliff Emberley}
\end{picture}
}
}
\newpage{
\put(0,0.0){
\iffalse halcon.gaming.library.Copy : 1088 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{c6264dea-291c-44b0-85cc-0139de221ccb}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Mille Bornes}
\put(0, -0.50){Brian Crocker}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1085 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{cce91282-97d0-47d2-a0e7-c5adbb3bea19}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Red Dragon Inn 5: Character Trove}
\put(0, -0.50){Cliff Emberley}
\end{picture}
\iffalse halcon.gaming.library.Copy : 1082 \fi
\begin{picture}(3.0,4.0)(0,-0.4375)
\psbarcode{d4bae0f1-182f-4272-8c18-6c39014dce08}{eclevel=L width=2.5 height=2.5}{qrcode}
\put(0, -0.25){Supernatural Clue}
\put(0, -0.50){Hal-Con}
\end{picture}
}
\put(0,4.0){
}
}

I am not using \raise, and I don't know what vertical mode is, but I'm getting the following error:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)
 restricted \write18 enabled.
entering extended mode
(./card.tex
LaTeX2e <2011/06/27>
Babel <3.9h> and hyphenation patterns for 2 languages loaded.
(/usr/share/texlive/texmf-dist/tex/latex/memoir/memoir.cls
Document Class: memoir 2013/05/30 v3.7b configurable book, report, article docu
ment class
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)
(/usr/share/texlive/texmf-dist/tex/latex/memoir/mem11.clo)
(/usr/share/texlive/texmf-dist/tex/latex/memoir/mempatch.sty))
(/usr/share/texlive/texmf-dist/tex/latex/pstricks/pstricks.sty
(/usr/share/texlive/texmf-dist/tex/generic/pstricks/pstricks.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/share/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
(/usr/share/texmf/tex/generic/pgf/utilities/pgfutil-common.tex)
(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex
(/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex))
(/usr/share/texmf/tex/generic/pgf/utilities/pgffor.code.tex)
`PSTricks' v2.51  <2014/02/03> (tvz)
(/usr/share/texlive/texmf-dist/tex/generic/pstricks/pstricks.con))
(/usr/share/texlive/texmf-dist/tex/generic/pstricks/pst-fp.tex)
(/usr/share/texmf/tex/latex/xcolor/xcolor.sty
(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)
(/usr/share/texlive/texmf-dist/tex/latex/graphics/dvips.def)))
(/usr/share/texlive/texmf-dist/tex/latex/pst-barcode/pst-barcode.sty
(/usr/share/texlive/texmf-dist/tex/generic/pst-barcode/pst-barcode.tex
`PST-barcode' v0.12, 2013/10/26 (tb,hv))) (./card.aux) (./uuid.tex
! You can't use `\raise' in vertical mode.
\put (#1,#2)#3->\@killglue \raise 
                                  #2\unitlength \hb@xt@ \z@ {\kern #1\unitle...
l.21 }

Best Answer

vertical mode is the mode when tex is stacking things vertically, so in latex that is mostly between paragraphs., as opposed to horizontal mode when tex is laying things side by side such as within a paragraph.

\raise is a tex primitive that causes its argument to be typeset raised by a specified amount, and it cant be used in vertical mode. Mostly in latex this is used in the implementation of \raisebox but also picture mode commands.

The actual error comes from \put which should only be used in a picture environment but here has been used outside.