Re: Non (!) scrivere un testo

#22968
Up
0
Down
::

Ciao Enrico.

Ti ringrazio per il codice, che proverò quanto prima. Nel frattempo ti invio, come richiesto, una delle tabelle.

`
\begin{footnotesize}
\[
\begin{array}{rcl}
\text{I.} & \quad & 0.30336 \\
\text{II.} & \quad & {\color{white}0.000}2912256 \\
\text{III.} & \quad & {\color{white}0.000000}3354918912 \\
\text{IV.} & \quad & {\color{white}0.000000000}414092848566857142\ldots \\[-2mm]
& \quad & \hrulefill \\
& \quad & 0.303651561505984048566857142857142857142\ldots \\
\text{V.} & \quad & {\color{white}0.000000000000}530038846165577142857142857\ldots \\[-2mm]
& \quad & \hrulefill \\
& \quad & 0.303651561506514087413022720000000000000 \\[-2mm]
& \quad & \hrulefill \\
\text{VI.} & \quad & {\color{white}0.000000000000000}6938690349803918961038961\,038961\,038961\,03 \\
\text{VII.} & \quad & {\color{white}0.000000000000000000}9223120711123978434365\,634365\,634365\,63 \\
\text{VIII.} & \quad & {\color{white}0.00000000000000000000}12395874235706270157\,874125\,874125\,87 \\[-2mm]
& \quad & \hrulefill \\
& \quad & {\color{white}0.000000000000000}6947925866389278645743484\,547452\,547452\,54 \\
& \quad & 0.3036515615065140874130227200000000000000\,000000\,000000\,00 \\[-2mm]
& \quad & \hrulefill \\
& \quad & 0.3036515615065147822056093589278645743484\,547452\,547452\,54
\end{array}
\]
\end{footnotesize}
`

Naturalmente il codice non funziona: si mangia anche i successivi zeri e questo certamente non va bene.
`\def\phzero{\phantom{0}\sbianca}
\def\phdot{\phantom{.}\sbianca}
\def\sbianca#1{\let\test=#1
\ifx0\test
\expandafter\phzero
\else
\ifx.\test
\expandafter\expandafter\expandafter\phdot
\else
\expandafter\expandafter\expandafter\test
\fi
\fi}

\begin{center}\footnotesize
\begin{tabular}{r@{\hspace{1em}}l}
I. & 0.30336 \\
II. & \sbianca 0.0002912256 \\
III. & \sbianca 0.0000003354918912 \\

\end{tabular}
\end{center}`
Ciao
Enrico

Go to top