Tag Info

New answers tagged

1

Anyway, here is a robust work-around. Perhaps someone else can figure out how to make a version of \widthof that will work in the Tikz parm parser. \documentclass{article} \usepackage{tikz} \newlength{\pgfcalcparm} \newcommand{\widthof}[1]% #1 = text {\pgftext{\settowidth{\global\pgfcalcparm}{#1}}% \the\pgfcalcparm} \begin{document} \begin{tikzpicture} ...


0

This is not reproducible with your example. However, there are certain tasks that require a matrix inversion behind the scenes at the engine level and that can trip up the math overflow. \def\MATRIXaa{1} \def\MATRIXba{2e-17} \def\MATRIXbb{1} \def\MATRIXab{0} \tikzset{my cm/.style={cm/.expanded={\MATRIXaa,\MATRIXba,\MATRIXab,\MATRIXbb,(0,0)}}} ...


4

tabularx stores the width of X columns in \TX@col@width. Use it to calculate the width of 3 X columns plus 4 \tabcolsep's. \documentclass[a4paper]{report} \usepackage{tabularx} \usepackage{xparse} \usepackage{multirow} \usepackage{tikz} \usepackage{color} \newcolumntype{H}{@{}m{0pt}@{}} \newcommand{\tskip}{&} \DeclareDocumentCommand{\tr}{ O{\hline} ...


1

I encountered the same error message with TikZ-UML and PGF 3.0.1. Downloading version 3.0.0 and copying the contents over my TeX tree solved the problem.


2

Tikz provides its own version of \widthof. No calc needed. However the latest version isn't loading it. \documentclass{article} \usepackage{tikz} \makeatletter % Stuff for calc compatiability. \let\real=\pgfmath@calc@real \let\minof=\pgfmath@calc@minof \let\maxof=\pgfmath@calc@maxof \let\ratio=\pgfmath@calc@ratio \let\widthof=\pgfmath@calc@widthof ...


5

In a tikzpicture, the current font is \nullfont (see pp.124-125, pgfmanual), So \widthof can't work. You may use the width function provided by TikZ math engine: \documentclass{article} \usepackage{tikz} \usepackage{calc} \begin{document} \begin{tikzpicture} \node[draw,text width=width("Text")]{Text and text}; \end{tikzpicture} \end{document}


5

Without packages. I just define three versions of \item (\itemA, \itemB, and \itemC) two of which decrement the enumi counter before invoking the saved form of \item. They also redefine the next invocation of \item to the next variant. To get the process rolling, I define the enumerateeachthree environment to set \item to \itemA before starting the ...


7

Here's a solution with enumitem, with the help of expl3 for the arithmetic: \documentclass{article} \usepackage{enumitem,xparse} \ExplSyntaxOn \DeclareExpandableDocumentCommand{\counterbythree}{m} { \doc_counter_by_three:c { c@#1 } } \cs_new:Nn \doc_counter_by_three:N { \int_div_truncate:nn { #1 + 2 } { 3 } } \cs_generate_variant:Nn ...



Top 50 recent answers are included