CCNBook/wiki src

From Computational Cognitive Neuroscience Wiki
Jump to: navigation, search

Back to Main Page

This is copy-paste source for commonly-used wikitext in the textbook:

Figures and Tables

New style that works with printing

Figure itself -- X = fig number, # = chapter number:

{{figX|#|fig_fignm.png|400px|right|caption text}}

Figure ref:

{{figrX|#}}
  • See template source below
  • Note: must use
    {{=}}
    for = in captions

Old style using CrossReference

Figure itself:

<figure id="fig:fignm">
[[File:fig_fignm.png|400px|thumb|right|<caption>text.</caption>]]
</figure>

Figure ref:

<xr id="fig:fignm"/>

produces: "Figure X"

To ensure that text comes after figs that occupy left and right positions:

<div style="clear:both;">

To reset the figure numbers, which sometimes get all out of whack, just add this to the end of the page url:

?action=purge

Tables

<figtable id="tab:tabnm">
<div style="float: right; width: 520px; border: solid 1px black; padding: 5px;">
{| class="wikitable" style="font-size: 100%; text-align: center; width: 500px;" align="right"
|+ Learning Rules Across the Brain 
|-
! 
! colspan="3" | ''Learning Signal''
! colspan="3" | ''Dynamics''
|-
! scope="col" | Area 
! scope="col" | Reward 
! scope="col" | Error 
! scope="col" | Self Org 
! scope="col" | Separator 
! scope="col" | Integrator 
! scope="col" | Attractor
|-
! scope="row" | Basal Ganglia 
| style="color:red" | +++ 
| --- 
| --- 
| style="color:red" | ++ 
| - 
| ---
|-
! scope="row" | Cerebellum 
| --- 
| style="color:red" | +++ 
| --- 
| style="color:red" | +++ 
| --- 
| ---
|-
! scope="row" | Hippocampus 
| + 
| + 
| style="color:red" | +++ 
| style="color:red" | +++ 
| --- 
| style="color:red" | +++
|-
! scope="row" | Neocortex
| style="color:red" | ++ 
| style="color:red" | +++ 
| style="color:red" | ++ 
| ---
| style="color:red" | +++
| style="color:red" | +++
|}
<caption> text </caption>
</div>
</figtable>

Common links

Use at top of all chapters:

{{ccnbook_nav}}

Figure Template Source

Save this to templates like figX where X is figure number, replace all X with number (3 replacements):

<div class="noprint" id="figX"><html><a href="#figX"></a></html></div>
[[ File:{{{2}}} | {{{3}}} | thumb | {{{4}}} | '''Figure {{{1}}}.X:''' {{{5}}} ]]

And this goes to figrX (4 X's to replace):

<span class="noprint"> <html><a href="#figX">Figure </a></html>{{{1}}}<html><a href="#figX">.X</a></html></span><span class="printonly">Figure {{{1}}}.X</span>

Copying to Word for Conversion to Other Formats

  • In Mac Safari, Select All in regular display mode (not print mode), Copy
  • In Word (2011 Mac), new blank doc, Paste
  • go through and do a bunch of post-processing fixes
  • cut navigation and contents box at start
  • get rid of thumbnails under each fig, and resize figs as needed

PDF to Kindle Mobi file