Re: Rechnen in LaTeX

Dirk Hünniger (via tex-d-l Mailing List) <[email protected]>
Newsgroups gmane.comp.tex.german
Message-ID <[email protected]>
Hallo Ulrike,

vielen Dank für das Beispiel. Jetzt sehe ich entlich mal wie man in tex 
rechnen kann. Daran werde ich mich entlanghangeln könne. Ich hatte 
wirklich bisher keine Ahnung wie man in tex selbst rechnen kann.

Viele Grüße Dirk

On 12/16/24 21:19, Ulrike Fischer wrote:
> Am Mon, 16 Dec 2024 19:36:16 +0100 schrieb Dirk Hünniger:
>
>> Hallo,
>>
>> das Ziel was ich im Moment verfolge ist eine "automatische
>> Spaltenbreite".
>> Die Frage die ich nun habe ist. Wie schreibe ich das in LaTeX hin. Also
>> wie bekomme ich LaTeX dazu diese Rechnung durchzuführen.
> \documentclass{article}
> \usepackage{array,lipsum}
> \ExplSyntaxOn
> \newcommand\mycellwidth[1]
>   {
>     \dim_eval:n
>       {
>         \fp_eval:n
>           {
>             (
>                \dim_to_decimal:n{\linewidth}
>              - \dim_to_decimal:n{2\tabcolsep+\arrayrulewidth}*#1
>              - \dim_to_decimal:n{\arrayrulewidth}
>             )/#1
>           } pt
>        }
>    }
> \ExplSyntaxOff
> \begin{document}
> \lipsum[1]
>
> \noindent\begin{tabular}{
>   |p{\mycellwidth{3}}|p{\mycellwidth{3}}|p{\mycellwidth{3}}|}
> \hline bla & bla & bla\\ \hline
> \end{tabular}
>
> \end{document}
>
>

-- 
FAQ: http://texfragen.de/
Durchsuchbares Archiv: https://www.listserv.dfn.de/sympa/arc/tex-d-l 
Unsubscribe/Verwaltung: https://www.listserv.dfn.de/sympa/info/tex-d-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.