Some random BibTeX bibliography style examples

Here we have some basic BibTeX bibliography styles, with a few of the key distinguishing features pointed out.

First, good old unsrt.bst

an unsorted bibliography style

Then, chicago (from natbib)

chicago manual of style

The Harvard-ish agsm style

the agsm style, derived from Harvard -- author -- year

And, last, an APA-based style (apalike, from natbib)

another author/year style

 

Well howdy

A portrait of the artist as a young dog: a few uneducated remarks

Portrait of the Artist as a Young Dog

Dylan Thomas

Dent 1958; 254 pages

Ten semi-autobiographical stories about Thomas’s life in Wales before heading off to London to become famous, Just how semi they may be, I cannot say.

Cover of hard back

Both sides

The stories aim at … well, not at thrilling with endless action or suspense, They are about capturing moments in a life, moments that either show a stage or show a transition, or, in the last one (‘One warm Saturday’), a might-have-been.

Free of the need for a through-plot, the author can focus on evoking places and memories, feelings. At this, the book is successful. A poet’s eye for a telling detail, arresting metaphor or image; these are the book’s main strengths. The likeability of young Dylan is not — not that he is especially unpleasant. Indeed, he often simply is, which is to the book’s credit; it seems free of axes being ground or morals being propounded,

Thomas writes a nice sentence, His characters are drawn effectively and economically. Howsoever that may be, the end of each vignette is an opportunity to put the book down and not pick it up again. Unless the little details of Thomas’s life and the puzzle of working out what in the book is a real detail are of interest, the book is not compelling in the commercial fiction sense. It is easy to read, striking in places, and interesting enough. I did not rush through it, but read another story when I felt like dipping into the book’s placid, ‘black & white photo of my grandparents’ kind of world.

Most definitely worth reading. I guess I ought to check out his poems; after all, he’s probably more famous as a poet and as the author of Under Milk Wood than as a writer of prose fiction.

Note on the edition: This is the 1958 printing of the 1940 first edition. It is a time-softened, well-thumbed hard-cover, ex-library, and somehow seems completely suitable to this text, which is more redolent of hard covers and newspapers than mass-market paperbacks and airports. I wonder if the format being suited to the feel of the content is really important; I suspect for a book like this, that trades in memories and evocations (and of a time now becoming quite long ago), it is quite important.

 

Of course, what would I know.

PM Scott Morrison, religion, and fitness to govern

Rant: on

We often hear the argument that a person’s personal religious views are not relevant to their role in government.

Bullshit.

If someone is going to make decisions that affect me and my children and so on into the future, I want that someone to have an understanding of the processes of science and knowledge gathering, and to appreciate that not all data are equal and that some people know what they are talking about and some don’t. If that decision maker lives in a belief structure that prevents them from doing that, they are not fit to govern.

Let’s take the obvious example — climate science. A crucial aspect of climate science is time scales. Ice cores going back 2.7 million years show us not just whether the world has ever been this hot or had this much carbon in the air but, even more crucially, how quickly the levels change. The rate of change on human time scales we are seeing now is completely unprecedented (though not unpredicted), but if you believe that the world is 6000 years old, then all of time is the human time scale and you are literally incapable of understanding the evidence. Therefore incapable of formulating adequate policy about it, therefore incapable and unfit for government.

Simple.

Similarly, if they believe that one group (say, Christians) is worthy and is going to be saved and go to heaven, and the rest of us are going to hell and deserve punishment unless we change our ways, how can they then say the serve us all, govern for us all? They can’t. Either they believe one group is special, or they don’t.

Clearly, I am an atheist. I’d like to believe in something beyond the material world. I just don’t see it.

For example, prayer. Ain’t it remarkable how prayer has healed a lot more people after the invention of penicillin? These days so many more people survive illness, many of them infidels, unbelievers and downright awful people. A few hundred years ago, the most innocent of babies (though don’t get me started on the insanity of original sin) or devout of believers died a lot more often than the most heinous of blasphemers do now.

Gee, maybe it’s because prayer does not work and penicillin does.

That is, faith does not work but hard work and science and thinking do. (Oh, sure, faith might work on the personal level of making people feel better about themselves, or guiding them in their actions — rather like meditation — and that might lead that person to be a better influence in the world; though faith often seems to guide people to do pretty unsociable things).

If this Prime Minster is not prepared to be guided by hard work and science and thinking, then his decisions will be as bad as someone using prayer instead of antibiotics. I don’t want that doctor, and I don’t want that Prime Minister. I mean, his job is, basically, to make decisions. If he’s going to do that based on an illogical belief system, he’s got to go.

I don’t care how personal his beliefs are, they are not personal, they are national. If he wants the luxury of personal beliefs, he cannot be Prime Minister.

Rant: off

Text News — news in plain text

Recently I got a tilde.club account. The account comes with 2 directories — public_html and public_gopher. So I started messing around with gopher, using the gopher client and the gopherus client (and lynx works too).

One of the most useful gopher pages I found was Text News. It sucks down RSS feeds and presents them as nicely formatted plain text.

Very nice, but as an Australian I’d like to read some Australian news. At present I’m not going to make my own gopher page or anything like that, though it would be possible to use the gopher server on tilde to do that, and I might (and/or html).

Very kindly, the Text News page explains how to use the script that grabs HTML and RSS pages and formats them for plain text reading.

So …

  1. Using gopher, visited Text News on gopher and then downloaded the text file that describes how it works; saved to …
    instructions.txt
  2. $ mkdir installs/rsstotext
    $ mv instructions.txt installs/rsstotext/
    $ cd installs/rsstotext
    $ cat instructions.txt
  3. Viewed the file and installed stuff:
    $ sudo apt-get install python python-pip #python2
    $ sudo pip install html2text requests readability-lxml feedparser
    $ git clone https://github.com/RaymiiOrg/to-text.py
  4. Went to find some feeds
    $ links2 -g google.com
  5. Searched for a list of Aussie RSS news feeds; found one at:
    https://blog.feedspot.com/australian_news_rss_feeds/
    Downloaded as ausfeeds.html
  6. Viewed the file and worked out how to most easily pull out the URLs of the feeds; don’t mind if it is a little bit manual.
    $ grep xml ausfeeds.html | cut -d'=' -f2 > ausfeeds
  7. Checked usage:
    $ cat instructions.txt
  8. Edited the resulting file, including prepending the appropriate totext.py command to each line, and commenting out the ones I don’t want just now.
    $ vim ausfeeds
    $ cat ausfeeds
    #! /bin/bash
    echo "Consider cleaning up in  /home/username/installs/rsstotext/saved!"
    cd /home/username/installs/rsstotext
    echo ABC ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.abc.net.au/news/feed/2942460/rss.xml
    #echo SMH ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.smh.com.au/rssheadlines/top.xml
    echo Age ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.theage.com.au/rssheadlines/top.xml
    echo Huffington Post Australia ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.huffingtonpost.com.au/rss/index.xml
    echo Canberra Times ...
    python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://www.canberratimes.com.au/rss.xml
    #echo WA Today ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.watoday.com.au/rssheadlines/top.xml
    #echo Brisbane Times ...
    #python /home/username/installs/rsstotext/to-text.py/totext.py --rss -n --url http://feeds.brisbanetimes.com.au/rssheadlines/top.xml
    echo Done! News stored in /home/username/installs/rsstotext/saved
    sleep 2s
    cd saved
    vfu
  9. Made it executable (later made a soft link into ~/bin):
    $ chmod +x ausfeeds
  10. Try it…
    $ ./ausfeeds

It takes a while, but works fine. A text mode file manager is a good way to view the results; Here we use vfu; here is what it looks like.

A news feed viewed as a formatted text file

Viewed in vfu

Once the directories are populated, it’s best to not rerun the script until an updated list of stories is desired — just use vfu to browse the existing downloads.

Gopher it!

Science writing versus scientific writing

With the shift away from third person passive to active first person writing:

The boiling point of the compound was determined.

Becomes

We determined the boiling point of the compound.

Now, for science writing (ie popular science), this is fine. For scientific writing, I am not so sure.

What do I mean by scientific writing?

I mean writing that has the same qualities as science itself. This is different from writing about science itself, or even writing about the results of science in a non-scientific way. We might call these latter two things ‘science writing’.

Science, to me, ought to be:

  • precise — even when uncertain, it should be precise about what is highly likely (give nothing can be ‘proven’), likely, possible or unlikely. In other words, science aims for precise and accurate results, but regardless of the precision and accuracy of the results is always precise about its degree of certainty
  • dispassionate — the whole point of science is that what humans think is not relevant to the correctness of a theory (even though what humans think will have led to the theory). The validity of an idea is tested against the universe, not against what people think; an experiment is a means of testing whether an idea is consistent with the way the universe operates

In my mind, scientific writing has these same attributes.

With scientific knowledge, it does not matter who did the experiment, only that it was done well so that the experiment really does (within whatever limits) test the idea’s validity. Of course, some people have a wonderful ability to think of an experiment no-one else has ever done. But once it has been done and written up, if repeated it should yield the same results.

So I don’t like the ‘We’ in the sentence above. It puts the experimenter at the focus — after all, they are now the subject of the sentence — when previously the result (the boiling point of the compound) was the subject. And the boiling point is what matters, and what (if done well) ought to be a valuable result for others to draw on.

Personalising scientific results allows a theory or experiment to be discredited by discrediting the theorist or experimenter. It puts a scientific result closer to the plane of an opinion or ideology than it ought to be, so making it easier to argue away. Science is the opposite of ideology. Ideology is the use of a framework of ideas to make decisions for you en masse and so avoid having to think. I’m not saying scientists never do that (they are humans), but when they do they are not doing science.

If the sense that science is objective (as much as any human activity can be) was more prevalent in the wider world, it would be harder for (for example) climate change denialists to get traction. And I can’t help thinking that maybe that objectivity ought to be embedded in the language of science, and that if we take it out we’re implicitly signalling that science is something less important and useful and relevant and non-ignorable than it is.

So while I can understand the shift to the more active and immediate in writing, and I agree with it in most cases, I find myself not so in favour of it when talking about science and its outputs. (Having said that, I’ve written plenty of papers that use ‘we’, sometimes at the behest of a coauthor, sometimes because working around it was just so clunky and wordy; but always with a nagging dis-ease.)

I guess I’m just as inconsistent as anybody.

Rant over.

Removing horizontal lines in Word

Soooo….. I typed a bunch of hyphens then hit Enter, and Word drew me a line. Fine, I wanted that. It separated what was done from what was ‘in process’. Now I want to get rid of the line.

Highlight and delete — no.

Highlight and use the border menu to choose none — no! I tried this suggestion, but without success.

I could move the line up and down, but I could not delete it. But then I could!

Page shows some text, then an empty line then a row of about 10 hyphens

Type ten or so hyphens

Page shows the hyphens now converted into a horizontal line across the page

After hitting Enter, we can see the little menu that allows us to undo the autoformatting

At this point, we can undo the line if we want to by clicking on the menu icon that comes up when Word automatically creates the line, and we could select Undo Border Line, Stop Automatically Creating Border Lines or Control AutoFormat Options. So at this point it is easy to remove the line.

Screen shows the menu beside the line

The autoformat menu we get on producing the line

But let’s say we want to keep the line for now and delete it later. We go on, typing some more text below  the line. The autoformat menu icon disappears and does not come back.

More text below the line

Now, how can we get rid of the line? First, highlight it by keyboard or cursor.

The line (well, just the first bit of it) selected

Select the line

Now, type Ctrl+Shift+n — the line goes away! Now, this is Word key binding for ‘Apply the Normal style’, which means you can get the same result by using the Styles pane or clicking Normal on the styles ribbon on the Home tab.

Screen shows

text above and below, but no line! Fixed!

If the Normal style does not work, you can also try the ‘Clear All’ option at the top of the Styles pane.

Screen shows the same document with the Styles pane opened

Using the Styles pane

No longer vexed

NetComm-M2M NTC-40WV Firmware Update

We’ve been having a connection problem with this router — a computer on a wireless connection will often find the router but not the internet, though it worked on last login. Any wired connections can see the interwebs. So I guess that’s a ‘wireless connection problem’.

Power cycling (have you tried turning it off and on again?) the router solves the problem, but is not a very satisfactory solution.

So I thought I’d try a firmware upgrade.

Old firmware was 1.9.1088 (or something), quite old. So in a way that was good — more chance that the new firmware will solve the problem.

Went to https://support.netcommwireless.com/product/ntc-40wv and downloaded https://support.netcommwireless.com/sites/default/files/firmware/NetComm_M2M_Family_Release_FW2.0.27.3_NTC-40WV.zip. This is probably the last firmware this (now unsupported) device will receive.

Unpacked the archive.

Logged into router (http://192.168.1.1) as root.

Now, the main trick is that when upgrading from 1.x.x.x series firmware to 2.x.x.x, we must first install something called appweb-large-file-
support_1.2_arm.ipk
‘.

This is within the downloaded archive, so it’s OK. Don’t go hunting around in the ‘net for it.

In the browser interface to the router, went to System → Load/Save → Settings and saved my existing router settings to a backup. (Accept the given file name!)

Then went to System → Load/Save → Upload and browsed for the ipk file, then uploaded and clicked ‘Install’. (The instructions are in a PDF that’s also in the archive; read that instead of this.)

The 2.x.x.x series firmware is a single big file, where earlier versions contained two smaller files, hence the need for the preliminary upload.

Then browsed again and chose ntc_40wv_2.0.27.3.cdi.

Uploaded and installed.

Waited about 4 or 5 minutes.

Shiny new status page and rearranged browser interface to the router appeared. Was active; I could browse the web etc, so all looked good. But — had our problems with wireless connections gone away?

<<One week later>>

Now, after a week of observing the ability of machines to connect, do we still need to reboot the router regularly?

It seems … a lot better!

 

Routed.

Rainbowstream – twitter on the command line

Rainbowstream lets you read, post to, search and almost everything else twitter requires — and from a text terminal. No need to run a GUI or anything fancy.

You just type reasonably mnemonic commands at a prompt. To print off the last 20 tweets in your home stream, you type:

[#username] home  20

Where ‘[#username]’ is the prompt. To get some help about tweet commands, type:

[#username] h tweets

You can favourite, retweet, follow links (sometimes) and so on. To show the last 5 tweets about some topic, you’d type:

[#username] s some topic

And so on. It installs via pip — that is, it’s a Python program. The simplest thing in my experience is to do as the instructions say, then make a soft link in your bin directory.

It may throw some errors about `the twitter stream API’. I believe some aspects of the API have been redesigned and don’t work with rainbowstream; I don’t really know, but the website has some information. But the interactive stuff seems to work fine, so it remains useful.

This is an extract from the install instructions at the website:
GitHub – orakaro/rainbowstream: A smart and nice Twitter client on terminal written in Python.

$ sudo apt-get install python-dev  libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
$ cd installs/
$ virtualenv venv
$ sudo apt install python3-venv python3-pip python-pip
$ sudo pip install virtualenv
$ virtualenv venv
$ source venv/bin/activate
$ pip install rainbowstream
$ ln -s /home/username/installs/venv/bin/rainbowstream /home/username/bin/rainbowstream
$ rainbowstream -iot

And away we go.

gsftopk and 8.3 filenames

Note to self — nothing to see here.

I sometimes play with emTeX inside DOSBox. The DVI viewer is very nice.

Sometimes, I have a font that the DVI viewer will not render, even though I can LaTeX and (often) dvips the file no worries. The viewer, dviscr, needs packed bitmap pixel files (xxxx.pk) of each size, and in the right place in the emTeX directory tree, usually in C:\TEXFONTS.

Say I want to generate the pncr8r pk file at 180 size, using the old DOS file name convention, then put it where dviscr will find it.

I sometimes use the the Linux machine that hosts the DOSBox session:

$ gsftopk --dosnames pncr8r 180
gsftopk(k) version 1.19.2/927
[1] [2] [3] [4] [5] [6] [7] [8] [9] [11] [12] [14] [15] [16] [17] [30] [31]
[32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47]
[48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63]
[64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79]
[80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95]
[96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109]
[110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122]
[123] [124] [125] [126] [130] [131] [132] [133] [134] [135] [136] [137] [138]
[139] [140] [147] [148] [149] [150] [151] [152] [153] [154] [155] [156] [159]
[161] [162] [163] [164] [165] [166] [167] [168] [169] [170] [171] [172] [173]
[174] [175] [176] [177] [178] [179] [180] [181] [182] [183] [184] [185] [186]
[187] [188] [189] [190] [191] [192] [193] [194] [195] [196] [197] [198] [199]
[200] [201] [202] [203] [204] [205] [206] [207] [208] [209] [210] [211] [212]
[213] [214] [215] [216] [217] [218] [219] [220] [221] [222] [223] [224] [225]
[226] [227] [228] [229] [230] [231] [232] [233] [234] [235] [236] [237] [238]
[239] [240] [241] [242] [243] [244] [245] [246] [247] [248] [249] [250] [251]
[252] [253] [254] [255]

$ cp pncr8r.pk /path/to/TEXFONTS/PIXEL.LJ/180DPI/

Then, back in DOSBox, refresh the file tree

Ctrl+F4

Then it works.

Note that the main difference between pk files on Linux and DOS is that DOS can only use 8.3 file names, so it omits the scale number (180 in this case), which means that copying into the correct directory, with name of the form XXXDPI where XXX is the number, is vital because that is how dviscr selects the correct pk file.

Note also that dvips will resort to using the .pk files to generate the PostScript if there is no PostScript font available, so doing this will sometimes fix missing glyphs in dvips output.

emTeX

Pro-Cite 2.2 + WordPerfect 5.1 cheat sheet

From an old WordPerfect 5.1 document

This is a summary of part of the Basic guide to Pro-Cite, section ‘Creating a bibliography from a manuscript’.

1. Insert your citations in the WP document. Two ways:

  • author/date, like (Smith, 1994) or (Smith & Jones 1987)
  • record number, like (#324) where 324 is the record number in Pro-Cite.

2. Save the document, exit WP5.1.

3. Search for the citations in the document:

  • open Pro-Cite and the Pro-Cite database containing the records
  • in Main Menu, press M for search Manuscript
  • press O for Options and set appropriately
  • F10
  • select all database records
  • F to give the document File name (changing directory if need be), then Enter
  • in Main Menu, press M for search Manuscript, then Enter.

4. Generate the reference list to insert into your document:

  • go to Print menu and set your output format to WP5.1
  • Print the reference list
  • go to search Manuscript and ‘Clear manuscript order’
  • close Pro-Cite.

5. Insert the list into your document:

  • open your document in WP5.1, and move the cursor to where the list is to go
  • Shift+F3 to switch to the second document
  • open reference list, and copy it all
  • switch back and paste it in.

 

I prefer the 20th century.