Help! How to write basic captions for tables and figures?

th
thesising4life
Posts: 2
Joined: Tue Mar 08, 2011 12:16 am
Platform: Mac

Tue Mar 08, 2011 12:21 am Post

I'm slightly technologically challenged and a friend has suggested I use Scrivener for writing my thesis. I loved it for writing my draft, then I added in my pictures, figures and tables, but now how do I add in the captions? I have read the pdf help file, but I'm confused! Is there a way to do this easily (like Word has auto caption?) or do I need some kind of code?

Thanks!

Jenn

User avatar
AmberV
Posts: 24805
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Tue Mar 08, 2011 12:39 am Post

It's actually rather less complicated than that. A caption is nothing special in Scrivener, just a block of text that you've formatted a certain way below the figure or table. It's probably something you'll want to set up a preset for, so once you get one looking the way you like, you can place the cursor anywhere in that line and then use the `Format/Formatting/New Preset from Selection` command. You can then recall this preset in the future right from the Format Bar.

Note you can use counters in these, and it might be a good idea to familiarise yourself with the counter "streams" code. This way you can ensure your title numbers do not conflict with numbering in the captions, and that tables and figures can each have their own numbering stream. The basic idea is to take a counter, say <$n> which just prints the next numeral in the sequence, in its place when you compile, and add a label to it, like this: <$n:fig>. For tables you could use <$n:table>. It's all free form, but stick with the labels you choose to avoid getting a third stream off of, say, <$n:tables>.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

th
thesising4life
Posts: 2
Joined: Tue Mar 08, 2011 12:16 am
Platform: Mac

Tue Mar 08, 2011 12:46 am Post

Brilliant! Thanks so much :D

Gr
Green
Posts: 14
Joined: Sun Sep 09, 2007 5:29 pm
Location: Hamilton, Canada

Tue Jun 21, 2011 2:11 am Post

Dear Amber,
I am afraid I am still confused. If I have either inline pictures (figures) or figures at the end of the document, I am still not clear how to use counters and formatting to have captions that I can refer to in the text. Also, would the compiled output be recognised as a captions and refences to them in the text as is the case for ms word.
There are 2 things that are mandatory for scientific writing. First, the ability to do track changes with word documents; else, forget about the NIH and the the scientific publishing game - but this is not possible so I have to try to work around. Second, refences to figure captions that update in the text. I gather from the manual and the "placeholder tag" list that this is possible. It is just with 4 major grants applications to write by September (to keep my lab employed), 3 papers due, one review to write, a nature paper that will be rejected and has to be resubmitted lower on the food chain, and a lot of teaching and experiments to perform, and patients to see , I just have not got my head around how to do this. Maybe there is an simple way to illustrate the technique?
Thanks

User avatar
KB
Site Admin
Posts: 20922
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue Jun 21, 2011 9:42 am Post

Hi,

This is actually explained in the "Placeholder Tags List..." help that you can find under the "Help" menu.

Essentially, you use a three part tag containing the number type, a keyword to identify the numbering stream, and a keyword to identify this particular number.

For instance, suppose in your document you have both tables and figures. These should be numbered separately, both using 1, 2, 3..., and you should be able to refer to the numbers in the text. In this case, you would use the <$n> number tag (because that gets replaced as 1, 2, 3... etc in Compile), something like "table" and "figure" for the central keyword, and then a keyword to denote the individual figure or table at the end. For instance:

Code: Select all

-An Image Here-
Figure <$n:figure:GroundBreakingEquation>: A groundbreaking equation.

-A Table Here-
Table <$n:table:ComplicatedTable>: A very complicated table.

-Another Image Here-
Figure <$n:figure:TerrifiedCat>: A terrified cat.

As I have proved with my groundbreaking equation (see Figure <$n:figure:GroundBreakingEquation>) and listed in my very complicated table (see Table <$n:table:ComplicatedTable>), all cats fear headless people (see Figure <$n:figure:TerrifiedCat>).


When compiled, the above would become:

Code: Select all

-An Image Here-
Figure 1: A groundbreaking equation.

-A Table Here-
Table 1: A very complicated table.

-Another Image Here-
Figure 2: A terrified cat.

As I have proved with my groundbreaking equation (see Figure 1) and listed in my very complicated table (see Table 1), all cats fear headless people (see Figure 2).


Now, I know what you're thinking: I don't want to have to write out all those complicated tags every time I want to refer to a figure or table!

You don't have to. This is exactly what "Replacements" in the Compile panel is for. It allows you to simplify any complicated tags you need to use. You can set up Replacements like this:

Image

Now, to refer to a figure, all you have to type is "{fig:FigureKeyword}" (e.g. "{fig:equation}", "{fig:scaredCat}") and to refer to a table all you have to type is "{tbl:TableKeyword}" (e.g. "{tbl:ListOfPlaces}". So, the above could become:

Code: Select all

-An Image Here-
Figure {fig:gEquation}: A groundbreaking equation.

-A Table Here-
Table {tbl:bigTable}: A very complicated table.

-Another Image Here-
Figure {fig:scaredCat}: A terrified cat.

As I have proved with my groundbreaking equation (see Figure {fig:gEquation}) and listed in my very complicated table (see Table {tbl:bigTable}), all cats fear headless people (see Figure {fig:scaredCat}).


I have a tutorial about this part-written, which I need to complete.

All the best,
Keith
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

Gr
Green
Posts: 14
Joined: Sun Sep 09, 2007 5:29 pm
Location: Hamilton, Canada

Tue Jun 21, 2011 11:34 am Post

Thank you very much, this worked very well.

mi
mitohund
Posts: 70
Joined: Fri Nov 19, 2010 7:44 am
Platform: Mac
Location: Berlin, Germany
Contact:

Sat Aug 27, 2011 2:15 pm Post

This is really good. I should've done that from the beginning. :lol:

ge
gepa
Posts: 14
Joined: Tue Oct 26, 2010 8:21 am
Platform: Mac

Tue Mar 20, 2012 6:54 am Post

Hello Keith, May I ask if you finished writing your tutorial on Captions, Figures and Tables? Thanks for posting your explanation to the forum. George

User avatar
KB
Site Admin
Posts: 20922
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Tue Mar 20, 2012 9:59 am Post

gepa wrote:Hello Keith, May I ask if you finished writing your tutorial on Captions, Figures and Tables? Thanks for posting your explanation to the forum. George


Argh, that's been sitting on hold for about a year now. It is nearly finished, as well, I just got caught up in other things. I will make an effort to polish it up and get it up on our knowledge base.
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

ge
gepa
Posts: 14
Joined: Tue Oct 26, 2010 8:21 am
Platform: Mac

Tue Mar 20, 2012 10:50 am Post

Keith, That is great news you will finish the tutorial. I admit to not really understanding the tags concept. I really need to learn tags so I can make my compiled file more flexible and updated. Thanks George

lo
loduque
Posts: 1
Joined: Tue Jan 23, 2018 2:53 pm
Platform: Windows

Tue Jan 23, 2018 2:55 pm Post

Hi!
I attempted the solutions provided here but it seems it does not work in windows. Any alrternatives to insert captions in Windows?
Thanks!
Lorena

TR
TRSeabrook
Posts: 1
Joined: Fri Sep 06, 2019 6:27 am
Platform: Mac

Fri Sep 06, 2019 6:31 am Post

Hi Keith,

This article was really useful and I'm glad to see it still on the boards.
You mentioned that you were part way through writing a guide for this, and I was wondering whether you finished it, as your original post was in Jun 2011.

Just to let you know, I answered a query within a FB group on this and referenced and credited you for the helpful information.

Many thanks

Tim Seabrook

KB wrote:Hi,

This is actually explained in the "Placeholder Tags List..." help that you can find under the "Help" menu.

Essentially, you use a three part tag containing the number type, a keyword to identify the numbering stream, and a keyword to identify this particular number.

For instance, suppose in your document you have both tables and figures. These should be numbered separately, both using 1, 2, 3..., and you should be able to refer to the numbers in the text. In this case, you would use the <$n> number tag (because that gets replaced as 1, 2, 3... etc in Compile), something like "table" and "figure" for the central keyword, and then a keyword to denote the individual figure or table at the end. For instance:

Code: Select all

-An Image Here-
Figure <$n:figure:GroundBreakingEquation>: A groundbreaking equation.

-A Table Here-
Table <$n:table:ComplicatedTable>: A very complicated table.

-Another Image Here-
Figure <$n:figure:TerrifiedCat>: A terrified cat.

As I have proved with my groundbreaking equation (see Figure <$n:figure:GroundBreakingEquation>) and listed in my very complicated table (see Table <$n:table:ComplicatedTable>), all cats fear headless people (see Figure <$n:figure:TerrifiedCat>).


When compiled, the above would become:

Code: Select all

-An Image Here-
Figure 1: A groundbreaking equation.

-A Table Here-
Table 1: A very complicated table.

-Another Image Here-
Figure 2: A terrified cat.

As I have proved with my groundbreaking equation (see Figure 1) and listed in my very complicated table (see Table 1), all cats fear headless people (see Figure 2).


Now, I know what you're thinking: I don't want to have to write out all those complicated tags every time I want to refer to a figure or table!

You don't have to. This is exactly what "Replacements" in the Compile panel is for. It allows you to simplify any complicated tags you need to use. You can set up Replacements like this:

Image

Now, to refer to a figure, all you have to type is "{fig:FigureKeyword}" (e.g. "{fig:equation}", "{fig:scaredCat}") and to refer to a table all you have to type is "{tbl:TableKeyword}" (e.g. "{tbl:ListOfPlaces}". So, the above could become:

Code: Select all

-An Image Here-
Figure {fig:gEquation}: A groundbreaking equation.

-A Table Here-
Table {tbl:bigTable}: A very complicated table.

-Another Image Here-
Figure {fig:scaredCat}: A terrified cat.

As I have proved with my groundbreaking equation (see Figure {fig:gEquation}) and listed in my very complicated table (see Table {tbl:bigTable}), all cats fear headless people (see Figure {fig:scaredCat}).


I have a tutorial about this part-written, which I need to complete.

All the best,
Keith

kk
kkajihiro
Posts: 1
Joined: Thu May 07, 2020 7:53 am
Platform: Mac

Thu May 07, 2020 8:06 am Post

I have inserted images in the text and used the <$n:figure> to autonumber the images.

How can I cross reference the figure from another part of the text? E.g. "See Figure n".

How can I create a table of figures in the front matter, with auto-page numbers like a table of contents?

Thank you.

pr
prutovitz
Posts: 2
Joined: Sun Jan 31, 2021 4:54 pm
Platform: Windows

Sun Jan 31, 2021 5:07 pm Post

This is perfect and exactly what I need, but, I can't get it to work.

I tried use Fig. <$n> My Title and that works perfectly. However, when I try Fig. <$n:img> My Title or Fig. <$n:img:abc> My Title where abc is the specific reference to the figure, it does not work, I jut see "Fig. <$n:img:abc> My Title".

Can anyone help me?

I am very new and still on a 30-day trial Windows version.

Thanks!

User avatar
AmberV
Posts: 24805
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sun Jan 31, 2021 7:21 pm Post

You’re going to need to use the beta version to use the more advanced numbering placeholders like that.

Just as a note, you’re in the Mac section of the forum.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles