Wikibooks:Reading room/Assistance

From Wikibooks, open books for an open world
Jump to: navigation, search
Replacement filing cabinet.svgArchivesWikibooks Discussion Rooms
Discussions Assistance Requests
General | Proposals | Projects | Featured books General | Technical | Administrative Deletion | Undeletion | Import | Permissions

Welcome to the Assistance reading room where Wikibookians help each other solve problems encountered while contributing to books or otherwise taking part in the Wikibooks community.

Putting a Photo in a Post[edit]

Hello, I am doing a Wikibook project at my university. I was wondering what is the easiest possible way of adding photos into post? I have tried following the guide in 'help' section but it did not work. Any suggestions how to do it?

Frkelly (discusscontribs) 00:20, 6 March 2017 (UTC)

Please upload your photos on Commons first. JackPotte (discusscontribs) 00:38, 6 March 2017 (UTC)
Let me try to be a bit more helpful
The general answer is the photo must be locatable by wikimedia software. Many examples of HOW TO embed pictures can be seen on any lengthy history article in the Wikipedias. Open one or two for edit and see what's happening 'under the hood'.

The tokenized examples following should give you the basics.

  1. The image must be present and locatable by the system software, so be loaded into a wikimedia file namespace, here and on the commons, those have the NAMESPACE prefix 'FILE:', the semicolon setting off the namespace.
  2. The image should be a free image, such as those found on the Wikimedia Commons. See the posts (2-3) above for how to search for such.
     • If, on the other hand, you own the image (took it), the wizard linked above will guide you into adding it to the commons. Using the template '{cc-by-sa-3.0}' for the permissions simplifies things, and you ought locate several categories for the picture. place, social circumstances, events, era, can all be used to classify such photos, and there are likely categories set up that cover the image subject matter. As many of these as you can match up should be entered when prompted. (This can be AND SHOULD BE prepared in advance using a cut and paste of a list of categories from a text file, as can a description text paragraph for the image(s) being uploaded.) A location Coordinate is useful, and you'll need to have the origination date. Many camera's will have these set in the meta-data, so use ALT+↵ Enter on the file to see properties to see these. (The date entered at the prompt ought match the meta-data, not the computer file date.)
  3. Matching the exact file name is important. Its a computer, so GIGO rulez apply: Garbage-IN, gets Garbage-OUT!
  4. The general embedded image format is:
    [[ File: Name_Given_the_uploaded_image_file.EXTENSION |alt=Alt-caption| thumb | size | position | CAPTION ]]
    1. 'alt=' is for blind readers, so a simple description of the photo. -- Totally optional and hardly seen. One useful trick is to define the alt=with an wikilink to the file, no parameters. This allows a user to 'one-click' on the thumbs image and get a full screen blown-up view. The syntax for that trick is:
      [[ File: Name_Given_the_uploaded_image_file.EXTENSION | alt=[[ File: Name_Given_the_uploaded_image_file.EXTENSION ]] |thumb | size | position | CAPTION ]]
    2. position - defaults right, so right margin position can be skipped, otherwise either the keyword 'center' or 'left' or 'right'
    3. size defaults to assuming pixels, so '450px' would set width scaling for 450px in the relative page. Like text in a browser, this is also scaled by the viewers zoom-settings on a page. Alternative syntax allows width and height: wwwxhhh px, but I may not be remembering it exactly, and gets a bit tricky, iirc. Play with it in a sandbox.
  5. Assuming you want a picture created by yourself, it needs uploaded:
    1. open a folder to your pictures sources and display in details mode so you can see the filenames. (Keep this open. ⊞ Win+E opens an explorer window)
    2. In your browser, edit the target page with with your image specification as noted above. Give it an appropriate caption. (Your text explanation about the photo when you upload it, ought be more complete as the photo by itself does not have the text context your page is giving the image.) When you preview, the image will appear as a redlink box if the link is attempting to work. Save at any time.
    3. In another browser window or tab, open the Commons upload wizard. Follow the directions to where it asks where the image is...
    4. ALT-TAB and SHFT-ALT-TAB to get to your image containing folder. Double-click the filename to 'edit' as if renaming it. Type CTRL+A, then CTRL+C, then ESC to copy the exact filename+EXTENSION into the cut buffer. (Escape will close the false edit)
    5. Click on your address window to see the actual pathspec for your file. This will likely be on drive C:, and (a bit operating system 'generation' dependent) be of the form C:\users\yourID\where-is-data\pictures-directory-path where there are a number of folders separated by '\' path-delimiters.
    6. return to the upload wizard with ALT-TAB, use the button to navigate to that folder.
    7. Paste in the cut buffer in the filename window. Click the upload button, and follow the wizard's prompts. You will need:
      1. A description
      2. date
      3. categories classifying the photo subject
      4. licensing you wish to apply, this can range from release into the Public Domain to GNU licences or the Creative Commons Share licenses. In these later two cases, others may use your photo, but may need to contact you under some uses. The CC licenses (e.g. {{cc-by-sa-3.0}}) generally mean they can use but must attribute you as source. The GNU, so-called 'copy-left' license is similar. If you don't care, give it a public domain tag: {{PD-self}} → (Commons page)
  6. Once your picture is accepted by the wizard, each image upoaded will present two data windows below the titles:
    1. To link to it in HTML, copy this URL:
    2. To use the file in a wiki, copy this text into a page:
  7. Those can be clicked on to select, with a CTRL+A + CTRL+C and transferred to a text page, editor, wiki or whatever. If you click and copy the wikimarkup version, that can be pasted directly in a wikimedia wiki project, and will manifest. You'll note the 'Caption' is the text you gave describing the image. (Again I'll emphasize that should be more complete and through on the image file page, as it does not have the article supporting it. Careful classification to categories is also appreciated, not least by others who may find your images useful.)
  8. Assuming you began as described above by a redlink image, opening the page for edit, then previewing it should force the cache to update, and if the servers are doing their usual speedy job, the photo will be available almost immediately — or at least as fast as you might be able to check. I've never had one fail to appear with a re-edit step, save for a couple where I misspelled some part in one place or the other. (Hence my compensatory practice now used to cut and paste names as suggested. Alas, even that has suffered the occasional humbling moment--more than one file one my harddrives and after uploading have a typo in their names! Alas, since File namespace pages can't be renamed, the whole world thinks I don't know how to spell! Harumph!)

Good luck! Hope to heck your Wikibook project is on a universities computer system and not the wikimedia foundations servers! // FrankB 00:46, 9 April 2017 (UTC)

Page footers[edit]

Hello, currently ends with these lines.

{{subjects|operating systems}}
[[Category:Oberon]] states, "A common practice is to place {{BookCat}} ... directly at the bottom of every page in a book."

Therefore {{Oberon}} should be added to the front page so that it ends with these lines. Correct?

{{subjects|operating systems}}

Every other page in the book should end with these two lines?


For a novice the general explanations of categories and templates is not adequate. There should be a recommended initial practice or example.

Thanks, ... PeterEasthope (discusscontribs) 21:32, 15 April 2017 (UTC)

@PeterEasthope: We'll have to see what we can do to improve the explanations. The bottom of the main page should call {{subjects}}, {{alphabetical}}, and {{status}}. The bottom of each other page of the book should call {{BookCat}}. --Pi zero (discusscontribs) 21:48, 15 April 2017 (UTC)
Thanks Pi, ... PeterEasthope (discusscontribs) 13:19, 16 April 2017 (UTC)

Name of the wiki language.[edit]

Hello again,

Is there a name for the language of the pages we edit to create the pages normally seen? It is similar to HTML. <pre> invokes unprocessed format as in HTML. But the syntax for tables is different from HTML. If no name exists, I'd think wikish or wikiish. Thanks, PeterEasthope (discusscontribs) 05:32, 21 April 2017 (UTC)

Within Wikibooks (as well as in other Wikimedia projects) it is often called "Wikitext" (cf. the Editing Wikitext book). Outside of Wikimedia projects it is usually called "MediaWiki markup", in reference to the MediaWiki software which powers these wikis. (Calling it just "Wikitext" in an outside context would be confusing, given all the other wiki systems with their own languages that exist.) --Duplode (discusscontribs) 06:38, 21 April 2017 (UTC)
Please see also the page wikicode. JackPotte (discusscontribs) 07:55, 21 April 2017 (UTC)
Thanks Duplode and Jack for the thorough explanations, ... PeterEasthope (discusscontribs) 12:51, 21 April 2017 (UTC)


Hello again, I don't understand indentation and this example illustrates.

Appears that each tab character is converted to blanks but what is the recipe? Why do more tabs produce less indentation on some lines? Thanks, ... PeterEasthope (discusscontribs) 01:32, 24 April 2017 (UTC)

@PeterEasthope: I would recommend avoiding tabs in wiki markup. The mechanism provided for indentation in wiki markup uses printable ascii characters at the beginning of the markup line; colon for a unit of indentation, * for an indented item with a bullet, # for an indented item with a number. I recommend against ever starting a line with a blank, as it causes the line to be typeset weirdly (using fixed-width, aka "typewriter", font).

Btw, for a link to a page, use wiki markup: double square brackets with the name of the page inside, in this case

which produces
--Pi zero (discusscontribs) 03:10, 24 April 2017 (UTC)
Thanks. Will aim to use colons.
"... recommend against ever starting a line with a blank, as it causes the line to be typeset weirdly (using fixed-width, aka "typewriter", font)."
In the first table, has "Start each line with a space. Text is preformatted and markups can be done." That's what I need. <span> ... </span> allows styling with color, bold, italic and etc. As you suggest, the typwriter style is unwanted. If <pre> ... </pre> is used, rather than beginning each line with " ", markup in the span is ignored. Then how can styles be varied without reformatting?
Is an EBNF specification of MediaWiki markup available?
Thanks again, ... PeterEasthope (discusscontribs) 16:11, 24 April 2017 (UTC)

Italics and boldface are wicked easy in wiki markup (heh; can you tell I grew up near Boston?). Two single quotes start or stop italics, three start or stop boldface, five toggle both. For color, use {{color}}. We don't use explicit html if we can possibly avoid it.

The closest thing I see, off hand, to a guide to wiki markup is w:Help:Wiki markup, but I'm rather disappointed by it; it seems to make wiki markup sound enormously more difficult than it is. Wiki markup is, when you get down to it, the reason the wikis succeeded and continue to succeed, an extraordinarily easy-for-humans markup language (I could say more, but, trying not to turn this into an essay...) — and the Foundation has managed to hypnotize itself collectively into making massive investments in undermining and avoiding wiki markup. More than ten years ago, my sources tell me, the WMF was told (I'm simplifying) that for the long-term expansion of the wikimedian movement they needed to formally define precisely how wiki markup works, so that computers could freely use the output of the human-driven wikis. That could have worked magnificently but, alas, whatever people/forces/whatever drove the technical decisions of the Foundation failed to grok the key role of wiki markup, with the result that the Foundation's efforts over its existence have damaged both the sisterhood and Foundation-community relations.

So here we are. --Pi zero (discusscontribs) 23:16, 24 April 2017 (UTC)

The best way I know to specify a formal language is by a table comprising two columns. The left column contains syntax in EBNF. The right contains semantic notes.
Now I have markup for indentation, color, bold and italics. What about preserving extant format? An alternative to <pre> ... </pre>? Thanks, ... PeterEasthope (discusscontribs) 21:46, 25 April 2017 (UTC)
Hm. Actually, now that you mention it, I don't recall any other way to do that. --Pi zero (discusscontribs) 03:58, 26 April 2017 (UTC)