AI'm having trouble using the dcolumn decimal format, The file looks like this:
But as soon as I add the formatting in the tabular* in \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{4}{d{3.6}} @{}} it wont compile and points to a missing } which is not the case unless I should add and extra one. If I understood correctly the formatting *{4}{d{3.6}} should give 4 columns 3 spaces before the decimal period and 6 after the decimal period to give space for the order of magnitude.
Some of my code is based on the first answer to this question.
EDIT: This example had errors unrelated to the behavior of dcolumn as pointed by @Rmano. Each circuitikz environment was lacking a semicolon ; at the end of the last line. A better MWE was provided by @David Carlisle in the comments and his answer below.
\documentclass[letter]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish,es-tabla]{babel}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz}
\usepackage[oldvoltagedirection]{circuitikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.15}
\usetikzlibrary{arrows}
\pagestyle{empty}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{subcaption}
\captionsetup{ singlelinecheck=false,
font=footnotesize,
labelfont=bf}
\usepackage{dcolumn}
\newcolumntype{d}[1]{D{.}{.}{#1}}
\title{\textbf{Impedancia}}
\author{}
\date{}
\begin{document}
\maketitle
\section{Circuitos RC}
\begin{figure}[ht]
\centering
\begin{subfigure}[t]{0.32\textwidth}
\centering
\begin{circuitikz}[scale=0.7, transform shape,font=\small]
\draw (0,2)
to[R=$R_s$, o-] (2,2)
to[C= $C_s$] (2,0)
to[short, -o] (0,0)
\end{circuitikz}
\label{fig:a}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\begin{circuitikz}[scale=0.7, transform shape,font=\small]
\draw (0,2) to[short, o-] (2,2)
to[short] (4,2)
to[C= $C_p$] (4,0)
to[short, -o] (0,0)
(2,2) to[R= $R_p$] (2,0)
\end{circuitikz}
\label{fig:b}
\end{subfigure}
\begin{subfigure}[t]{0.32\textwidth}
\centering
\begin{circuitikz}[scale=0.7, transform shape,font=\small]
\draw (0,2) to[R=$R_s$,o-] (2,2)
to[short] (4,2)
to[C= $C_p$] (4,0)
to[short, -o] (0,0)
(2,2) to[R= $R_p$] (2,0)
\end{circuitikz}
\label{fig:c}%
\end{subfigure}
\caption{a) Circuito RC serie. b) Circuito RC paralelo. c) Circuito RC paralelo con resistencia en serie. $R_s=R_p=1k\Omega$, $C_s=C_p=1\mu F$}
\label{fig:RC}%
\end{figure}
\section{Cálculos de Impedancia}
\begin{table}[h]
\footnotesize
\begin{tabular}{\textwidth}{@{\extracolsep{\fill}} l {4}{d{3.6}} @{}}
\toprule
& \multicolumn{4}{l}{\textit{Frecuencia}} \
& \multicolumn{1}{l}{$10 Hz$} & \multicolumn{1}{l}{$100 Hz$} & \multicolumn{1}{l}{$1 kHz$} & \multicolumn{1}{l}{$10 kHz$} \
\midrule
\multicolumn{5}{l}{\textit{Circuito 1}} \
$Z_1 (\Omega)$ & 1.59e+04 & 1.88e+03 & 1.01e+03 & 1.00e+03 \
$\theta_1$ & -86.40 & -57.86 & -9.04 & -0.91 \
\multicolumn{5}{l}{\textit{Circuito 2}} \
$Z_2 (\Omega)$ & 1.00e+03 & 0.85.e+03 & 0.16e+03 & 1.59e+01 \
$\theta_2$ & -3.60 & -32.14 & -80.96 & -89.09 \
\multicolumn{5}{l}{\textit{Circuito 3}} \
$Z_3 (\Omega)$ & 2.00e+03 & 1.78e+03 & 1.03e+03 & 1.00e+03 \
$\theta_3$ & -1.80 & -14.70 & -8.61 & -0.91 \
\bottomrule
\end{tabular*}
\caption{Impedancia y ángulo de fase versus frecuencia}
\end{table}
\end{document}
circuitikzand see if the problem persists.... – Rmano Mar 18 '22 at 22:47{@{\extracolsep{\fill}} l *{4}{d{3.6}} @{}}with{@{\extracolsep{\fill}} lllll @{}}that seems to compile just fine without decimal alignment. – David Barcene Mar 18 '22 at 23:11! Package tikz Error: Giving up on this path. Did you forget a semicolon?.– David Carlisle Mar 18 '22 at 23:34tableenvironment and the loading ofdcolumn, so the error shown is completely unrelated todcolumnas the message indicates there should be a semicolon afterto[short, -o] (0,0)– David Carlisle Mar 18 '22 at 23:36\documentclass{article} \usepackage[spanish]{babel} \usepackage{dcolumn} \newcolumntype{d}[1]{D{.}{.}{#1}} \begin{document} \noindent \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l d{3.6} @{}} a & 1.59e+04 \end{tabular*} \end{document}– David Carlisle Mar 18 '22 at 23:49;(that was my bad) at the end of the line prior to each\end{circuitikz}and that got rid of some of the errors, except for theerror| Missing } inserted. Compilation was still completed although the expected behavior of aligning at the decimal period did not work. – David Barcene Mar 19 '22 at 00:02*please edit your question to have a more reasonable example. – David Carlisle Mar 19 '22 at 00:06