unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Re: html manual +css
Date: Mon, 5 Jun 2017 23:44:04 +0900	[thread overview]
Message-ID: <F5785A19-2488-4BBD-957B-764C6F9D630E@gmail.com> (raw)
In-Reply-To: <D74826DC-A52A-4878-A174-1EF86CC26DA4@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]


> 2017/06/03 0:29、Jean-Christophe Helary <jean.christophe.helary@gmail.com>のメール:
> 
>> 
>> On Jun 3, 2017, at 0:22, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>>> Regarding the texi code, I'm seeing @smallexample and @example that are not relate to the actual size of the code but @smallexample as an HTML class is not associated with the brown background while @example is.
>>> 
>>> In the print version, @smallexample is set in a smaller font size so
>>> that long lines fit. Paper has a ridiculously small line length limit.
>> 
>> Right.  (Although the difference between the maximum line lengths in
>> these two is quite small.)  So you cannot simply replace all
>> @smallexample's by @example's, not without reviewing the line length
>> first.
> 
> Ok, so I guess the easiest way to deal with that is to add the @smallexample class to the CSS then.

Ok, I have something that works, except that I need advice on the licences and on the whole process.

What I did to get the same CSS as the site is curl the css files. There are 3 of those:
https://www.gnu.org/software/emacs/manual.css
https://www.gnu.org/style.css
https://www.gnu.org/reset.css

To make things simpler I regrouped them into just one that I put the root of the /doc directory.

My understanding is that this file must have licence information, but it is composed of 3 different files, one of which (reset.css) has the following header:

/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/

So, what am I to do with the merged file ?

I modified the file so that smallexamples gets the same css as example.

Then, in each Makefile.in I modifier the HTML_OPTS to add the reference to the CSS data.
HTML_OPTS = --no-split --html --css-include=../manual.css

When I make the doc I get the CSS inside the <style> tag, as expected.

When that is properly implemented and committed, the best would be to have the gnu site change style.css so that both the online and the offline sets have the same looks.

Jean-Christophe


[-- Attachment #2: doc.html.diff --]
[-- Type: application/octet-stream, Size: 9921 bytes --]

diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index ffcc4baafd..cc751e5b6f 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -53,7 +53,7 @@ MKDIR_P = @MKDIR_P@
 
 GZIP_PROG = @GZIP_PROG@
 
-HTML_OPTS = --no-split --html
+HTML_OPTS = --no-split --html --css-include=../manual.css
 
 # Options used only when making info output.
 # --no-split is only needed because of MS-DOS.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index d8e203fd06..34e5422111 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -41,7 +41,7 @@ MKDIR_P = @MKDIR_P@
 
 GZIP_PROG = @GZIP_PROG@
 
-HTML_OPTS = --no-split --html
+HTML_OPTS = --no-split --html --css-include=../manual.css
 
 # Options used only when making info output.
 INFO_OPTS= --no-split
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 89eb81093d..2cb36c038c 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -45,7 +45,7 @@ MKDIR_P = @MKDIR_P@
 
 GZIP_PROG = @GZIP_PROG@
 
-HTML_OPTS = --no-split --html
+HTML_OPTS = --no-split --html --css-include=../manual.css
 
 # Options used only when making info output.
 INFO_OPTS= --no-split
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index f365c80493..e80e778bec 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -965,10 +965,9 @@ extra values to be formatted are ignored.
 decimal number immediately after the initial @samp{%}, followed by a
 literal dollar sign @samp{$}.  It causes the format specification to
 convert the argument with the given number instead of the next
-argument.  Field numbers start at 1.  A field number should differ
-from the other field numbers in the same format.  A format can contain
-either numbered or unnumbered format specifications but not both,
-except that @samp{%%} can be mixed with numbered specifications.
+argument.  Field numbers start at 1.  A format can contain either
+numbered or unnumbered format specifications but not both, except that
+@samp{%%} can be mixed with numbered specifications.
 
 @example
 (format "%2$s, %3$s, %%, %1$s" "x" "y" "z")
diff --git a/doc/manual.css b/doc/manual.css
new file mode 100644
index 0000000000..0aec934601
--- /dev/null
+++ b/doc/manual.css
@@ -0,0 +1,193 @@
+/*
+Copyright (c) 2009, Yahoo! Inc. All rights reserved.
+Code licensed under the BSD License:
+http://developer.yahoo.net/yui/license.txt
+version: 2.8.0r4
+*/
+html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
+
+/***  PAGE LAYOUT  ***/
+
+html, body {
+   font-size: 1em;
+   text-align: left;
+   text-decoration: none;
+}
+html { background-color: #e7e7e7; }
+
+body {
+   max-width: 74.92em;
+   margin: 0 auto;
+   padding: .5em 1em 1em 1em;
+   background-color: white;
+   border: .1em solid #c0c0c0;
+}
+
+
+/*** BASIC ELEMENTS ***/
+
+/* Size and positioning */
+
+p, pre, li, dt, dd, table, code, address { line-height: 1.3em; }
+
+h1 { font-size: 2em; margin: 1em 0 }
+h2 { font-size: 1.50em; margin: 1.0em 0 0.87em 0; }
+h3 { font-size: 1.30em; margin: 1.0em 0 0.87em 0; }
+h4 { font-size: 1.13em; margin: 1.0em 0 0.88em 0; }
+h5 { font-size: 1.00em; margin: 1.0em 0 1.00em 0; }
+
+p, pre { margin: 1em 0; }
+pre { overflow: auto; padding-bottom: .3em; }
+
+ul, ol, blockquote { margin-left: 1.5%; margin-right: 1.5%; }
+hr { margin: 1em 0; }
+/* Lists of underlined links are difficult to read. The top margin
+   gives a little more spacing between entries. */
+ul li { margin: .5em 1em; }
+ol li { margin: 1em; }
+ol ul li { margin: .5em 1em; }
+ul li p, ul ul li { margin-top: .3em; margin-bottom: .3em; }
+ul ul, ol ul { margin-top: 0; margin-bottom: 0; }
+
+/* Separate description lists from preceding text */
+dl { margin: 1em 0 0 0; }
+/* separate the "term" from subsequent "description" */
+dt { margin: .5em 0; }
+/* separate the "description" from subsequent list item
+   when the final <dd> child is an anonymous box */
+dd { margin: .5em 3% 1em 3%; }
+/* separate anonymous box (used to be the first element in <dd>)
+   from subsequent <p> */
+dd p { margin: .5em 0; }
+
+table {
+   display: block; overflow: auto;
+   margin-top: 1.5em; margin-bottom: 1.5em;
+}
+th { padding: .3em .5em; text-align: center; }
+td { padding: .2em .5em; }
+
+address { margin-bottom: 1em; }
+caption { margin-bottom: .5em; text-align: center; }
+sup { vertical-align: super; }
+sub { vertical-align: sub; }
+
+/* Style */
+
+h1, h2, h3, h4, h5, h6, strong, dt, th { font-weight: bold; }
+
+/* The default color (black) is too dark for large text in
+   bold font. */
+h1, h2, h3, h4 { color: #333; }
+h5, h6, dt { color: #222; }
+
+a[href] { color: #005090; }
+a[href]:visited { color: #100070; }
+a[href]:active, a[href]:hover {
+   color: #100070;
+   text-decoration: none;
+}
+
+h1 a[href]:visited, h2 a[href]:visited, h3 a[href]:visited,
+ h4 a[href]:visited { color: #005090; }
+h1 a[href]:hover, h2 a[href]:hover, h3 a[href]:hover,
+ h4 a[href]:hover { color: #100070; }
+
+ol { list-style: decimal outside;}
+ul { list-style: square outside; }
+ul ul, ol ul { list-style: circle; }
+li { list-style: inherit; }
+
+hr { background-color: #ede6d5; }
+table { border: 0; }
+
+abbr,acronym {
+   border-bottom:1px dotted #000;
+   text-decoration: none;
+   cursor:help;
+}
+del { text-decoration: line-through; }
+em { font-style: italic; }
+small { font-size: .9em; }
+
+img { max-width: 100%}
+
+
+/*** SIMPLE CLASSES ***/
+
+.center, .c { text-align: center; }
+.nocenter{ text-align: left; }
+
+.underline { text-decoration: underline; }
+.nounderline { text-decoration: none; }
+
+.no-bullet { list-style: none; }
+.inline-list li { display: inline }
+
+.netscape4, .no-display { display: none; }
+
+
+/*** MANUAL PAGES ***/
+
+/* This makes the very long tables of contents in Gnulib and other
+   manuals easier to read. */
+.contents ul, .shortcontents ul { font-weight: bold; }
+.contents ul ul, .shortcontents ul ul { font-weight: normal; }
+.contents ul { list-style: none; }
+
+/* For colored navigation bars (Emacs manual): make the bar extend
+   across the whole width of the page and give it a decent height. */
+.header, .node { margin: 0 -1em; padding: 0 1em; }
+.header p, .node p { line-height: 2em; }
+
+/* For navigation links */
+.node a, .header a { display: inline-block; line-height: 2em; }
+.node a:hover, .header a:hover { background: #f2efe4; }
+
+/* Inserts */
+table.cartouche td { padding: 1.5em; }
+
+div.display, div.lisp, div.smalldisplay,
+ div.smalllisp { margin-left: 3%; }
+
+div.example, div.smallexample { padding: .8em 1.2em .4em; }
+pre.example { padding: .8em 1.2em; }
+div.example, div.smallexample, pre.smallexample, pre.example {
+   margin: 1em 0 1em 3% ;
+   -webkit-border-radius: .3em;
+   -moz-border-radius: .3em;
+   border-radius: .3em;
+   border: 1px solid #d4cbb6;
+   background-color: #f2efe4;
+}
+div.example > pre.example {
+   padding: 0 0 .4em;
+   margin: 0;
+   border: none;
+}
+
+pre.menu-comment { padding-top: 1.3em; margin: 0; }
+
+
+/*** FOR WIDE SCREENS ***/
+
+@media (min-width: 40em) {
+   body { padding: .5em 3em 1em 3em; }
+   div.header, div.node { margin: 0 -3em; padding: 0 3em; }
+}
+
+/* Style-sheet to use for Emacs manuals  */
+
+
+/* makeinfo convert @deffn and similar functions to something inside
+   <blockquote>.  style.css uses italic for blockquote.  This looks poor
+   in the Emacs manuals, which make extensive use of @defun (etc).
+   In particular, references to function arguments appear as <var>
+   inside <blockquote>.  Since <var> is also italic, it makes it
+   impossible to distinguish variables.  We could change <var> to
+   e.g. bold-italic, or normal, or a different color, but that does
+   not look as good IMO.  So we just override blockquote to be non-italic.
+   */
+blockquote { font-style: normal; }
+
+var { font-style: italic; }
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 8ff823200a..b8e0e857bd 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -46,7 +46,7 @@ MKDIR_P = @MKDIR_P@
 
 GZIP_PROG = @GZIP_PROG@
 
-HTML_OPTS = --no-split --html
+HTML_OPTS = --no-split --html --css-include=../manual.css
 
 # Options used only when making info output.
 # (Note that idlwave, info used --nosplit even without the .info extension.)
diff --git a/src/editfns.c b/src/editfns.c
index a5088b0a1f..29af25aab4 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3901,10 +3901,9 @@ where field is [0-9]+ followed by a literal dollar "$", flags is
 followed by [0-9]+.
 
 If a %-sequence is numbered with a field with positive value N, the
-Nth argument is substituted instead of the next one.  A field number
-should differ from the other field numbers in the same format.  A
-format can contain either numbered or unnumbered %-sequences but not
-both, except that %% can be mixed with numbered %-sequences.
+Nth argument is substituted instead of the next one.  A format can
+contain either numbered or unnumbered %-sequences but not both, except
+that %% can be mixed with numbered %-sequences.
 
 The + flag character inserts a + before any positive number, while a
 space inserts a space before any positive number; these flags only

  reply	other threads:[~2017-06-05 14:44 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02 13:49 html manual +css Jean-Christophe Helary
2017-06-02 14:28 ` Paul Eggert
2017-06-02 14:45   ` Jean-Christophe Helary
2017-06-02 14:56     ` Jean-Christophe Helary
2017-06-02 15:14     ` Yuri Khan
2017-06-02 15:22       ` Eli Zaretskii
2017-06-02 15:29         ` Jean-Christophe Helary
2017-06-05 14:44           ` Jean-Christophe Helary [this message]
2017-06-06 22:41             ` Richard Stallman
2017-06-06 23:47               ` Jean-Christophe Helary
2017-06-07 14:27                 ` Jean-Christophe Helary
2019-12-23 16:54                   ` Jean-Christophe Helary
     [not found]                     ` <jwvr20v6jug.fsf-monnier+emacs@gnu.org>
2019-12-24  9:06                       ` Jean-Christophe Helary
2019-12-24 14:37                       ` Jean-Christophe Helary
2019-12-24 14:43                         ` Jean-Christophe Helary
2019-12-25 22:03                         ` Stefan Monnier
2019-12-26  0:08                           ` Jean-Christophe Helary
2019-12-26 14:09                             ` Jean-Christophe Helary
2019-12-26 14:45                               ` Stefan Monnier
2019-12-26 15:08                                 ` Jean-Christophe Helary
2019-12-26 15:22                                   ` Jean-Christophe Helary
2019-12-26 15:50                                     ` Stefan Monnier
2019-12-26 16:27                                       ` Yuri Khan
2019-12-26 18:17                                         ` Stefan Monnier
2019-12-26 16:53                                       ` Jean-Christophe Helary
2019-12-30 11:53                                       ` Jean-Christophe Helary
2020-01-15 11:20                     ` Gavin Smith
2020-01-15 12:12                       ` Jean-Christophe Helary
2020-01-15 13:43                         ` Patrice Dumas
2020-01-15 13:52                           ` Jean-Christophe Helary
2020-01-15 14:18                             ` Patrice Dumas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F5785A19-2488-4BBD-957B-764C6F9D630E@gmail.com \
    --to=jean.christophe.helary@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).