Re: warning about missing menu items?

2023-07-17 Thread Karl Berry
A warning was recently readded for that case, 

I'm glad.

With 7.0.3, to get the warning, you need to pass
  -c CHECK_NORMAL_MENU_STRUCTURE=1

Thanks. Very helpful.

As a side note, to me it would be fine if there was no warning in the
default case 

Well, I shouldn't argue since you already said it's changed for the next
release, but FWIW, I disagree.

as it could be on purpose that chap2 is not in the menu.

I believe 99% of Texinfo documents are intended to be "normally"
structured, and thus missing menu items are other out-of-hierarchy
errors are unintentional. So IMHO this is the case that Texinfo defaults
should target. And, to my knowledge, this has been the case for quite a
few years, after going to a lot of trouble to change from the "anything
goes" of the original implementations.  Which is why I was surprised
when there was no warning when I happened to notice I'd forgotten a menu
entry.

Another possibility would be to pass a tree transformation to get texi2any
to generate the missing menu entry:
./texi2any.pl -c TREE_TRANSFORMATIONS=complete_tree_nodes_menus file.texi

Also very helpful. I will try it. Thanks Pat! -k



warning about missing menu items?

2023-07-16 Thread Karl Berry
I seem to recall that in the past there was a warning when a
normally-structured manual had a missing menu entry? That doesn't seem
to happen now, and I failed to find anything in the manual. Am I just
going crazy :)?

I can run M-x texinfo-all-menus-update, but still, I thought makeinfo
also noticed this.

For example, there are no warnings from makeinfo
(texi2any (GNU texinfo) 7.0.3) about the following. --thanks, karl.

\input texinfo

@node Top
@top Missing

@menu
* chap1::
@end menu

@node chap1
@chapter chap1

@node chap2
@chapter chap2

@bye



Re: Paper Sizes

2020-11-11 Thread Karl Berry
The problem is that screens could be any size and shape

Speaking of beamer presentations? Sure, there is no universal size, but
in practice, the 12.8cm x 9.6cm (4:3 aspect ratio) which the LaTeX
beamer package produces seems to work for the majority of situations. It
might be useful to add that as a size.

We can't add an infinite number of paper
format commands to accomodate all the possibilities. 

That's why there is @pagesizes ... -k



Re: @ref without page numbers

2020-10-23 Thread Karl Berry
Christopher, if you want to write full technical documents with lots of
references, math, etc., why don't you just use LaTeX? Texinfo is not
designed for this. Trying to shoehorn it to fit seems fraught with problems.

Using @ref for bibliography entries seems like a problem in the first
place. Texinfo doesn't have any real bibliography support. All the
workarounds in the world are not going to produce robust output or
processing.

Just my unasked-for $.002, sorry,
Karl



Re: Macro introduces \par in Table of Contents

2020-10-04 Thread Karl Berry
> @section{Strong amplitude asymmetries between the Retarded Causal Branch@
> and the Advanced Anti-Causal contribution to the Coherence Function}

Aside from anything else ... supporting braces seems like the cleanest
way to support multiline section names, if that's something you want to
work on :). This could be detected as different from the existing "rest
of the line" argument in both tex and makeinfo, though presumably not
without plenty of pain. --best, karl.




TeX parts of Texinfo for Windows

2020-06-01 Thread Karl Berry
I thought I would pass this on for anyone interested in running the TeX
parts of Texinfo under Windows (e.g., not info or makeinfo or related). -k

Date: Sun, 31 May 2020 06:36:45 +0900
From: "Akira Kakuto" 
To: 
Subject: Re: TeX Live on Windows: Texinfo not available?

I think users can find tl-texinfo.zip at
http://mirror.ctan.org/systems/win32/w32tex/TLTEXINFO/

A document [contents of file 00README-TEXINFO.TL]:

How to install Texinfo addin in TeX Live W32


In the following, $INSTALLDIR is $SELFAUTOPARENT in the TeX Live,
that is, the parent directory of "texmf-dist". Actually the
directory $INSTALLDIR is shown by a command:

kpsewhich --var-value=SELFAUTOPARENT


(1) Expand the file tl-texinfo.zip in $INSTALLDIR.
Then you can typeset basic Texinfo files:
texi2pdf --verbose filename.texi
texi2dvi --verbose filename.texi
dvips filename.dvi
etc.
makeinfo etc. in the original Texinfo are not supported.

(2) If you define an environment variable TEXINPUTS as
set TEXINPUTS=$INSTALLDIR/texmf-texinfo/tex/texinfo;
The latest Texinfo becomes available. For example, Japanese
extension by M. Hosoda becomes available:
set TEX=xetex& texi2dvi --verbose yatex-lx.texi
in cmd.exe command line creates yatex-lx.pdf.
An example file yatex-lx.texi is in texmf-texinfo/doc/texinfo.
Note that, in defining the environment variable TEXINPUTS,
you should input the actual value of $INSTALLDIR, for example,
set TEXINPUTS=C:/texlive/2020/texmf-texinfo/tex/texinfo;
and the trailing semicolon, ";" is absolutely necessary.

Best,
Akira



opmac and fonts

2020-05-06 Thread Karl Berry
Hi Gavin - FWIW, I recently re-discovered opmac.tex, written by Petr Olsak,
which has support for a number of the usual free font families. It stays
close to plain, so might be plausibly adaptable. I admit I haven't
looked at the code, though. Just thought I'd pass on.

It's distributed as part of Petr's csplain, but I believe is essentially
standalone functionality.
https://ctan.org/pkg/csplain

Best,
Karl



Re: Problem with heading appearing on new chapter page

2020-04-29 Thread Karl Berry
I had a look at a few printed books and there seems to be typographical 
precedent for not having the page number in the usual place on a chapter 
page, so I am thinking that perhaps the page number should be omitted 
unconditionally if a @*heading command isn't used.

FWIW, I don't think that's a good idea for Texinfo. The reason most
books do chapter pages differently is that chapter openings are
formatted significantly different from regular text pages. So, for
example, the page number might appear centered at the bottom instead of
in the header.

But for Texinfo, all pages are (intentionally) laid out the same
way. Texinfo is supposed to emphasize usability and simplicity over
appearance. So not having a page number on a non-blank content does not
seem right to me -- that would just make it harder for people to figure
out what page it is if they want to refer to it.

As you know, Texinfo was never intended to support arbitrary formatting. -k



Re: Marking lisp expressions

2020-01-27 Thread Karl Berry
To create the dvi/ps/pdf output it requires a TeX installation,
which is an order of magnitude bigger than Emacs.

A TeX installation which is just plain TeX, enough to process Texinfo
files (not LaTeX), is somewhat smaller than current Emacs.
(scheme-minimal in native TeX Live.) -k



Re: lisp blocks

2020-01-25 Thread Karl Berry
> Are there examples of texinfo files used as Lisp libraries ?

Not that I've ever heard of (not proof, of course, but I suspect I would
have).

I don't know it for a fact, but I suspect it was invented for the "intro
to elisp" and/or "elisp reference" manuals, back when they were first
written (1980s). It would not surprise me if Bob Chassell or other
authors had an Elisp function that ran through all the Lisp blocks to be
sure they eval-ed. Or perhaps they had that idea, rms/bob threw the
command into Texinfo, but never actually did anything with it.  But I
have no actual knowledge, I'm just speculating.

> Was that an attempt at offering the possibility to write literate code ?

I wouldn't call it such. I guess all the Lisp could be extracted into a
file, so in a basic sense it could be used as such (not that it ever
was, to my knowledge) but there are no other literate programming features.

By the way, there is nothing that actually enforces @lisp contents being
Lisp code. It could be anything. @lisp is a synonym for @example.

By the way 2, I don't understand your original point. @lisp output in
the PDF is indented, relative to the left margin, in both PDF and Info
output. --best, karl.



Re: internationalization and txi-ll.tex files

2020-01-18 Thread Karl Berry
I'm checking my TeX installation and it appears that I have TeXLive
2019, the basic version.

If you mean you installed the native TeX Live (tug.org/texlive), not any
distro version,
(1) the files are in, for example:
  /usr/local/texlive/2019/texmf-dist/tex/texinfo/txi-fr.tex

(2) if you don't have anything there, running
  tlmgr install texinfo
should get them installed. ("texinfo" in the TeX Live world is just the
TeX-related files; no binaries are installed and nothing outside the TL
directory is touched.)

However, if you're running a distro TeX, above is inapplicable. --best, karl.



Re: @vskip ...

2020-01-13 Thread Karl Berry
1) Knuth does not encourage the use of filll (I don't pretend to
   understand why), 

The idea, as Knuth vaguely implied, is that it's good to "normally" use
fil and fill so that filll can be used in an "emergency" to override
them. E.g., if someone is in the last stages of producing a book and
needs to force the spacing.

   why does Texinfo has use only for filll and not
   for the 2 others ?

The whole filll usage in Texinfo is a kludge that has been there since
day one, solely for purposes of the copyright page, where it's
conventional for the material to be typeset at the bottom. 10 minutes of
thought to handle that convention differently in Texinfo input back in
1985 and it would never have been needed.

2) Texinfo seems to use filll exclusively in the context of the
   copyright page, 

Right.

   so why not create a Texinfo "primitive" that would hide the
   complexity of the "incantation", something like @vfilll ?

Precisely because it is only used on the copyright page, I see no use
for such a command. It makes no sense in other output formats.

What could make sense: since the title page is already specified with
@titlepage...@end titlepage, a new command like @titlepagereverse could
be defined, which would do both the

@page
@vskip 0pt plus 1filll

and then @vskip would not be needed or wanted anywhere. Whether doing
this or something similar is worth bothering at this point (since @vskip
would have to stay defined forever since essentially all existing
Texinfo documents use it), is up to Gavin.

@deffn Command vfilll
vskip Opt plus 1filll
@end deffn

That is documenting a command named "vfilll" (like one might document a
C function in a manual). It has nothing to do with defining a new
Texinfo command. For that you need @macro, at the document level. In
texinfo.tex, the standard TeX syntax can be used:
\def\vfilll{\vskip 0pt plus1filll\relax}

3) Is it OK to add a reference to that part of the TeXbook in the
   Texinfo manual so that users understand why this thing exists ?

The TeXbook is, sadly, nonfree documentation, so it's not ideal to refer
to it. I don't know that it's totally forbidden, but in this case, there
are at least two other free books that also describe it (and everything
else in primitive+plain TeX: TeX by Topic and TeX for the Impatient.

However, I admit I don't see the need for such a reference. The Texinfo
manual already explains everything that Texinfo authors need to know
about it, seems to me. --best, karl.



Re: [help-texinfo] emacs manuals built without indexes

2019-05-28 Thread Karl Berry
"(Index is nonexistent)"

Most likely the texinfo.tex is from a development version that I
wrongly propagated to gnulib. If you get the texinfo.tex from
ftp.gnu.org or from gnulib now, hopefully the indexes will come back. -k



Re: [help-texinfo] No index in PDF manual

2019-04-03 Thread Karl Berry
Ok, I'll keep gnulib in sync with ftp.gnu.org.

This could work I suppose, although it would make texinfo.tex more 
complicated than it was, rather than simpler.

That desire not to make the already too-complicated code more
complicated, and the compatibility problem, is exactly why I never
changed the index character to be @.  Despite the problems with \,
which seemed rather minor by comparison.

At least omitting the index makes the problem clear, instead of some TeX 
error message being output when the user tries to run TeX, 

Wouldn't an error message be highly desirable as well as omission?

It is pretty easy not to notice that no index was generated. Few
authors, me included, are in the habit of checking whether a tool did
its job if no error is reported. Mere messages on the console are too
easily ignored. --best, karl.



Re: [help-texinfo] No index in PDF manual

2019-04-02 Thread Karl Berry
I have sent an email to ask about the version of texinfo.tex in gnulib, 

FWIW, I haven't been on bug-gnulib for a couple of years. (I'm not sure
where you sent it.)

Anyway, the answer is, until your mail to me of a couple days ago, I
copied texinfo.tex from git into gnulib. As has been done since CVS repo
days.  Now I am no longer doing that, and the gnulib texinfo.tex will
not be updated again until you tell me it should.

A new release of Texinfo can only help, but it won't be a full solution.
In practice, texinfo.tex is updated asynchronously from all else,
sometimes by years. In either direction.

How about this: in the new texi2dvi, pass something like \let\txidxat1
on the command line to TeX. Then, if that control sequence is defined,
the new texinfo.tex writes the idx files with @ chars. Otherwise it
continues to use the \ chars.

Admittedly it's ugly on several levels, but at least then I think there
would be a chance for people to use the new texinfo.tex with the old
texi2dvi, and vice versa.

The only versions of texinfo.tex that should be used generally are 
either those on ftp.gnu.org, or those inside official releases.  

I can change gnulib to update only from the releases on ftp.gnu.org.
I guess I may as well go ahead and make that the rule now? -k



Re: [help-texinfo] Section numbers in filenames

2019-02-19 Thread Karl Berry
Hi Mike,

One option would be to put the section numbers at the beginning
filenames, so that the files would sort alphabetically.

For what it's worth, I postprocessed the info file for one of my manuals
with gawk to achieve this. See the Makefile.am and splitinfo.gawk files
in http://tug.org/svn/texlive/trunk/Build/source/doc/ ...

If there's a way to do it directly in makeinfo, that would be great.
I didn't know of/couldn't find one. Gavin, Patrice? --thanks, karl.



Re: [help-texinfo] [feature request] adding footer to HTML pages

2018-12-17 Thread Karl Berry
 -c HTML_PAGE_FOOTER=

I'm not sure if it will solve your case, but FWIW, we used
-c PRE_BODY_CLOSE for this purpose for an unofficial LaTeX manual I
contribute to. Here is one of its intro pages so you can see the result:
http://latexref.xyz/About-this-document.html

The  and link at bottom were added by us, via this option:

-c PRE_BODY_CLOSE="\
\
Unofficial LaTeX2e reference manual"

Best,
Karl



Re: [help-texinfo] pxref "consulte" instead of "see"

2018-02-01 Thread Karl Berry
I don't want to use the word "see" with pxref, but the Spanish word 
"consulte", because I'm writing the manual in English, it's a 
translation of the Bash Reference Manual.

If I understand correctly, you want:

@documentlanguage es

As described here:
https://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#g_t_0040documentlanguage

However, the person who created the translations for Spanish chose to
translate "see" as "v@'ease" rather than "consulte". (At least for TeX,
file txi-es.tex; I didn't check makeinfo.) Not knowing Spanish, I can't
comment further :( ...

Happy translating,
Karl



Re: [help-texinfo] Using @table with @smalldisplay

2017-11-10 Thread Karl Berry
> I want to create a table in small font, ...

I agree with Gavin that it's not a recommended or supported thing to do.
But if you insist, maybe something like this (for PDF/DVI):

@tex
\globaldefs=1 \smallfonts
@end tex

.. your table ...

@tex
\globaldefs=1 \textfonts
@end tex

Or maybe not. I didn't try it and don't know if it does what you want
(or does anything at all). --best, karl



Re: [help-texinfo] Special characters in texinfo's PO files

2017-07-13 Thread Karl Berry
> My question: What is the correct for special characters in texinfo's PO
> files - to use texinfo's syntax, or to use UTF-8 (or whatever charset)?

.po files long predate Unicode and UTF-8, and I don't think gettext
supported UTF-8 well for some years after it was invented. Therefore it
does not surprise me that some po files use Texinfo syntax to represent
some characters.

Both are correct, as far as I know.  I'm not aware that either is
preferred.

FWIW, I concur with Gavin.

Also FWIW, I suggested/invented @U not for anything about .po files, but
for the case when a document contains only a few non-ASCII
characters. Such as almost all the manuals written in English. In that
case, it is far more portable to everything to keep the source in 7-bit
ASCII instead of throwing in a couple of "binary" UTF-8 bytes. (Although
many manuals don't follow this, and just blindly use
UTF-8. Whatever. I've given up trying to talk to people about it.)

For cases when a document is actually written in another language, or
otherwise needs to have lots of "special" characters, then of course it
makes sense to use UTF-8 directly.

Good luck,
Karl



Re: [help-texinfo] Inserting text in tex math mode

2017-06-17 Thread Karl Berry
However, there is no space after the text (with \r{if} or with \r{if
}). I haven't researched why this is, but I expect it depends on the
details of how @r is implemented in texinfo.tex.

It's not about @r (that just changes fonts). In TeX math mode, spaces
in the input are ignored, because TeX puts in its own spacing.

You could get a normal word space with
$$ \r{if } ... $$
but normally you don't want word spaces in math, but rather actual math
spacing amounts, e.g., \; for a so-called thick space, etc.

Really supporting display math in Texinfo (including xrefs) has been
on the todo list forever. Not to mention math itself. --happy hacking, karl.



Re: [help-texinfo] Suppressing "Underfull \hbox (badness 10000)" warnings

2017-03-24 Thread Karl Berry
Is there any way to suppress those "Underfull \hbox (badness 1)"
warnings when using texi2pdf?

@tex
\global\hbadness=1
@end tex

(It just suppresses the warnings, does not affect typesetting.)

texinfo.tex already sets \hbadness considerably higher than the
default. If a normal paragraph line has a badness of 1, that's
extremely spacey. But I understand preferring to live with it rather
than rewrite text, or otherwise worry about it.

By the way, you can get rid of the black boxes with the Texinfo command:
@finalout

The lines will still be reported as overfull, but the black boxes will
not be printed. Independently, you can turn off the overfull reports, as in:
@tex
\global\hfuzz=4pt
@end tex
Then only lines that are more than 4pt overfull (which would normally be
quite visible) would get reported.

Hope this helps,
Karl

P.S. Gavin: FWIW, I think \letterpaper should set \hfuzz=1pt, since
\afourpaper and others do. I also see no reason for \afivepaper to use
\hfuzz=1.2pt when everything else uses 1pt. Perhaps best: make
\hfuzz=1pt the default outside of any paper size, and remove all the
paper-size-specific settings.



Re: [help-texinfo] Installing "GNU Texinfo" Software Suite

2017-03-10 Thread Karl Berry
Hi Tyler - it is unlikely that the .info file in a video game has
anything to do with Texinfo. If you send it to me (offline) I could
confirm, if you like. --best, karl.



Re: [help-texinfo] Texinfo <-> roff?

2016-12-07 Thread Karl Berry
Hi James,

document the command-line options in just one
place, and perform some kind of conversion.

All IMHO ...

1) FWIW, https://www.gnu.org/software/autogen/ (search for autoopts)
was Bruce Korb's attempt to fully centralize option processing.
More than just the doc. I confess I've never attempted to use it.

2) Assuming you don't just want to use the mentioned help2man for the
man pages and avoid the problem entirely ...

3) What comes to my mind is to put the option doc in a separate file and
write your own converter in your favorite language.  And such a tool,
once written, could be further developed, distributed in Texinfo, etc.

Even given a texi-to-man (none exists) or man-to-texi tool (Nelson Beebe
has one with an upcoming release, as Gavin mentioned), such tools will
inevitably be about translating entire documents, which would not be
helpful for an option list fragment.  Similarly for going through or
starting from another format (pod, markdown, etc.), Docbook most of
all. What's needed is just a string-to-string conversion.

As for the direction, FWIW I think it makes more sense to go from
texinfo->man (your preference anyway, yay :), since the texi source will
have index entries, among other things, which will have no counterpart
in the man page. I don't think the reverse is true. Still, there
could/should be severe restrictions on the Texinfo end to make the
conversion manageable, since option lists don't need much markup.

http://texinfo.org/texi2roff/ 

I changed the link to http://mirror.ctan.org/support/texi2roff/,
but this program is not maintained and not useful,
as far as I can see.

redirects to www3.texinfo.org, which domain ...

Yes, I gave up the texinfo.org domain a few years ago. I didn't see it
elsewhere on the gnu.org/s/texinfo page, though I suspect some of the
other links there have become stale.

best,
karl



Re: [help-texinfo] Standalone info as a generic info processor?

2016-11-06 Thread Karl Berry
>How does info know what qualifies as an index?
It looks for nodes with "index" in the name.

Avoiding reliance on this string search was precisely why the whole
^@^H[index^@^H] thing was invented, years and years ago. Oh well,
whatever. -k



Re: [help-texinfo] Path for included file

2016-10-16 Thread Karl Berry
I doubt there is a good way to list directories for included files
within a Texinfo file.

Indeed, Texinfo has never had anything like LaTeX's \graphicspath.
I think -I is the way to go, FWIW ... --karl



Re: [help-texinfo] Feature Request: New table options for other built-in indices

2016-07-07 Thread Karl Berry
Unless someone has an idea for a
more general solution? 

Well, what comes immediately to mind is something like:
@idxtable  

Examples:
@idxtable @kbd @kindex

@defindex arg
@idxtable @code @argindex

FWIW ... -k



Re: [help-texinfo] Want curly braces around key sequences (Was: Overfull vbox in Concept Index leads to a blank page in the middle of the index)

2016-07-02 Thread Karl Berry
I'd just like to mention that your preferred convention of surrounding
key sequences with braces is perfectly reasonable on its own, but it's
unlike any other GNU Emacs (or GNU in general) documentation.  (Which is
why Texinfo doesn't support it directly.)

If hyperbole users are most likely not reading anything else, that's
fine, but if they might be looking at the Emacs (or Info or ...)
documentation, it seems like it could be rather confusing.  As in
wondering why hyperbole's key sequences are always surrounded by braces,
does that make them different from Emacs key sequences, if they're
supposed to type the braces, etc.  

Just a thought FWIW ... -k



Re: [help-texinfo] Umlaut strangeness

2016-06-11 Thread Karl Berry
4. It's easy to imagine that null bytes in the log files would cause
problems. This should not happen at the moment.

In my view, a few stray null bytes should just be ignored by grep.
But that's me.

5. But apparently newer GNU grep causes problems if the encoding of
the file differs from the encoding from the user's locale. For
example, in a UTF-8 locale, bytes that aren't valid UTF-8 sequences
would cause a file to be viewed as binary. That could cause problems.

That seems like a (rather significant) bug.  If you can construct an
example, it would be good to report that (bug-g...@gnu.org) ... -k



Re: [help-texinfo] Umlaut strangeness

2016-06-04 Thread Karl Berry
I've done some work on this and have made some progress, managed to
output this sequence when generating a PDF bookmark

Wow, that's great.

! pdfTeX warning (dest):name{FE FF 00 DCbersicht 2} has been
referenced but does not exist, replaced by a fixed one

Argh.  pdftex is just trying to match strings.  Can the bookmark display
name (Unicode) be separated from the destination (= node name, in
whatever format it is)?

grep to think it is a binary file, 

That binary/text stuff for grep "helpfully" invented a few years ago is
so frustrating.  As far as I know the only way to force it is to supply
--text, and that only works with GNU grep, so that would then have to be
tested for.  Double argh.

It seems to me in principle that a few Unicode characters should not
cause grep to think the file is binary, but even if that got (or has
been) fixed, the script will still have to deal with existing bad grep
behavior.  Sigh.

I haven't looked at it in detail but  it seems the PDFDocEncoding has
characters at values 80-9F, which are missing from Latin-1 

Sounds right ... -k



Re: [help-texinfo] Umlaut strangeness

2016-06-04 Thread Karl Berry
Does this require a newer texi2pdf version?

The texi2pdf script itself (or texi2dvi; texi2pdf is just a trivial
wrapper for texi2dvi) most likely does not matter, but you should get
the latest texinfo.tex from http://ftp.gnu.org/gnu/texinfo/texinfo.tex ... -k



Re: [help-texinfo] Umlaut strangeness

2016-06-02 Thread Karl Berry
+  \passthroughcharstrue

Seems to me it will only work if the original character is Latin 1,
or more precisely, PDFDocEncoding.  Otherwise results will be unexpected.

The problem is the TeX fonts - they don't use ISO-8859-1. 

The encoding of the TeX fonts have nothing much to do with it, as far as
I can see.  Some kind of encoding conversion is needed no matter what,
because the bookmarks are unrelated to the rest of the document.

@"U. That in turn becomes U when the PDF outline is generated.

Yes, that is the crucial thing.  The "reduction" of 8-bit chars to their
"sorted ASCII" (\indexnofonts) was the easiest reasonable compromise
without a tremendous amount of work to do a full encoding conversion.
Hence my comment years and years ago starting at line 1418,
"PDF outlines are displayed ...".

If it's possible to use UTF16-BE for the outlines, 

It is possible.  The idea is to output the bookmark strings in PDF
Unicode string syntax, and starting with an FEFF marker.  For example,
this is "A" (U+0041): 

See the PDF reference manual or, in terse form, the pdfmark manual.
(I've just been reading in this area, which is why I chimed in.)

as long as the document used UTF-8 as its encoding. 

In practice I suppose it would work out since texinfo.tex would know, in
some sense, the Unicode code point.  

that case I imagine the encoding could be converted automatically,

There would be weird cases for the Unicode characters above 2^16, where
the UTF-16 encoding is not just the code point, but I suppose they're
unlikely to arise in practice.

without the need for any large translation tables.

Yeah.  In theory the document encoding should not matter at all, but a
full encoding-to-encoding conversion in texinfo.tex does not sound
feasible to me.  That's why I never did it.

I seem to recall reading that PDFDocEncoding is a superset of Latin 1,
but I haven't done the diff.  If so, @documentencoding ISO-8859-1 could
use the \passthroughcharstrue hack, I think ...-karl



Re: [help-texinfo] Umlaut strangeness

2016-06-01 Thread Karl Berry
Thank you for your clear email.  You're completely right about email
programs confusing the issue of literal 8-bit or Unicode characters in
contexts like this.

It is definitely possible.  There may be a bug in texinfo.tex in this
regard, or maybe it's the known deficiency.  I'll experiment.

Meanwhile, there is one more test you can try: use the Texinfo sequence
of 7-bit ASCII characters:
  @"U
instead of any literal character.  With or without
@documentencoding, though it should not be necessary in that case.

because the bookmarks use Latin 1. 

Strictly speaking, they don't use Latin 1 exactly, but the encoding that
is used (PDFDOCEncoding) is very close to Latin 1.  (I admit I didn't
actually try to "diff" the encodings, but that's what Adobe says.)  -k




Re: [help-texinfo] Umlaut strangeness

2016-05-31 Thread Karl Berry
When using this in an ISO-8859-1 encoded *.texi:
@chapter Ãœbersicht

As long as you specify @documentencoding ISO-8859-1 and use the 8-bit
input character 0xdc (your mail is garbled on my system, sorry), it
should work.

Another possibility is to use @"Uber... (all 7-bit ASCII) instead of any
literal character.

overview of all chapters that appears in Acrobat Reader's side panel?

The PDF overview (aka bookmarks aka outlines) is rendered using a
different encoding than anything else (PDFDocEncoding, a superset of
Latin 1) and with system fonts instead of document fonts.  The @"U
character is at position 0xdc in that encoding (defined in Appendix D of
the PDF reference manual), like Latin 1.  Therefore a UTF-8-encoded
character (where U-umlaut is not 0xdc) will not come out right.

texinfo.tex has never tried to deal with all this perfectly; it would be
a big job.  Instead, rather than pushing what would amount to binary
garbage into the PDF, it uses the "sortable ASCII equivalent" -- clearly
suboptimal in many ways, but that's the status.

Nowadays, PDF bookmarks can also use Unicode strings (UTF16-BE
).  So the right thing would probably be to translate all
character-generating Texinfo commands into their Unicode equivalents,
thus assuming that the system font being used is UTF-8.  Only for
purposes of the PDF bookmarks, nothing else ... not offering to
implement it, just mentioning :) ... --best, karl.



Re: [help-texinfo] Typing rules in Texinfo manual

2016-02-15 Thread Karl Berry
Hi Stefan - indeed, fractions a la \frac have never been supported in
Texinfo.  Or display math, or all kinds of other things.

 Env |- Exp1 : Type1Env |- Exp2 : Type2
 --
 Env |- Exp3 : Type3

I'm not sure what kind of input you are hoping for.  But I fear that
this is a case where using @macro (or m4/other preprocessor macros,
except apparently nobody except me ever liked that idea) is the best
option.  Yes, you'd have to write different macro bodies for TeX, HTML,
Info[, Docbook, XML].

There will surely be plenty of problems, but I can't think of any other
approach, unless Gavin feels like adding a new @frac{num,den} (or
whatever) command, and you want to use a brand-new command in your
source ...

As for the general concept of "typing rules", I don't understand.  It's
not possible to document "X in LaTeX is equivalent to Y in Texinfo" for
the simple reason that only a tiny fraction ( :) of LaTeX is in Texinfo.
By design.  And anyway the purpose of the Texinfo manual is to document
Texinfo, not LaTeX.  But I know you already know all this, so I suppose
you must mean something else ...

Best,
Karl



Re: [help-texinfo] Defining new environments?

2016-01-20 Thread Karl Berry
@example complains in that a case

@example takes Texinfo text as its argument, not verbatim text.
Thus you would have to change all @{} to @@ @{ @}.
But other than that, it should work.
If you don't want to munge your verbatim texts, I understand ...

In your macro trial, it needs to be \TEXT\ in the body (seemed to be
lacking the trailing backslash -- yeah, weird syntax), but I think
unbalanced verbatim braces are not a feasible case for anything (besides
simple @verbatim itself, as you've seen) to deal with.

Best,
Karl



Re: [help-texinfo] Defining new environments?

2016-01-19 Thread Karl Berry
@indentedblock
@verbatim
œôó¦
@end verbatim
@end indentedblock

How about either using @example (already indented), or indenting your
verbatim text if you want indented?  That is the intention behind those
environments.

Subject: [help-texinfo] Defining new environments?

There's no way to define new environments specifically, but perhaps
@macro could do an equivalent job.  Not that I ever recommend using
@macro.

Best,
Karl



Re: [help-texinfo] PGP signature on the texinfo-6.0.tar.xz file

2016-01-08 Thread Karl Berry
   I thought that savannah list is my best bet.

http://ftp.gnu.org/gnu/gnu-keyring.gpg is somewhat closer to being
official than savannah, although admittedly it is just a bare file with
no interface.  But it contains, so far as I know, all the keys which are
permitted to upload to (various directories of) ftp.gnu.org, and this is
actually enforced by the upload software we (as maintainers) use.

normally it is difficult to find a canonical list of the
maintainers' keys of the project

However, the list of people/keys allowed to upload is also not
necessarily the same as the list of official maintainers.  Those are,
conceptually, two different roles.  /gd/gnuorg/maintainers is the one
and only place with the official maintainers.  (Although various other
places have unofficial lists, including directory.gnu.org and
savannah.gnu.org.)

No idea why it is so secret

Indeed.  It's not that the names of who-maintains-what is intentionally
a secret.  It's that there's a lot of administrative fooforaw involved
in publishing any information, and it's always easier to just give up
than try to get through all the hassle.  I've tried to do various things
(though not this particular one, I admit) along these lines for many
years, without success, so I've pretty much given up at this point.

Best,
Karl



Re: [help-texinfo] PGP signature on the texinfo-6.0.tar.xz file

2016-01-05 Thread Karl Berry
> I have imported PGP keys of the texinfo maintainers from
> https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=texinfo

As far as I know, there is no particular guarantee that that list of
keys is meaningful.  Apparently it contains keys of all members of the
texinfo group (which is quite different than "maintainers") on Savannah
.. at some random time.

You can see that Gavin is an administrator of the texinfo group at
https://savannah.gnu.org/projects/texinfo/, and posted the 6.0
news announcement there.

At any rate, The only official source of "who is the maintainer" is
/gd/gnuorg/maintainers on fencepost.gnu.org (which does list Gavin).  I
know that file is not available from the outside (intentionally -- rms's
decision many years ago), but still, that is the reality.

Anyway, the answer is yes, it is ok and expected that the release
tarball is signed by Gavin.

Best,
Karl



Re: [help-texinfo] trying to make a unicode math char appear in all formats

2015-12-11 Thread Karl Berry
Hi Paul,

1) With the latest texinfo.tex (from ftp.gnu.org et al.), using the
literal 227A character should work with TeX.  Processing with pdftex is
not a problem; UTF-8 input is parsed and characters mapped to the
standard TeX commands/fonts.  (Unicode outside of Computer Modern does
not work, but that's not the problem here.)

2) As of the latest Texinfo release (6.0), there's also @U{227A} which
should behave identically, if you don't want binary in the source,
although I guess that's not an issue in your case.

3) It should not be a problem to make @math be a no-op inside @math.
That's surely desirable anyway.  Gavin or I can hack that into
texinfo.tex when we have a chance.

4) pinfo is still maintained by someone?  I thought it was abandoned a
decade or so ago.  (Just curious.)

Best,
Karl



Re: [help-texinfo] LilyPond - lowercase filenames (html)

2015-07-31 Thread Karl Berry
I think it's an aesthetic choice.

Hmm.  That doesn't seem like a good enough reason to break (or at best,
complicate) every cross reference mechanism that has been devised since
day one of Texinfo.  If we provided the feature, we'd be implicitly
recommending, or at least not denying it, and committing to making
cross-references and any other features work with it.  This does not
seem like a good way to spend time merely to cater to an "aesthetic
choice".

You guys can keep doing it, that's obviously up to you, but it doesn't
seem like a good thing to provide for the Texinfo world as a whole.
IMHO.  -k



Re: [help-texinfo] LilyPond - lowercase filenames (html)

2015-07-31 Thread Karl Berry
use only lowercase file names in --html output

Why do you need to do this?  -k




Re: [help-texinfo] Search full content of all info nodes similar to 'man -K '

2015-07-28 Thread Karl Berry
Your "low-tech" solution

BTW, even simpler: 
zgrep /usr/share/info/* foo

(And maybe other directories, depending on your system ...)

purchase an e-copy (e.g. Kindle version) of all the info-nodes
compiled together that would allow full-text searches?

To the best of my knowledge, no one has ever tried to put together an
electronic collection of GNU manuals in one place for download or
searching or e-reading or whatever.  It would be a lot of work to keep
up to date.  In practice, if you do a web search for any given term
together with "gnu" and "manual" or "info" or some such, you will
probably hit it.

A list of (pretty much) all GNU manuals is linked from
http://www.gnu.org/manual, FWIW.

(By the way, Kindles are all about DRM, so GNU wouldn't have anything to
do with them specifically, in any case.)

Best,
Karl



Re: [help-texinfo] makeinfo: defining variables with -D

2015-07-19 Thread Karl Berry
Hi David,

Sorry for the delayed reply.

   makeinfo -D "somedir somevalue"

That is the intended syntax (same as ever).  It works for me, for
instance with the minimal file

  \input texinfo
  @setfilename includevalue.info
  @verbatiminclude @value{somedir}/somefile.txi
  @bye

And then running with

  makeinfo -D "somedir ." includevalue.tex  

where somefile.txi is another trivial file in the current directory.

Can you show your actual document that fails (cut down if possible),
with the actual directory and file names?  And error messages given by
makeinfo, if any.  Perhaps some kind of (mis)interpretation is
happening.

Best,
Karl



Re: [help-texinfo] Cutting lines

2015-07-03 Thread Karl Berry
em-pinada

Hyphenation is done by TeX, and the patterns are loaded based on the
@documentlanguage.  If your plain TeX format does not include Spanish
hyphenation patterns, which appears to be the case, nothing can be done.
If you send a runnable .texi file and the resulting .log file, perhaps
more could be discerned.

For me, the following simple document shows the (presumably) correct
hyphenation of em-pi-na-da; if I comment out the @documentlanguage, so
that the standard American English hyphenation patterns are used, I get
emp-inada.  (@showhyphens is a plain TeX command, not Texinfo, but it
doesn't matter for our purposes here.)

\input texinfo
@documentlanguage es
@showhyphens{empinada}
@bye

Best,
Karl



Re: [help-texinfo] dpkg: error processing install-info (--configure):

2015-06-15 Thread Karl Berry
> /usr/sbin/update-info-dir: 1: /etc/environment: 4: not found

"4" is not a command.  The bug would appear to be in the
/etc/environment file.

Besides that, update-info-dir is not part of the (upstream) GNU Texinfo
package, which is what this mailing list is about.  Distros add it,
I guess.

Good luck,
Karl



Re: [help-texinfo] texi2pdf to PDF/X-1a:2001 format

2015-05-15 Thread Karl Berry
> requires the PDF conversion to use PDF/X-1a:2001.
> Is there a way to accomplish this with texi2pdf?

Not that I know of.  Certainly there is no pdf/x-specific stuff in
texinfo.tex.

I don't know if there is a way to post-process a PDF as created by
texinfo.tex into being PDF-X, but that's what I would suggest looking
into, instead of anything at the Texinfo or TeX levels.

  

The pdfx package is for LaTeX.  Not usable with Texinfo.

karl



Re: [help-texinfo] Troubles with xref in spanish

2015-04-22 Thread Karl Berry
IN where it must appears EN, 

Ok, now I can understand.  FYI, it actually has nothing to do with @xref
vs. other @...ref commands, but with how many arguments are specified.

Anyway, the solution is to add this line to txi-es.tex:
\gdef\putwordin{en}

It'll be in the next release.

Best,
Karl



Re: [help-texinfo] Troubles with xref in spanish

2015-04-17 Thread Karl Berry
git://git.savannah.nongnu.org/elisp-es.git

You're referring to elisp-lisp-intro-es.texi?  When I run that through
pdftex, I don't see any English in the @xref output.

You aren't reporting the specifics of what you are seeing that is wrong.
What words, precisely, are you seeing in English?  On which page?  For
instance, when I look at page 15 of your own emacs-lisp-intro-es.pdf,
the one committed to git, the xref to Mapas de Teclado is all in
Spanish.

Karl



Re: [help-texinfo] Cannot make texinfo-5.2

2015-04-05 Thread Karl Berry
In fact, I want to install newlib, but for newlib, texinfo has to be 
installed.

Oh.  You can probably just touch a .info file for newlib and it
shouldn't care further.  (newlib should be distributed with the .info,
or not require it -- seems like a bug in their source distribution.)
Alternatively, SL6 should surely have a texinfo package, which should
suffice.

Hope this helps,
Karl



Re: [help-texinfo] Cannot make texinfo-5.2

2015-04-05 Thread Karl Berry
I want to install texinfo-5.2 in Scientific Linux 6.

As Gavin said, it's presumably some kind of gnulib issue.  Apparently
gnulib thinks your implementation of strstr is so awful that it has to
replace it.  Sigh.

If you can, please try the pretest for the next release at
http://alpha.gnu.org/gnu/texinfo/texinfo-5.1.90.tar.xz.  Perhaps the
problem has already been fixed, whatever it is.

karl



Re: [help-texinfo] how does one encode a middle dot? and other questions

2015-04-05 Thread Karl Berry
at some point, it is envisonned to have a
command like @U{} to allow to put any unicode point.

We have @U for the upcoming release.  In fact I implemented it
specifically after the discussion of middle dot for Catalan in January
and February.

The dots are sometimes inside, sometimes outside the square brackets.

Ok, will look.

checking for a french Unicode locale... none
Why does it check for that? Is it just for running a test?
Or would it enable stuff?

It comes from gnulib/m4/locale-fr.m4.  I don't know why or what
dependency pulled it in.  We did not request it explicitly.  The test
result has no particular effect on Texinfo's behavior, so far as I know.

> Sixth, how do I run texi2any without installing it?

I use a one-line shell script:
exec /path/to/texinfo/checkout/tp/texi2any.pl "$@"
I suppose an alias would do as well, if preferred.

> but what will happen on a machine that does not use a UTF-8
> locale?  Will the resulting info file still be readable when the
> above command is used?  How will the guillemet get rendered there?

In my experience, the usual answer is that it will appear as binary
garbage.

In my further experience, the best answer is, don't use
@documentencoding UTF-8 unless it is really needed (e.g., the manual is
not written in English).

Not that anyone cares, but personally I deplore the current trend of
randomly forcing all manuals to UTF-8.  The plethora of resulting
Unicode quotes makes the manuals unreadable in non-UTF-8 environments.
I have taken to replacing the three Unicode bytes with SPC SPC ` and '
SPC SPC so I can use them.

I wish to check whether makeinfo still produces no blank line
between the items of a bulleted list (which 5.1 doesn't but
4.13 did).  

With the test file below, there is no blank line between the items with
either svn texinfo or with makeinfo 4.13 either.

I seem to recall precisely that 4.13 was inconsistent in this regard,
sometimes but not always adding blank lines.  And so when Patrice
discovered this, it seemed like the most user-controllable and
-understandable behavior was to preserve blank lines in the input
between items, but not have the program add blank lines sometimes but
not others.  Pretty sure other manuals used the
no-blank-line-insertion behavior for short lists.

I don't imagine that answer will make you happy, but it's where we are.

And whether @bullet{} still produces only a * (U+002A)
instead of a real [binary garbage] (U+2022) in an info file.

With the test file below, I get some multibyte character for the bullet.
I can't tell what it is, but it's probably the one you want.

best,
karl


\input texinfo
@setfilename listutf.info
@documentencoding UTF-8

@itemize
@item i.
@item j.
@end itemize

@bye



Re: [help-texinfo] Troubles with xref in spanish

2015-03-17 Thread Karl Berry
> The index and @ref are ok, but @xref, appears in english. Some
> idea?. 

When I run your file through texi2pdf, the 
  @xref{Mapas de teclado, , Mapas de Teclado}
on line 1190 of the source appears in the typeset output as
  Ve'ase Seccio'n 16.8 "Mapas de Teclado", pa'gina 197.
(Except with real accents and quotes.)  I see no English there.

My only wild guess is that perhaps you do not have txi-es.tex installed
where TeX can find it.  I'll attach the file, it's tiny.

If that's not it, please give the actual source that's rendered wrongly,
and the actual output you are seeing.  I can't debug your environment
telepathically :).

Best,
Karl



txi-es.tex
Description: Binary data


Re: [help-texinfo] Troubles with xref in spanish

2015-03-03 Thread Karl Berry
Hi,

The index and @ref are ok, but @xref, appears in english. Some
idea?. 

1) Please show the input that fails.
2) What output format?

If you're talking about the "*Note" or "*note" that appears in Info
format, that is part of the format and cannot be translated.  But then I
can't figure out what you're seeing as translated with @ref ...

Best,
Karl



Re: [help-texinfo] attribute ‘number’

2015-03-01 Thread Karl Berry
I'd suggest not adding data to the output formats unless there is a
real use for it.

The purpose of the XML format is to provide a maximal representation of
the Texinfo input.  There is no "use" for XML beyond that.

k



Re: [help-texinfo] Fwd: Texinfo questions

2015-02-07 Thread Karl Berry
Hi Stef,

Textadept (*).
A fair review : 
http://yfl.bahmanm.com/Members/ttmrichter/software-reviews/textadept-review

Interesting.  Thanks for mentioning it.

"@cartouche" is best used to highlight short phrases and concepts

In practice I have mostly seen @cartoutche used with a few lines of
code, or some other kind of example, which the author wants to set off
from the text.  (Personally I'm not convinced it's anything but ugly,
but that's a different story. :)

If I understand well, there is two alternatives to handle all output 
formats :

- 1) should be generated outside Texinfo, by including "pretty printed" 
sources, produced by an external process (as you suggest)...

- 2) should be generated inside Texinfo code, by writing new TeX code to 
handle the source layout...

Well, to support all output formats, hacking texinfo.tex is not enough
-- clearly that would do nothing to support Info/HTML/etc.  We would
have to introduce new language features and implement them in makeinfo,
as well as texinfo.tex.  That is not going to happen any time soon, if
ever.

So solution 1) is not only preferred, it's the only way at present ...

All the best,
Karl



Re: [help-texinfo] Fwd: Texinfo questions

2015-02-06 Thread Karl Berry
>I use Texinfo since 10 years, writing docs like this (1).

Very nice.

Is it possible to split a cartouche across pages?

No, and it won't be.  The way @cartouche is implemented it would be a
drastic amount of work to allow page breaks.  Hardly seems worth it.

>I'm dreaming to have something like "@sourcenumbered [name]" :

It's been a desired feature for a long time, but never implemented.
(Partly because there was never an explicit request for it before.)

My suggestion was to @input an automatically generated file with the
line numbers added. 

Yes, I agree.

I thought it would be possible to add the line numbers with TeX, but
that wouldn't help with the other output formats. If TeX could run
and use the output from an external program that would be another
option, although I doubt that is a feature.

pdfTeX/LuaTeX can read from pipes when the first character of the \input
or \openin is |.  (When \write18 is enabled.)  As you say, it won't help
with other formats.

>Is there a [...] macros collections for Texinfo on the web ?

No.  It wouldn't make sense, since Texinfo does not have any equivalent
of style files (by design).

k



Re: [help-texinfo] ../tools/info/makedoc: No such file or directory [solved]

2014-12-29 Thread Karl Berry
there's a makedoc in the TeX distribution, 

Not in upstream/native TeX Live there isn't.
Some distro(s) must add it.

but I think this one is different

Yep, unrelated.  Graham already answered with the details.

K



Re: [help-texinfo] ../tools/info/makedoc: No such file or directory [solved]

2014-12-24 Thread Karl Berry
Hi Graham,

Thanks for the note.

The solution is to install a tex system such as texlive.

I can't understand why that is the solution.  TeX Live has nothing to do
with makedoc.  makedoc is a tiny self-contained program in the info/
subdirectory of the texinfo source.  It has to be built and run
natively, rather than cross.  There is code in texinfo's configure[.ac]
to automatically do a subsidiary native configure and build to handle
makedoc.

I don't doubt the situation can be improved, but installing TeX Live
can't be the answer wrt makedoc.  Something else must have been going on.

Best,
Karl

P.S. Gavin, I wonder if we could get rid of the whole cross-compiling
native_tools/TOOLS_ONLY complexity by replacing the C implementation of
makedoc with a Perl/whatever implementation that does not need to be
compiled.  Just if you feel like looking into it ...



Re: [help-texinfo] How to replace nodes with section titles?

2014-10-25 Thread Karl Berry
Hi Jason,

Said simply: I don't want "nodes" to appear in HTML menus or HTML
navigational linkage; I want only the section-titles displayed.

Another approach which will get you most of the way there: use the same
strings for node names as for section names (and no descriptions).
Which is recommended (by me) anyway.

Nodes are a fundamental part of Texinfo's design.  As Patrice's answer
shows, trying to eradicate them from the output, per se, is not going
to be easy.

Good luck,
Karl



Re: [help-texinfo] documentlanguage problem

2014-10-09 Thread Karl Berry
Hi Laurence - please try the latest texinfo.tex  from
http://ftp.gnu.org/gnu/texinfo/texinfo.tex.  I fixed a bug in this area
a few months ago.  (It would be overkill to a full Texinfo release every
time I tweak texinfo.tex, so I make the .tex available separately.)

It should read txi-de.tex.

Hope it works out,
Karl



Re: [help-texinfo] Russian language in pdf

2014-08-08 Thread Karl Berry
Sorry, but there is nothing in texinfo.tex to load Cyrillic fonts, or
really anything but ISO Latin 1 and a little of 2 and a tiny number of
other characters.

It's a serious deficiency.  Maybe the only short term solution is to
generate the PDF from the HTML output somehow?  (I don't know how, but I
suppose it's possible).  Also, searching for "cyrillic texinfo.tex"
turns up some possible patches from Werner Lemberg and others.  I
haven't investigated in depth.

There used to be a separate texi2latex program (texi2latex.nongnu.org)
but it hasn't been updated for some years so likely doesn't work on your
source.  You could try.  

Long term, I hope we will have a LaTeX back end in makeinfo.  It's not
practical to try to support everything in texinfo.tex.  (An incomplete
attempt is in texinfo/contrib/texifont if any serious TeX hackers get
interested, though.)

(Also sorry for the delayed reply.)

karl



Re: [help-texinfo] Problem with @documentlanguage es

2014-05-14 Thread Karl Berry
Hi German,

1) please try the latest texinfo.tex, from
http://ftp.gnu.org/gnu/texinfo/texinfo.tex

2) if it still fails, please post/send me the source file with the
failing @documentlanguage (cut down to something minimal if possible).

I am not aware of any problem with @documentlanguage in general.

Best,
Karl



Re: [help-texinfo] Setting default image dpi using sphinx and texi2pdf

2014-05-06 Thread Karl Berry
Hi Alexander,

I believe that the reason is because texi2pdf default DPI for images

texinfo.tex (the underlying macro file involved) uses whatever image
file it is given, just scaled if asked for.  It does not somehow
de-sample the image :).  I believe you simply have to make higher
resolution screenshots.

If you think you have high(er)-res screenshots and something else is
going on, please send me one of your images.

k



Re: [help-texinfo] Using install-info --remove

2014-04-16 Thread Karl Berry
(bug-texinfo would have been appropriate for this, but anyway. :)

in the uninstall target in my Makefile I use install-info --remove. This
fails if the dir file is missing. I'd prefer if uninstall succeeds even
if some files were never installed.

I agree.

And in any case, I don't think install-info --remove should ever
attempt to *create* a new dir file.

I agree.

Will see what we can do.

Thanks,
Karl



Re: [help-texinfo] Porting macro-heavy makeinfo 4 to makeinfo 5

2014-04-15 Thread Karl Berry
Hi Scott,

@macro cncp {concept}
@cindex \concept\
\concept\
@end macro

I'm really sorry, but I just don't know the answer (without researching
it from scratch, anyway).  I don't understand Texinfo macros and
newlines.  All I can say is that in principle we didn't intend to
decrease functionality.

Patrice, can you help?

Sorry,
Karl



Re: [help-texinfo] (math) fractions

2014-04-04 Thread Karl Berry
Hi Nicolas,

  \[ \frac{a}{b} \]

\frac is only a LaTeX command, not present in plain TeX.

Try @math{{a \over b}}.

best,
k



Re: [help-texinfo] 15mm margin with @smallerbook

2014-04-01 Thread Karl Berry
I am wondering if there is a Tex command to specify a different
textwidth only for the @contents pages?

Do you know TeX at all?  It would be a lot faster for you to look at
texinfo.tex than to wait around for me.  Believe it or not, I have
expended considerable effort on making the macros as readable as
possible :).

Anyway, in this case, there is already a parameter for this, namely
\contentsrightmargin, which decreases the line length.  See the
definition of \startcontents.  The default is 1in, thus,

@tex
\global\contentsrightmargin = 3in
@end tex
@contents

Will this override the textwidth given in internalpagesizes for @contents?

As long as it's set after the internalpagesizes, it should.  I'd put it
right before the @contents.  Since nothing else uses it, there is no
need to reset it.

I haven't played with this in years, but that's what I see looking at
the code.  Let me know if problems.

best,
karl



Re: [help-texinfo] Book license for content formatted with GNU Texinfo

2014-03-30 Thread Karl Berry
Is it okay to use any (open/restrictive) license that an author
wishes for the content of a book, and use GNU Texinfo to produce a
formatted output?

Yes, you can use any license you want for the document.

k



Re: [help-texinfo] Different left, right margins based on odd, even pages

2014-03-23 Thread Karl Berry
Is there a command option in texinfo to generate a relatively larger
left margin for an odd-numbered page, and a larger right margin for an
even-numbered page for printing?

That's exactly what the bindingoffset argument to \internalpagesizes
is for.



Re: [help-texinfo] 15mm margin with @smallerbook

2014-03-18 Thread Karl Berry
@tex
\globaldefs=1
\internalpagesizes{7.4in}{4.8in}{-10.4mm}{-10.4mm}{0pt}{14pt}{9in}{6in}
@end tex

and the formatting and margins have gone out of line.

Indeed.  Sadly, the \globaldefs evidently messes up some other
parameter(s).  I tried some basic experiments but did not narrow it
down.  It would take a lot more debugging effort (\loggingall, etc.) to
figure out what and where.

What does work (for me) is to invoke your cmd like this:
@internalpagesizes{7.4in}{4.8in}{-10.4mm}{-10.4mm}{0pt}{14pt}{9in}{6in}
at the top level of the document (e.g., right after the @setfilename),
without any conditional.

The command won't be recognized by makeinfo, since it was never meant to
be invoked as a user-level thing.  If that's a problem, I see three
possible approaches:

1) If you use texi2dvi (aka texi2pdf, etc.), I think it would work to
   add it on the command line, as in:
  texi2dvi --texinfo='@internalpagesizes{...etc...}' foo.texi

2) If you put the command (by itself) in a separate file, say pagesize.texi,
   then it should be possible to conditionally include that file for TeX
   processing only, as in
@iftex
@include pagesize.texi
@end iftex

3) If all else fails, I can add your page size to texinfo.tex.


hope something works ...
karl



Re: [help-texinfo] 15mm margin with @smallerbook

2014-03-14 Thread Karl Berry
Is there a way I can get 15mm margin on all sides?

Not easily.  This kind of precise output layout definition is not what
Texinfo was designed for.

However, anything is possible.  I can't compute the numbers for you, or
explain all the parameters, but if you look at texinfo.tex, there is a
command \internalpagesizes which takes numerous parameters to define the
page layout.  You can call it like this:

@tex
\globaldefs=1
\internalpagesizes{...}{...}...
@end tex

There are eight parameters in all, you'll see what they are in texinfo.tex.

You should be aware that the default hoffset and voffset for TeX (i.e.,
origin for the page) is (1in,1in), everywhere, so your numbers should be
relative to that.  E.g., you'll want hoffset=voffset=-10.4mm (I guess).

Good luck,
Karl



Re: [help-texinfo] Roman page numbers for Dedication, Acknowledgements and Preface

2014-03-10 Thread Karl Berry
Regarding "hiding" a page number, maybe do @headings off at the
beginning of the page where you want the headings, and then @headings on
(or @headings double) at the beginning of the next page (after the page
break).  Or play around with @everyheading or related, depending on
exactly what you want to do.

Regarding your setting to -13 having no effect, I can't reproduce the
problem.  Below is my test file which has the dedication as i, the short
contents as ii, the contents as iii, the preface as iv, and the first
chapter as 1.  Perhaps it is a difference in texinfo.tex; try getting
the latest released version from
http://ftpmirror.gnu.org/texinfo/texinfo.tex.

Sorry this is so messy, but such is life.

karl

\input texinfo
@setfilename pageneg
@headings single

@tex
\global\pageno = -1
@end tex
This is the dedication page.
@page

@tex
\global\pageno = -2
@end tex
@shortcontents

@tex
\global\pageno = -3
@end tex
@contents

@tex
\global\pageno = -4
@end tex
This is the preface.
@page

@tex
\global\pageno = 1
@end tex
@chapter C1

This is chapter 1.

@chapter C2

This is chapter 2.

@bye




Re: [help-texinfo] Roman page numbers for Dedication, Acknowledgements and Preface

2014-03-09 Thread Karl Berry
Is it possible for texinfo to generate Roman page numbers for these
chapters?

I think something like:

@tex
\global\pageno = -5
@end tex

@include dedication.texi
..

You might have to explicitly reset \pageno to 1 after you're done with
the roman-numeralled sections.

Hope this helps,
karl



Re: [help-texinfo] Preventing word split at the end of a line

2014-02-26 Thread Karl Berry
Hi,

some words at the end of the line get split, 

Sure.  Hyphenation has been a standard part of Latin typesetting for
centuries.

Is there a way for texinfo to prevent such word splits, and instead
adjust the whitespace automatically?

I think this should do it:

@tex
\global\hyphenpenalty=1
@end tex

The  resultwillhavemuch   morespaced outwords,
since  that's  whatyou're   askingfor.

(Hopefully not as bad as that, though.)


To take it one step farther, if you don't care about justification
(=an even right-hand margin), you could also do

@tex
\global\rightskip = 0pt plus 20pt
@end tex

(adjust the value to taste) which will help TeX have less spacey lines.

It's possible that something in the document will reset one or both of
those parameters to the defaults, I can't say for sure.  Just have to
try it.

good luck,
karl



Re: [help-texinfo] Book of size 6 by 9 inches

2014-01-09 Thread Karl Berry
Is there a way to produce a book of size 6 by 9 inches?

@smallerbook, except it's not presently in makeinfo (Patrice, can you
add it?), so enclose it in @tex if you care about the other formats.

When I tried using @smallbook, the text gets cut from the right margin

You need to send the document showing where it goes wrong.  Normaly text
should break, well, normally.

best,
k



Re: [help-texinfo] Can't find tex

2013-12-30 Thread Karl Berry
texi2dvi needs findprog, but this isn't
installed. 

findprog is a shell function in texi2dvi itself.  The texi2dvi script is
self-contained and requires only standard Unix commands (sed, grep, etc.)
in addition to the commands for actually doing its job (tex, etc.).

karl



Re: [help-texinfo] Where to place localized info files?

2013-12-30 Thread Karl Berry
Hi Mario - in practice, what has been done for translated Texinfo
manuals is to give them unique names, e.g., recutils-de.{texi,info,...}
and let the user can choose the one desired.

There is no feature for automatically choosing a localized manual.
Also in practice, there are very few translated manuals, so this is not
a serious problem.

Having two different (English vs. German) files named recutils.info is
not the way to go, as far as I can see.

Best,
karl



Re: [help-texinfo] Active hyperlinks in PDF and DVI output

2013-10-24 Thread Karl Berry
Hi John,

How are you generating the PDF's?  If it involves running pdftex, what
version of pdftex do you have?  I can't think of any particular reason
why you wouldn't be getting them.  Cross-references have been links in
PDF output (when using pdftex) for many years.

k



Re: [help-texinfo] spacing around bullets

2013-10-04 Thread Karl Berry
Hi Mark,

Is there any way to control the spacing before and after a bullet?

There is nothing in the language for it.  That is not a Texinfo-ish
kind of thing to do :).

If you're talking about the HTML output, I suppose it could be done with
CSS somehow, but I don't have any recipes at hand.

If you're talking about the PDF/DVI output of itemized lists, I imagine
it could be done with some TeX-specific hackery.  Let me know if you
want to go that route.

Best,
Karl



Re: [help-texinfo] texi2any --html 5.1 Questionable Header Link

2013-09-29 Thread Karl Berry
select "(dir)" makes the browser try to resolve ../dir/index.html or
hostname:8080/dir/index.html

Which errors out. Wouldn't pointing to ../index.html#dir be better?

Probably.  Thanks for the suggestion.  I was under the impression that
there was a customization variable to allow specifying where it goes,
but sadly, I'm not seeing that now.

Next: Team Members, Up: (dir)   [Contents][Index]
to having a space or two added between  [Contents]  [Index]

Yes, perhaps.

Thanks again,
Karl



Re: [help-texinfo] Headings HTML Target

2013-09-20 Thread Karl Berry
Hi Anthony,

What controls the headings (navigation bar) or even a footer
in the HTML output? I have tried many things to no avail.

I haven't tried it, and Patrice could answer better, but ... see
http://www.gnu.org/software/texinfo/manual/texinfo/html_node/Customization-Variables-for-_0040_002dCommands.html

E.g., makeinfo -c 'everyheading=@thischapter...'  ?

However, it doesn't seem like the same thing to me, so I'm not sure.

For footers, there is also the cust variable PRE_BODY_CLOSE.  That might
work better.  Poke around the doc ...

This is all with makeinfo 5.  It's not possible to do much in this
regard with makeinfo 4.

Hope this helps,
Karl



Re: [help-texinfo] texi2dvi breaks on http://nco.sf.net/nco.texi

2013-09-08 Thread Karl Berry
Hi Charlie,

'->^
\bgroup \prim@s
\thistitle ...nym {NCO} \value {nco-edition} User'
  s Guide

Not an internal limit.  That's about TeX parsing (i.e., catcodes) of the
' char in the @settitle (or maybe the @titlepage).  As if the title is
being printed in math mode.

My first suggestion is to try the current texinfo.tex
(http://ftpmirror.gnu.org/texinfo/texinfo.tex).  (This is nothing about
texi2dvi per se, but about texinfo.tex.)  When I tried it, it seemed to
get past that point, though of course I'm missing all the subfiles and
other dependencies.

Unfortunately, I have an idea that it might be happening when a page
break occurs in the middle of a @tex environment, as you speculate, or
maybe an @math expression.  In that case, probably the only way to find
it is by chopping out chapters.  But I may be able to fix it even
without the failing example.  I'll take a look tomorrow if still needed.

Best,
Karl

P.S. I suggest moving @contents to the beginning, where toc's belong.
P.P.S. The canonical spelling of Texinfo is "Texinfo" :).



Re: [help-texinfo] Translation files in texinfo format

2013-08-08 Thread Karl Berry
Hi Bastien - I don't know of any easier or more "standard" way to do
translations of Texinfo documents than to simply translate it as a
document, creating pspp-es.texi (or whatever).  And then do the usual
three-way diff when the English version is updated.

Perhaps it would be possible to somehow "import" a Texinfo manual into
gettext (paragraph by paragraph?) to ease handling of updates, but I
have no idea how to do so; bug-gett...@gnu.org would be the place to get
ideas along those lines, I think.  (Unless someone else here chimes in.)

Best,
Karl



Re: [help-texinfo] Version 5.X versus 4.13 and the netperf manual

2013-05-01 Thread Karl Berry
Hi Rick.  I'm confused on several counts, but here are some thoughts:

- my wild guess is that the problem is an old version of texinfo.tex on
the system.  You could ship the current version inside netperf and
perhaps eliminate the problem that way.

- I would take a look but http://www.netperf.org/svn/netperf2_trunk/doc/
just says "This XML file does not appear to have any style..." 
Followed by
   Could not open the requested SVN filesystem
  
and I'm afraid I didn't want to go all the way to the original tarball.
If you can send your actual document that fails in a way that I can run,
independent of the rest of netperf, I might be able to find something
that could be done at the document level.

- Automake does not build .ps automatically.  Or .dvi for that matter.
Only .info.  So why does it matter if the Makefile.in has the rules to
build .ps?  How does that help Debian?  I don't get it.  It seems like
only a good thing, even though it cannot work on any conceivable system.
(For example, it will obviously fail on a system without TeX installed.)

All the best,
Karl



Re: [help-texinfo] preferred way to change output for a macro

2013-04-29 Thread Karl Berry
me to view @whatever intentionally rather than imperatively

It is!  The whole meaning of "intensional" typesetting is that you don't
care what the output is.  @var means "metasyntactic variable", so it
should be used that way.  I'm sure we're in agreement on that :).

It's when you want to impose a particular format on the output that
things become "imperative".  Of course it is not unreasonable to want a
different style (especially for something as quasi-standard as angle
brackets for metavars), it is simply beyond what Texinfo was originally
designed to do.

All output customizations are a break with the original idea of "say
what it is and not how you want it to look".  As I said in another
thread yesterday, Texinfo was never intended to be a general-purpose
typesetting language where you can get output of whatever kind is
desired.

Anyway, Patrice and I are discussing again the warning when redefining
Texinfo commands.

Best,
karl



Re: [help-texinfo] centering floats?

2013-04-28 Thread Karl Berry
> As Patrice said ... no.
Didn't see this.

http://lists.gnu.org/archive/html/help-texinfo/2013-04/msg5.html
(not that it really matters)

(Patrice: Arnold isn't on help-texinfo.  In general it's good to
explicitly include the sender when replying, unless you know for s/he is
on the list.)

Does LaTeX handle this?

Sure, (La)TeX and troff are general-purpose typesetting languages, so it
is perfectly plausible to make centered tables+captions in them, or
anything else.

Texinfo isn't for general typesetting, never has been, never will be.
Both a strength and a weakness, but it is what it is.

Some tables you did for me
in raw TeX and they're centered. 

It should be vastly easier to uncenter those tables than to add a
"center this table" command (a misfeature anyway IMHO) to Texinfo.  Let
me know if you want to go that way and want me to look at it ...

Best,
karl



Re: [help-texinfo] preferred way to change output for a macro

2013-04-28 Thread Karl Berry
for changing the indicating commands formatting there is @definfoenclose 

@definfoenclose is about defining new commands, not changing existing
ones.  Right?  Robert wants to change the output for @var, but is still
meaning "metasyntactic variable", so using a different @command isn't
really desirable.

k



Re: [help-texinfo] preferred way to change output for a macro

2013-04-28 Thread Karl Berry
Hi Robert,

It's not just you :).

Surely it is not suggesting that such changes are easy for Texinfo
developers alone,

[Wrote this yesterday, failed to send, somewhat overlaps with Patrice's
mail just sent, sigh.]

I agree it's bizarre nowadays, but I think that was in fact the intent
when it was originally written.  For the first years of Texinfo, people
formatted it in Emacs, with M-x texinfo-format-buffer.  In that context,
it is natural to redefine Lisp functions to do something different
without any further ado.  And the number of developers of Texinfo (and
GNU) was roughly equal to the number of the users.

Anyway.  The contemporary question is, should we allow redefinitions
of Texinfo commands without a warning?  I'm not sure.  In your case, it
is harmless -- you know what you are doing and what you want.  (By the
way, what specifically is your preferred output for @var?  I'm just
curious.)  But I can easily imagine people using @macro to unknowingly
redefine a lesser-known Texinfo command, with consequent confusion down
the line.

In any case, clearly the documentation needs to be improved.
(Most minorly, that "intentiontal" should be "intensional".  Anyway.)

k



Re: [help-texinfo] preferred way to change output for a macro

2013-04-26 Thread Karl Berry
Hi Robert,

so I redefined the @var macro accordingly.

It's intentional that redefining a Texinfo command gives a warning.  The
idea is to use new names if you want different behavior, instead of
redefining existing ones.

Best,
Karl



Re: [help-texinfo] using pod2texi and pod2man on the same file

2013-04-17 Thread Karl Berry
Hi David,

links from the info manual to various man page

I'm just wondering, which man-pages-from-pods are you thinking of?

Thanks,
k



Re: [help-texinfo] Macros within @example and newlines, with TeX output

2013-04-16 Thread Karl Berry
Hi Luca,

You could try adding @c, as in:

@macro q{text}
\text\@c
@end macro

(I don't know if it will change things, and can't try it myself right
now, sorry.  It's just what comes to mind.)

As you probably know, there is a long list of caveats, many relating to
newlines, in the Macro Details node, including this @c stuff.
Discrepancies are unavoidable, all fixes just make the problem worse.
As that node says, -E sometimes helps and sometimes makes things worse.
If it works for you, be happy.

Overall, I recommend (a) not using @macro, perhaps by (b) using m4
(a rational macro system) instead.

k



Re: [help-texinfo] centering floats?

2013-04-15 Thread Karl Berry
Hi Arnold,

Is there a general, easy way, to center floats, including their captions?
Mainly for TeX, where the floats are mainly @mulitable

As Patrice said ... no.  Not even a specific and difficult way, let
alone general and easy.  And it's hard for me to picture a decent way to
specify such a thing :(.  

A block command for centering analogous to @flushleft/@flushright (or
@raggedright) would not be helpful.  What's desired is not centering
invididual lines of text (or table row) individually, but rather to
typeset a whole paragraph/table and center that.  Except as soon as
there is normal text the whole line width is used so there is nothing to
center.  Quickly gets complicated.

Commands like @centercaption and @centermultitable are about all I can
imagine that would be implementable, and that would be so horribly ugly ...

Sorry,
k



[help-texinfo] info remembering cursor position

2013-04-11 Thread Karl Berry
Date: Wed, 10 Apr 2013 10:32:10 +0200
From: "Arne Babenhauserheide (IMK)" 

PS: Is it possible to teach info to remember the line of the cursor
in a given node? That would make browsing back and forth much easier
(click on a link in a menu to go into a subnode, hit u to get back,
move to the next interesting menu entry).

If you use l instead of u, it remembers where you've been.
At least for me.  And that even seems somewhat logical.

Nevertheless, I can see how it would be nicer if it remembered the line
if you ended up back at the "l" node regardless of what command was used
to get there.  I've wished for that myself sometimes.

Sergey, wdyt?

Thanks,
k



Re: [help-texinfo] How to make info fail if the topic is not found?

2013-04-11 Thread Karl Berry
(I did not understand that from the documentation)

I never really knew it myself :).

Suggestion (not necessarily perfect, but hopefully a start):

Thanks much, I will contemplate.




Re: [help-texinfo] File no longer builds after upgrade to Texinfo 5.0

2013-03-05 Thread Karl Berry
My first guess is that you need to replace @kern0 by \kern0, 

Yes.  Similarly \ignorespaces.



Re: [help-texinfo] RTEMS Texinfo Update Experience Blog

2013-02-24 Thread Karl Berry
http://rtemsramblings.blogspot.com/2013/02/rtems-texinfo-tools-update.html

Thanks Joel.  I added a link to the Texinfo home page.
http://www.gnu.org/software/texinfo/

k



Re: [help-texinfo] Unicode line drawing chars in pdf output

2013-01-19 Thread Karl Berry
For the record, DejaVu (and many other "big" fonts) have had TeX support
available for some time, including the tfm's and type1's needed for
(pdf)tex. E.g.: http://mirror.ctan.org/fonts/dejavu
And I include the packages in TeX Live.
(I wonder if GNU freefont has them; seems like it should.)

However, I doubt many users actually have them, since most TeX users do
not use the original TeX Live.  Also, there is the problem James alluded
to of at least somewhat matching Computer Modern.  And there is the
problem that the result will surely be if the *user*'s setup does not
have them, which is far from unlikely, in my experience.

Thus I'm not sure creating graphics with Unicode characters is such a
good idea, even in theory.  And, in practice, I rather suspect that
there would be substantial complications with using the line-drawing
characters in TeX.

But if someone cares enough to do the experiments, that would be fine.

k



Re: [help-texinfo] IXIN 1.7 available

2013-01-15 Thread Karl Berry
I have added a SXML backend based on the XML one.  
texi2any --set SXML=1 myfile.texi

1) maybe the name should be IXIN rather than SXML?  I thought SXML is
just a generic name for XML written in sexprs.  Or am I wrong?
(For the same reason, we should not have named the "TexinfoXML" output
just "XML", but it's too late now.  Let's not compound the mistake.)

2) Should there be an --ixin option, like all the other output formats?

3) Should we add this to the documentation and make it an official part
of 5.0, or do you (both) think that is still premature?  I don't mean
that every detail has to be nailed down and put in stone, but rather
that the basic idea of "IXIN output" be mentioned.

k



Re: [help-texinfo] texinfo.tex language translation

2013-01-12 Thread Karl Berry
Hi Jorge,


http://geomview.cvs.sourceforge.net/viewvc/geomview/geomview/doc/pt_BR/texinfo.tex?view=markup

Gee, only five years old.

In the font.texi document i have this entry:
.@pxref{filename}.

In the generate font.pdf i have:
.see Figure X.Y.

I need chage to:
.see Monalisa X.Y.

There must be more to the situation, because @pxref{filename} by itself
(in standard Texinfo) is a reference to a node in the current document,
and would not generate anything like "Figure X.Y".

FWIW, GNU Texinfo has provided the @float and related commands to
support figures since version 4.7, released in 2004.

k



  1   2   3   4   5   >