Posts

How to move tikzpicture with named nodes?

Image
Clash Royale CLAN TAG #URR8PPP up vote 2 down vote favorite I am trying to position an image with rounded corners to a specific position on screen. However, according to the following post, yshift and xshift do not affect nodes that are named and I am still a bit confused on how to use the ++ and if this is the best approach. Take my current situation: documentclassarticle usepackage[utf8]inputenc usepackagegraphicx usepackagetikz usepackage[a4paper,top=3cm, bottom=3cm, left=2cm, right=2cm]geometry begindocument begintikzpicture beginscope clip [rounded corners=0.7cm] (0,0) rectangle coordinate (centerpoint) (4,4.0cm); node [inner sep=0pt] at (centerpoint) includegraphics[width=4.0cm]dogesmall.jpg; draw[line width=0.08cm,rounded corners=0.7cm] (0,0) rectangle (4,4.0cm); endscope endtikzpicture enddocument (Where "dogesmall.jpg" is my current image) This produces a result that places the image in the upper left hand corner, as defined by the margins. Howev...

Define an active character inside a definition

Image
Clash Royale CLAN TAG #URR8PPP up vote 2 down vote favorite deftestcatcode`!=active def!test Of course the above code would not work because nothing is executed when TeX is reading the replacement text of a macro definition. ! gets catcode 12 anyway. I've tried a search on this site and someone suggested using scantokens . As far as I know, scantokens is an expandable command which reads the following token list, stores it in a pseudo-file and then inputs it, so the tokens get re-tokenized according to the new catcodes. However, the following code still fails and I can't figure out why. deftestcatcode`!=active scantokensdef!test test I get the error of "runaway definition". macros tex-core e-tex share | improve this question edited 9 mins ago Joseph Wright ♦ 197k 21 544 863 asked 2 hours ago user5938 128 6 add a comment  |  up vote 2 down vote favorite deftestcatcode`!=ac...