I would like to print a code in my document in the format that is very common to see online in many websites like this:    But when I try to compile, a fatal error occurs. The problem is in the command to print some text inside the square aligned to the left...  \documentclass[a4paper, 11pt]{article} \usepackage{lipsum} %This package just generates Lorem Ipsum filler text.  \usepackage{fullpage} % changes the margin \usepackage[utf8]{inputenc} \usepackage{array} \usepackage{gensymb} \usepackage{graphicx} \usepackage{mwe} \usepackage{indentfirst} \usepackage[dvipsnames]{xcolor} \usepackage{tikz}                           \usetikzlibrary{shapes.geometric, arrows, shapes.arrows,decorations.pathmorphing, matrix,chains,scopes,positioning,fit,shapes.gates.logic.US, shapes.gates.logic.IEC, calc, decorations.markings,arrows.meta,bending} \usepackage{courier}  \definecolor{red}{HTML}{FF0000} \definecolor{blue}{HTML}{0000FF} \definecolor{lavender}{HTML}{E6E6FA} \definecolor{lightgray}{HTML}{D3D3D3}  \begin{document} \begin{tikzpicture} \fill[lavender, draw=lightgray] (0,0.2) rectangle (14,3.8); \node at (-0.25,6*4/7) {1}; \node at (-0.25,5*4/7) {2}; \node at (-0.25,4*4/7) {3}; \node at (-0.25,3*4/7) {4}; \node at (-0.25,2*4/7) {5}; \node at (-0.25,1*4/7) {6};  %\node at (2.5,6*4/7) {\texttt{\#include $&lt;$iostream$&gt;$}}; %\node at (2.3,5*4/7) {\texttt{\#include $&lt;$string$&gt;$}}; %\node at (2.2,4*4/7) {\texttt{\#include "math.h"}}; %\node at (2.6,3*4/7) {\texttt{using namespace std;}}; %\node at (1.7,1*4/7) {\texttt{int main ()\{ }};  \draw (0.25, 0.25) node[above left, align=left]  {\texttt{\#include $&lt;$iostream$&gt;$}\par \texttt{\#include $&lt;$string$&gt;$} \par \texttt{\#include "math.h"} \par \texttt{using namespace std;} \par \par \texttt{int main()}};  \end{tikzpicture} \end{document}   With the commands in commentary in the above code, the output is like the bigger picture attached. However, If I do this way, I have to adjust the horizontal space for each line I might add in the program.  (If someone also knows how can I make the letters darker(not bold) it would very good!)
122171
I'm participating in a programming contest and we are allowed to prepare a team reference document which must not exceed 25 pages. Typically we will prepare many code templates and this year I'm trying to use latex to typeset these C++ codes and I want to know what's the best way to do that.  Some requirements:   Since there is a page length limit I want to typeset my codes as compact as possible. I want to have the C++ codes syntax highlighted. If it is possible to generate a compact table of content in front, it would be best.
66183
I have a string that represents a non indented XML that I would like to pretty-print. For example:  &lt;root&gt;&lt;node/&gt;&lt;/root&gt;   should become:  &lt;root&gt;   &lt;node/&gt; &lt;/root&gt;   Syntax highlighting is not a requirement. To tackle the problem I first transform the XML to add carriage returns and white spaces and then use a  tag to output the XML. To add new lines and white spaces I wrote the following function:   function formatXml(xml) {     var formatted = '';     var reg = /(&gt;)(&lt;)(\/*)/g;     xml = xml.replace(reg, '$1\r\n$2$3');     var pad = 0;     jQuery.each(xml.split('\r\n'), function(index, node) {         var indent = 0;         if (node.match( /.+&lt;\/\w[^&gt;]*&gt;$/ )) {             indent = 0;         } else if (node.match( /^&lt;\/\w/ )) {             if (pad != 0) {                 pad -= 1;             }         } else if (node.match( /^&lt;\w[^&gt;]*[^\/]&gt;.*$/ )) {             indent = 1;         } else {             indent = 0;         }          var padding = '';         for (var i = 0; i &lt; pad; i++) {             padding += '  ';         }          formatted += padding + node + '\r\n';         pad += indent;     });      return formatted; }   I then call the function like this:  jQuery('pre.formatted-xml').text(formatXml('&lt;root&gt;&lt;node1/&gt;&lt;/root&gt;'));   This works perfectly fine for me but while I was writing the previous function I thought that there must be a better way. So my question is do you know of any better way given an XML string to pretty-print it in an html page? Any javascript frameworks and/or plugins that could do the job are welcome. My only requirement is this to be done on the client side.
101832
I have code that i have included into my document using the texcode below  \begin{minipage}{.48\textwidth} \centering \lstinputlisting[numbers=left,xleftmargin=2em,frame=single,framexleftmargin=2em, breaklines]{codesamples/example2.py} \caption{Modified \soc\ for R, R' \label{R'}} \end{minipage}   I would like to highlight some of the lines in the output. Is this possible?
118769
I am looking for a LaTeX package that does syntax highlighting on code. For example, right now I use the verbatim block to write code:  \begin{verbatim}     &lt;html&gt;        &lt;head&gt;            &lt;title&gt;Hello&lt;/title&gt;        &lt;/head&gt;        &lt;body&gt;Hello&lt;/body&gt;     &lt;/html&gt; \end{verbatim}   And this works fine to display the code on my document. But, suppose I wanted to highlight the HTML markup the way an IDE would in the output document? Is there a package that could help?  I would like to do the same for various languages such as Java, C#, HTML, CSS and so on.
119693
I'm trying to create a fine flowchart that is a bit complicated. Therefore I need a block for a predefined process and a connector block as well as a data block. Can someone help me? In comment is what I'd like to see in my code to keep my code nicely arranged. The rest of the code is a simple example for the Tikz site.  \documentclass{article}  \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \pagestyle{empty}   % Define block styles \tikzstyle{decision} = [diamond, draw, fill=blue!20,      text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt] \tikzstyle{block} = [rectangle, draw, fill=blue!20,      text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex'] \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,     minimum height=2em]  %\tikzstyle{subroutine} = [draw,rectangle split, rectangle split         horizontal,rectangle split parts=3,minimum height=1cm]  %\tikzstyle{connector} = [draw,circle,...] %\tikzstyle{data} = [draw, trapezium, ...]  \begin{tikzpicture}[node distance = 2cm, auto]     % Place nodes     \node [block] (init) {initialize model};     \node [cloud, left of=init] (expert) {expert};     \node [cloud, right of=init] (system) {system};     \node [block, below of=init] (identify) {identify candidate models};     \node [block, below of=identify] (evaluate) {evaluate candidate models};     \node [block, left of=evaluate, node distance=3cm] (update) {update     model};     \node [decision, below of=evaluate] (decide) {is best candidate     better?};     \node [block, below of=decide, node distance=3cm] (stop) {stop};     % Draw edges     \path [line] (init) -- (identify);     \path [line] (identify) -- (evaluate);     \path [line] (evaluate) -- (decide);     \path [line] (decide) -| node [near start] {yes} (update);     \path [line] (update) |- (identify);     \path [line] (decide) -- node {no}(stop);     \path [line,dashed] (expert) -- (init);     \path [line,dashed] (system) -- (init);     \path [line,dashed] (system) |- (evaluate); \end{tikzpicture}   \end{document}
32802
My .tex file:  \documentclass[a4paper,twoside,portrait,12pt,openright,final,pdflatex]{report} \usepackage[bindingoffset=8mm]{geometry} \usepackage[T1]{fontenc} \usepackage{arabtex} \usepackage{utf8} \usepackage{graphicx} \usepackage{float}  \usepackage{caption} \captionsetup{font=small,labelfont=bf} \setcounter{secnumdepth}{3} \usepackage{fixltx2e}  \usepackage{paralist}  \usepackage{hyperref} \hypersetup{pdftex,linktocpage=true,bookmarks=true,colorlinks=true,citecolor=blue,filecolor=black,linkcolor=blue,urlcolor=black,pdfauthor={Ayman Elmasry},pdftitle={Algorithmic Form Generation: A Thermal Building Envelope Design Approach}} \usepackage[all]{hypcap} \usepackage{lipsum}  \begin{document}  \lipsum[1-20]  \end{document}   I compile with pdflatex, and I get this error:  (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption.sty (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption3.sty Runaway argument? {\caption@CheckCommand \@makecaption {\long \def \@makecaption ##1##2\ETC. ! Paragraph ended before \@gobble was complete. &lt;to be read again&gt;                     \par  l.901         \unskip\kern-2\captionindent\par   When I comment out:  %\usepackage{caption} %\captionsetup{font=small,labelfont=bf}   ... I get an output PDF file with no problems.
43938
The folowing code works correctly inside Texlipse together with Miktex 2.9 x64. The tikzexternalize option is used to speed up the compilation process, just make sure the  mode is enables exclicitly passing the -shell-escape argument to the compiler.  \documentclass{article}  \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix=figures/]  \begin{document}  \begin{tikzpicture} \node[draw, circle, minimum width=1cm] {}; \end{tikzpicture}     \end{document}   Now, when the article class is replaced by the abntex2 class as the following code, the pdf file is not generated inside figures folder any longer.  \documentclass[     % -- opções da classe memoir --     12pt,               % tamanho da fonte     openright,          % capítulos começam em pág ímpar (insere página vazia caso     % preciso)     twoside,            % para impressão em verso e anverso. Oposto a oneside     a4paper,            % tamanho do papel.     % -- opções da classe abntex2 --     %chapter=TITLE,     % títulos de capítulos convertidos em letras maiúsculas     %section=TITLE,     % títulos de seções convertidos em letras maiúsculas     %subsection=TITLE,  % títulos de subseções convertidos em letras maiúsculas     %subsubsection=TITLE,% títulos de subsubseções convertidos em letras maiúsculas     % -- opções do pacote babel --     english,            % idioma adicional para hifenização     french,             % idioma adicional para hifenização     spanish,            % idioma adicional para hifenização     brazil              % o último idioma é o principal do documento     ]{abntex2}  \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize[prefix=figures/]  \begin{document}  \begin{tikzpicture} \node[draw, circle, minimum width=1cm] {}; \end{tikzpicture}  \end{document}   Then the console shows the following information where the main tex file name is DissDaniel.tex:  pdflatex.exe&gt; ===== 'mode=convert with system call': Invoking 'pdflatex -shell-escape -halt-o pdflatex.exe&gt; n-error -interaction=batchmode -jobname "figures/DissDaniel-figure0" "\def\tikz pdflatex.exe&gt; externalrealjob{DissDaniel}\input{DissDaniel}"' ======== pdflatex.exe&gt;  pdflatex.exe&gt; ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-e pdflatex.exe&gt; rror -interaction=batchmode -jobname "figures/DissDaniel-figure0" "\def\tikzext pdflatex.exe&gt; ernalrealjob{DissDaniel}\input{DissDaniel}"' did NOT result in a usable output  pdflatex.exe&gt; file 'figures/DissDaniel-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Plea pdflatex.exe&gt; se verify that you have enabled system calls. For pdflatex, this is 'pdflatex - pdflatex.exe&gt; shell-escape'. Sometimes it is also named 'write 18' or something like that. Or pdflatex.exe&gt;  maybe the command simply failed? Error messages can be found in 'figures/DissD pdflatex.exe&gt; aniel-figure0.log'. If you continue now, I'll try to typeset the picture. pdflatex.exe&gt;  pdflatex.exe&gt; See the tikz package documentation for explanation. pdflatex.exe&gt; Type  H &lt;return&gt;  for immediate help. pdflatex.exe&gt;  ...                                               pdflatex.exe&gt;                                                    pdflatex.exe&gt; l.32 \end{tikzpicture}
111573
I am using Tikz code from  and everything have been working very well.  When I added some verbatim text at the end, now I get this error from lualtex  Package microtype Warning: Unknown slot number of character (microtype)                `\textgreater ' (microtype)                in font encoding `TU' in protrusion list (microtype)                `T1-default'.   ! Package tikz Error: Sorry, some package has redefined the meaning of the math -mode dollar sign. This is incompatible with tikz and its calc library and migh t cause unrecoverable errors.  See the tikz package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                 I spend alot of time trying to make MWE. But it seems to be random. If I make the code smaller, or move verbatim to top of file, the error goes away. If I remove geometry package, error goes away. I even removed one blank line in random location, and error went away.    I looked at   and followed link to  and tried the fix given there but that did not remove the error:    So I am not sure what to do now. I'd like to keep the tikz code, which shows the line numbers. But I also want to add verbatim.  The smallest Latex file I can show is 150 lines long. This causes the error. I can post a link to the file, since it is long? Or I can paste here also? Will do in few minutes...  I am using TexLive 2016, on Linux mint. On windows, using Miktex 9. Both give same error.  End of log file is:   Package tikz Error: Sorry, some package has redefined the meaning of the math -mode dollar sign. This is incompatible with tikz and its calc library and migh t cause unrecoverable errors.  See the tikz package documentation for explanation. Type  H &lt;return&gt;  for immediate help.  ...                                                l.26 \end{verbatim}  Here is how much of LuaTeX's memory you used:  12117 strings out of 494611  100000,319454 words of node,token memory allocated 2441 words of node memory still in use:    15 hlist, 1 vlist, 3 rule, 4 local_par, 4 dir, 101 glue, 8 kern, 44 penalty,  150 glyph, 25 attribute, 48 glue_spec, 25 attribute_list, 4 temp, 4 if_stack, 1  write, 5 pdf_literal, 3 pdf_colorstack nodes    avail lists: 2:6,3:1,4:1,8:1,9:1  15679 multiletter control sequences out of 65536+600000  17 fonts using 981063 bytes  55i,3n,54p,401b,458s stack positions out of 5000i,500n,10000p,90000000b,100000s  warning  (pdf backend): no pages of output.  PDF statistics: 3 PDF objects out of 1000 (max. 8388607)  0 named destinations out of 1000 (max. 131072)  1 words of extra memory for PDF output out of 10000 (max. 10000000)   Listing  Thanks to TorbjørnT help in chat, he was able to make even smaller MWE that shows the error. Here it is  \documentclass[12pt,letterpaper]{article}% \usepackage[margin=1.1in]{geometry} \usepackage{tikz,everypage} \AtBeginDocument{%   \AddEverypageHook{%     \small     \begin{tikzpicture}[remember picture,overlay]             \path (current page.north west) --  (current page.south west)              \foreach \i in {1,...,\fakelinenos}                 { node [pos={(\i-.5)/\fakelinenos},                    xshift=\fakelinenoshift, line number style] {\i} }  ;     \end{tikzpicture}%   }% }  \tikzset{%   line numbers/.store in=\fakelinenos,   line numbers=72,   line number shift/.store in=\fakelinenoshift,   line number shift=5mm,   line number style/.style={text=gray}, }  \begin{document} \vspace*{20cm} \begin{verbatim} data1 = makeTable[0.01, 0, 2, 0]; At one second, using h=0.01 speed is 16.078 at step n = 100 At 2 seconds, using h=0.01 speed is 19.206 at step n = 200 data2 = makeTable[0.005, 0, 2, 0]; At one second, using h=0.005 speed is 16.02 at step n = 200 At 2 seconds, using h=0.005 speed is 19.195 at step n = 400 \end{verbatim} \end{document}
60148
Recently,I found the code that cotains the"~\\" and blank line always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"  \documentclass{ctexart} \usepackage{color} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} \hfuzz=\maxdimen   $(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\\  $|(A^*)^*|=|A|^{n^2-2 n+1}$~\\  \end {document}   I add the code:  \tolerance=10000 \hbadness=10000 \begin{document}   However,fail to solve it!
100908
As pointed out in  it is possible to create a link in formatted code. But, only by using explicit HTML. Since I think creating a link to documentation within a code block is a fairly common use case, it should be possible to do this using the GUI.   I should be able to highlight some code. Press the  code formatting button. Then highlight some code within that and press the link button and create a link.  Today this results in:  [parseInt][3]("01", 10);   it should result in:  ("01",10);
30263
I just read a book "Linear Algebra and Its Applications 4E" by David C. Lay. The book is (should be) LaTeX typeset. The matrix and equations are so nice, please see the following 3 examples:        It's so beautiful, so I want get the same effect inside my paper. Here is my code:   \usepackage{amsmath} \usepackage{colortbl} \newcommand\y{\cellcolor{clight2}} \definecolor{clight2}{RGB}{212, 237, 244}%  %%% \[A=\left[ \begin{array}{ccccc} \y 0 &amp; -3 &amp; -6 &amp; 4 &amp; 9 \\    -1 &amp; \y -2 &amp; -1 &amp; 3 &amp; 1 \\ -2 &amp; -3 &amp; 0 &amp; \y 3 &amp; -1 \\ 1 &amp; 4 &amp; 5 &amp; -9 &amp; -7      \end{array} \right]\]  \[A=\left[\begin{array}{cccccc} \rowcolor{clight2} 3 &amp; -9 &amp; 12 &amp; -9 &amp; 6 &amp; 15\\ 0 &amp; 2 &amp; -4 &amp; 4 &amp; 2 &amp; -6 \\ 0 &amp; 3 &amp; -6 &amp; 6 &amp; 4 &amp; -5 \end{array} \right]\]   And the result:     But how to add these arrows??
113508
I've been creating a flow chart using the template I found here:    Please see the code below:  \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} % Define block styles \tikzstyle{decision} = [diamond, draw, fill=blue!20,      text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt] \tikzstyle{block} = [rectangle, draw, fill=blue!20,      text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex'] \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,     minimum height=2em] \begin{document} \begin{tikzpicture}[node distance = 2cm, auto]     % Place nodes          \node [cloud] (a) {a};         \node [block, right of = a, node distance =5cm] (b) {b};         \node [decision, below of = b] (c) {c};         \node [block, below of = c, node distance = 3cm] (d) {d};         \node [decision, below of = d, node distance = 3.2cm] (e) {e};         \node [block, right of = e, node distance = 3.2cm] (f) {f};         \node [decision, below of = e] (g) {g};         \node [block, left of = g, node distance = 3.2cm] (h) {h};         \node [decision, below of = g, node distance = 3.5cm] (i) {i};         \node [block, left of = i, node distance = 3.2cm] (j) {j};         \node [block, right of = i, node distance = 3.5cm] (k) {k};      % Draw edges     \path [line] (a) -- (b);     \path [line] (b) -- (b);     \path [line] (b) -- node [near start] {yes} (d);     \path [line] (d) -- (e);     \path [line] (e) -- node [near start] {no} (f);     \path [line] (f) |- (b);     \path [line] (e) -- node [near start] {yes} (g);     \path [line] (g) -- node [near start] {no} (h);     \path [line] (h) |- (e);     \path [line] (g) -- node [near start] {yes} (i);     \path [line] (i) -- node [near start] {yes} (j);     \path [line] (j) -- (h);     \path [line] (i) -- node [near start] {no} (k);     \path [line] (k) -| (h); \end{tikzpicture} \end{document}   How can I create an arrow from k to h that doesn't intersect any of the other boxes or arrows?
71738
Hi I am wondering what code is used to get text above the $\rightarrow$   have tried $ \xrightarrow{P}$ but not running on my LaTeX as I do not know which package to install or how to install it.   currently using \usepackage{mathtools} but it wants to load from a random directory and then LaTeX stops working.
77934
I would like to create a TikZ style that adds a thick outline to the node text using the \contour{&lt;colour&gt;}{&lt;text&gt;} macro from the contour package (as in the answer to the question ), i.e. I want to define a style halo so that  \node [halo] {Text};   is equivalent to  \node {\contour{red}{Text}};   My problem is that I cannot tell TikZ to use the node text as an argument for a macro.  The font option only works with switches like \itshape (as opposed to \textit{}, which requires the text to be italicised to be provided in the argument).  There are two keys execute at begin node={&lt;code&gt;} and execute at end node={&lt;code&gt;} that can be used to call code at the beginning and end of the node, but I can't split the \contour command up using execute at begin node={\contour{red{} and execute at end node={}} because the brackets don't match. Replacing { with \bgroup and } with \egroup fails with Missing } inserted.  Here's am MWE to play with:  \documentclass{article}  \usepackage{tikz} \usepackage[outline]{contour} \contourlength{1.2pt}   \begin{document}      \begin{tikzpicture}     \node {\contour{red}{Text}}; %    \node [font=\contour{red}{}] {Text}; % Doesn't change the text %    \node [execute at begin node={\contour{red}{},execute at end node={}}] {Text};  % Fails with ``Runaway argument?'' %    \node [execute at begin node={\contour{red}\bgroup},execute at end node={\egroup}] {Text};  % Fails with ``Missing } inserted''     \end{tikzpicture} \end{document}
51164
I'm trying to write the following matrices.    I used the following code (given by )  \documentclass{article} % Load TikZ \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing,calc} % Set various styles for the matrices and braces. It might pay off to fiddle around     with the values a little bit  \pgfkeys{tikz/mymatrixenv/.style={decoration=brace,every left delimiter/.style=    {xshift=3pt},every right delimiter/.style={xshift=-3pt}}}  \pgfkeys{tikz/mymatrix/.style={matrix of math nodes,left delimiter=[,right delimiter=    {]},inner sep=2pt,column sep=1em,row sep=0.5em,nodes={inner sep=0pt}}}  \pgfkeys{tikz/mymatrixbrace/.style={decorate,thick}}  \newcommand\mymatrixbraceoffseth{0.5em}  \newcommand\mymatrixbraceoffsetv{0.2em}  % Now the commands to produce the braces. (I'll explain below how to use them.) \newcommand*\mymatrixbraceright[4][m]{ \draw[mymatrixbrace] ($(#1.north west)!(#1-#3-1.south west)!(#1.south west)-    (\mymatrixbraceoffseth,0)$)     -- node[left=2pt] {#4}      ($(#1.north west)!(#1-#2-1.north west)!(#1.south west)-(\mymatrixbraceoffseth,0)$); }  \newcommand*\mymatrixbraceleft[4][m]{  \draw[mymatrixbrace] ($(#1.north east)!(#1-#2-1.north east)!(#1.south east)+    (\mymatrixbraceoffseth,0)$)     -- node[right=2pt] {#4}       ($(#1.north east)!(#1-#3-1.south east)!(#1.south east)+    (\mymatrixbraceoffseth,0)$); } \newcommand*\mymatrixbracetop[4][m]{ \draw[mymatrixbrace] ($(#1.north west)!(#1-1-#2.north west)!(#1.north east)+(0,\mymatrixbraceoffsetv)$)     -- node[above=2pt] {#4}      ($(#1.north west)!(#1-1-#3.north east)!(#1.north east)+(0,\mymatrixbraceoffsetv)$); } \newcommand*\mymatrixbracebottom[4][m]{ \draw[mymatrixbrace] ($(#1.south west)!(#1-1-#3.south east)!(#1.south east)-(0,\mymatrixbraceoffsetv)$)     -- node[below=2pt] {#4}      ($(#1.south west)!(#1-1-#2.south west)!(#1.south east)-(0,\mymatrixbraceoffsetv)$); }  \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing}  \begin{document}    \[  \begin{tikzpicture}[mymatrixenv]  \matrix[mymatrix] (m)  {     a &amp; b &amp; c &amp; d &amp; e &amp; f \\     g &amp; h &amp; i &amp; j &amp; k &amp; l\\     l &amp; m &amp; n &amp; o &amp; p &amp; o \\     \hline \\     q &amp; r &amp; s &amp; t &amp; u &amp; v \\     w &amp; x &amp; y &amp; z &amp; a &amp; b \\     c &amp; d &amp; e &amp; f &amp; g &amp; h \\   };   \mymatrixbraceright{1}{3}{$E_1$}   \mymatrixbraceright{5}{7}{$E_2$}   \mymatrixbracetop{1}{3}{$E_1$}   \mymatrixbracetop{4}{6}{$E_2$} \end{tikzpicture} \]  \end{document}     It's really nice but still it doesn't serve my purpose. Any help in this regard will be highly appreciated. Thanks
91530
I have the following code.  \documentclass[a4paper,twoside,12pt]{article}  \usepackage[T1]{fontenc} \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{pgfplotstable}  \definecolor{color1}{rgb}{0.98, 0.81, 0.69} \definecolor{color2}{rgb}{0.55, 0.71, 0.0} \definecolor{color3}{rgb}{1.0, 0.6, 0.4} \definecolor{color4}{rgb}{0.29, 0.59, 0.82}  \pgfplotscreateplotcyclelist{mycolor}{ {fill=color1!80, draw=color1}, {fill=color2!80, draw=color2}, {fill=color3!80, draw=color3}, {fill=color4!80, draw=color4}, }  \begin{filecontents*}{coefficienti.dat} T       K       Q       Kf      n 400     0.0463  32.9        5.78        0.321 500     0.124   24.8        6.30        0.275 600     0.115   24.6        6.30        0.261 700     1.64        24.4        11.9        0.151 \end{filecontents*}  \begin{document}  \begin{tikzpicture}     \begin{axis} [         ymin=0,         ybar=0, bar width=20, bar shift=0,         xtick={1,2,3,4},         xticklabels from table={coefficienti.dat}{T},         ymajorgrids=true,         cycle list name=mycolor,         nodes near coords,         every node near coord/.append style = {             /pgf/number format/.cd,             fixed,             fixed zerofill,             precision=3         }]         \addplot table [x=T,y=K] {coefficienti.dat};     \end{axis} \end{tikzpicture}  \end{document}   The result is the following graph (don't care about the color, I know it's horrible).     I would like that each bar has a different color from the list mycolor. How can I do? In the x axis I would like to put the values of the column T of the table coefficienti.dat. How can I do?
56342
When compiling a document using my university's thesis class file and the TikZ package I receive an error message (missing number, treated as zero). Would someone know how I can solve this problem?   \documentclass[phd,bottom,nosig]{usbthesis} \usepackage{tikz} \begin{document} Test 1-2-3 \end{document}   The class file can be found here: