🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.dtp.tex.gust
Article #27398

Re: [gust-l] [Q] zapętlony problem

#27398
From: Paweł Wlaź
Date: Thu, 30 Aug 2018 17:04
54 lines
2727 bytes
On Thu, 30 Aug 2018, jacek kmiecik wrote:

> W dniu 30.08.2018 o 13:47, Paweł Wlaź pisze:
>> Wydaje mi się, że ten jeden \expandafter wewnątrz definicji \fixbox 
>> wystarczy. A czy są jakieś konkretne problemy?
>
> %&pdfxelatex
> \documentclass{article}
> \usepackage{pgffor}
> \makeatletter
>  \def\fixbox#1{\expandafter\fik@#1@mik}
>  \def\fik@#1 #2@mik{\mbox{#2 #1}\index{#2\space #1}}
> \makeatother
> \begin{document}
> \fixbox{xx yy}% działa!
> \def\Autors{bb aa, dd cc, ff ee, hh gg}
> \foreach\Autor in \Autors{\fixbox{\Autor}\newline}
> \end{document}
>
> zawartość pliku ".idx:"
>
> \indexentry{xxx}{1}
>
>
> -- czyli tylko pierwsze wywołanie \fixbox. Z wnętrza pętelki \forteach 
> dziwnym sposobem nie generuje wpisów do pliku indeksu.



Nie jest tak źle.

Dopisałem w preambule

\makeindex

i zawartość pliku .idx (próbowałem pdflatex oraz xelatex) jest

\indexentry{yy xx}{1}
\indexentry{aa bb}{1}
\indexentry{cc dd}{1}
\indexentry{ee ff}{1}
\indexentry{gg hh}{1}

czyli wszystko gra.

Natoiast bez tego dopisania to nie generowało mi się nic w .idx, czyli 
być może ten Twój plik .idx to pozostałość jakichś poprzednich 
eksperymentów.

Pozdrawiam

-- 
Paweł
Technical Details
Message-ID: <alpine.LNX.2.20.1808301853040.19807@mat.pol.lublin.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <0057ac77-22e9-06c0-5dbf-8f814b9ad4af@agh.edu.pl> <alpine.LNX.2.20.1808300204270.24973@mat.pol.lublin.pl> <37bee2ca-d62d-7b1c-5ca4-9f60ad366b40@agh.edu.pl> <alpine.LNX.2.20.1808301344470.10778@mat.pol.lublin.pl> <13c52524-01e2-98b8-c549-33b672feea9e@agh.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.fr7!futter-mich.highwinds-media.com!news.highwinds-media.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Date: Thu, 30 Aug 2018 19:04:15 +0200 (CEST)
From: Paweł Wlaź <pwlaz@mat.pol.lublin.pl>
To: gust-l@man.torun.pl
Subject: Re: [gust-l] [Q] zapętlony problem
Organization: Polish Association GUST
Message-ID: <alpine.LNX.2.20.1808301853040.19807@mat.pol.lublin.pl>
References: <0057ac77-22e9-06c0-5dbf-8f814b9ad4af@agh.edu.pl> <alpine.LNX.2.20.1808300204270.24973@mat.pol.lublin.pl> <37bee2ca-d62d-7b1c-5ca4-9f60ad366b40@agh.edu.pl> <alpine.LNX.2.20.1808301344470.10778@mat.pol.lublin.pl> <13c52524-01e2-98b8-c549-33b672feea9e@agh.edu.pl>
In-Reply-To: <13c52524-01e2-98b8-c549-33b672feea9e@agh.edu.pl>
MIME-Version: 1.0
Newsgroups: pl.comp.dtp.tex.gust
Reply-To: gust-l@man.torun.pl
Approved: mjsz@umk.pl
Lines: 57
NNTP-Posting-Host: 158.75.33.82
X-Trace: 1535648663 unt-rea-a-02.news.neostrada.pl 608 158.75.33.82:46944
X-Complaints-To: abuse@news.neostrada.pl
X-Received-Bytes: 2396
X-Received-Body-CRC: 1766676512
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit