Deutsch   English   Français   Italiano  
<910a0f84-f979-4502-b0c6-c6fcad6937a0n@googlegroups.com>

View for Bookmarking (what is this?)
Look up another Usenet article

X-Received: by 2002:a37:a996:0:b0:6ec:59da:a72 with SMTP id s144-20020a37a996000000b006ec59da0a72mr22260285qke.676.1666611134950;
        Mon, 24 Oct 2022 04:32:14 -0700 (PDT)
X-Received: by 2002:a25:3f03:0:b0:6be:f611:cf5f with SMTP id
 m3-20020a253f03000000b006bef611cf5fmr29525902yba.132.1666611134764; Mon, 24
 Oct 2022 04:32:14 -0700 (PDT)
Path: ...!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: fr.comp.text.tex
Date: Mon, 24 Oct 2022 04:32:14 -0700 (PDT)
In-Reply-To: <877d0p794y.fsf@example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:842a:838d:2c01:40fd:40:1a44:30a9;
 posting-account=_4U1BQoAAAATFOu2QrnujIeoJPeIbW6L
NNTP-Posting-Host: 2a02:842a:838d:2c01:40fd:40:1a44:30a9
References: <4e186451-eda2-4525-b3c8-a80bf0fc24f4n@googlegroups.com>
 <87bkq179vp.fsf@example.com> <eab6fe4a-4091-44fb-b39b-36878a6eefc8n@googlegroups.com>
 <877d0p794y.fsf@example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <910a0f84-f979-4502-b0c6-c6fcad6937a0n@googlegroups.com>
Subject: Re: Calcul de longueur d'un texte
From: projetmbc <projetmbc@gmail.com>
Injection-Date: Mon, 24 Oct 2022 11:32:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Bytes: 3124
Lines: 67

Le lundi 24 octobre 2022 =C3=A0 13:29:03 UTC+2, Denis Bitouz=C3=A9 a =C3=A9=
crit=C2=A0:
> Le 24/10/22 =C3=A0 04h23, projetmbc a =C3=A9crit :=20
>=20
> > Merci Denis.=20
>=20
> Padkoi.
> > Ce que je voulais obtenir est ce qui suit.=20
> >=20
> > --8<---------------cut here---------------start------------->8---=20
> > \newcommand\rulerstest[2][4cm]{=20
> > \null\hfill\raisebox{2pt}{\rule{#1}{2pt}}\textbf{\,#2\,}\raisebox{2pt}{=
\rule{#1}{2pt}}\hfill\null=20
> >=20
> > \blabla=20
> >=20
> > \null\hfill\raisebox{2pt}{\rule{#1*2+\widthof{\textbf{\,#2\,}}}{2pt}}\h=
fill\null=20
> > }=20
> > --8<---------------cut here---------------end--------------->8---
> Et =C3=A7a a donc l'effet escompt=C3=A9 ?=20
> --=20
> Denis
Oui. Voici un fichier test.

 --8<---------------cut here---------------start------------->8---=20
\documentclass{article}

\usepackage{calc}

\newcommand\blabla{
	Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,=
 bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,=
 bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,=
 bla, bla
}

\newcommand\rulerstest[2][4cm]{
	\null\hfill\raisebox{2pt}{\rule{#1}{2pt}}\textbf{\,#2\,}\raisebox{2pt}{\ru=
le{#1}{2pt}}\hfill\null

	\blabla

	% Indication donn=C3=A9 par D. Bitouz=C3=A9 sur fr.comp.text.tex .
	\null\hfill\raisebox{2pt}{\rule{#1*2+\widthof{\textbf{\,#2\,}}}{2pt}}\hfil=
l\null
}


\begin{document}


\rulerstest{Titre court}

\bigskip

\rulerstest{Titre trop long}

\bigskip

\rulerstest{Titre trop, trop, trop long}

\bigskip

\rulerstest[3cm]{Titre trop, trop, trop long}

\end{document}
--8<---------------cut here---------------end--------------->8---