Codes for compiler

st
stevecooperorg
Posts: 3
Joined: Tue Mar 13, 2012 2:20 pm
Platform: Windows

Sat Mar 17, 2012 10:38 pm Post

I notice in my manuscript this code;

Code: Select all

<$wc100>


And wondered if there were any other useful codes available, and what they were? Couldn't find anything in the documentation.

User avatar
Cosmicjive
Posts: 50
Joined: Wed Sep 22, 2010 8:14 pm
Platform: Mac + Windows
Location: Tustin, CA (USA)

Mon Mar 19, 2012 6:32 pm Post

These are known as "placeholder tags."

These are the tags that work in the Windows version of the application:

Statistics

<$wc>
Gets replaced during the Compile process with the total word count of the text currently being compiled.

<$wc50>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 50 words.

<$wc100>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 100 words.

<$wc500>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 500 words.

<$wc1000>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 1000 words.

<$cc>
Gets replaced during the Compile process with the total character count of the text currently being compiled.

<$cc50>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 50 characters.

<$cc100>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 100 characters.

<$cc500>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 500 characters.

<$cc1000>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 1000 characters.




Auto-Numbering

<$n>
Gets replaced with Arabic numerals during the Compile process. The number is incremented each time a <$n> tag is encountered in the text, so “<$n>, <$n>, <$n>” would become “1, 2, 3” in the compiled text.

<$sn>
The same as <$n> but intended to be used for sub-numbering. The count restarts each time an <$n> tag is encountered. Thus, “<$n> (<$sn>, <$sn>), <$n> (<$sn>, <$sn>)” would become “1 (1, 2), 2 (1, 2)” in the compiled text.

<$r>
Gets replaced with lowercase Roman numerals during the Compile process. The number is incremented each time a <$r> tag is encountered in the text, so “<$r>, <$r>, <$r>” would become “i, ii, iii” in the compiled text.

<$R>
Gets replaced with uppercase Roman numerals during the Compile process. The number is incremented each time a <$R> tag is encountered in the text, so “<$R>, <$R>, <$R>” would become “I, II, III” in the compiled text.

<$w>
Gets replaced with numbers as lowercase words (using the current language settings) during the Compile process. The number is incremented each time a <$w> tag is encountered in the text, so “<$w>, <$w>, <$w>” would become “one, two, three” in the compiled text.

<$t>
Gets replaced with numbers as title-case words (using the current language settings) during the Compile process. The number is incremented each time a <$t> tag is encountered in the text, so “<$t>, <$t>, <$t>” would become “One, Two, Three” in the compiled text.

<$W>
Gets replaced with numbers as uppercase words (using the current language settings) during the Compile process. The number is incremented each time a <$W> tag is encountered in the text, so “<$W>, <$W>, <$W>” would become “ONE, TWO, THREE” in the compiled text.

<$hn>
Gets replaced during the Compile process with hierarchical numbering based on the level of the document in which the tag occurs relative to the Draft folder or compile group (depending on the current compile settings). So occurrences of the <$hn> tag in the second document in the Draft folder may get replaced with the number “2”; occurrences of the tag in the third subdocument of the eight document in the Draft folder may be replaced with “8.3”.

Restarting auto-numbering streams:
<$rst>
Place <$rst> immediately before any of the auto-numbering tags to restart the numbering. So, for instance, “<$w>, <$w>, <$w>, <$rst><$w>, <$w>” would become “one, two, three, one, two” in the compiled text.

Page Numbers

<$p>
When used in the header or footer, gets replaced with the current page number.


-Jeff

User avatar
StaceyUK
Posts: 869
Joined: Mon Apr 13, 2009 5:00 pm
Platform: Mac + Windows

Mon Mar 19, 2012 6:59 pm Post

Cosmicjive wrote:These are known as "placeholder tags."

These are the tags that work in the Windows version of the application:

Statistics

<$wc>
Gets replaced during the Compile process with the total word count of the text currently being compiled.

<$wc50>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 50 words.

<$wc100>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 100 words.

<$wc500>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 500 words.

<$wc1000>
Gets replaced during the Compile process with the total word count of the text currently being compiled, rounded to the nearest 1000 words.

<$cc>
Gets replaced during the Compile process with the total character count of the text currently being compiled.

<$cc50>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 50 characters.

<$cc100>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 100 characters.

<$cc500>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 500 characters.

<$cc1000>
Gets replaced during the Compile process with the total character count of the text currently being compiled, rounded to the nearest 1000 characters.




Auto-Numbering

<$n>
Gets replaced with Arabic numerals during the Compile process. The number is incremented each time a <$n> tag is encountered in the text, so “<$n>, <$n>, <$n>” would become “1, 2, 3” in the compiled text.

<$sn>
The same as <$n> but intended to be used for sub-numbering. The count restarts each time an <$n> tag is encountered. Thus, “<$n> (<$sn>, <$sn>), <$n> (<$sn>, <$sn>)” would become “1 (1, 2), 2 (1, 2)” in the compiled text.

<$r>
Gets replaced with lowercase Roman numerals during the Compile process. The number is incremented each time a <$r> tag is encountered in the text, so “<$r>, <$r>, <$r>” would become “i, ii, iii” in the compiled text.

<$R>
Gets replaced with uppercase Roman numerals during the Compile process. The number is incremented each time a <$R> tag is encountered in the text, so “<$R>, <$R>, <$R>” would become “I, II, III” in the compiled text.

<$w>
Gets replaced with numbers as lowercase words (using the current language settings) during the Compile process. The number is incremented each time a <$w> tag is encountered in the text, so “<$w>, <$w>, <$w>” would become “one, two, three” in the compiled text.

<$t>
Gets replaced with numbers as title-case words (using the current language settings) during the Compile process. The number is incremented each time a <$t> tag is encountered in the text, so “<$t>, <$t>, <$t>” would become “One, Two, Three” in the compiled text.

<$W>
Gets replaced with numbers as uppercase words (using the current language settings) during the Compile process. The number is incremented each time a <$W> tag is encountered in the text, so “<$W>, <$W>, <$W>” would become “ONE, TWO, THREE” in the compiled text.

<$hn>
Gets replaced during the Compile process with hierarchical numbering based on the level of the document in which the tag occurs relative to the Draft folder or compile group (depending on the current compile settings). So occurrences of the <$hn> tag in the second document in the Draft folder may get replaced with the number “2”; occurrences of the tag in the third subdocument of the eight document in the Draft folder may be replaced with “8.3”.

Restarting auto-numbering streams:
<$rst>
Place <$rst> immediately before any of the auto-numbering tags to restart the numbering. So, for instance, “<$w>, <$w>, <$w>, <$rst><$w>, <$w>” would become “one, two, three, one, two” in the compiled text.

Page Numbers

<$p>
When used in the header or footer, gets replaced with the current page number.


-Jeff


Could we sticky post this answer please so it will be easier to locate for future reference? TIA.
Blessings, Stacey

System Specs

Windows 7
Scrivener 1.9.6 / 2.8
Scapple 1.0.0.0
Windows 2.9.0.1 Beta (19429)

Si
Simon Knight
Posts: 48
Joined: Tue Nov 06, 2007 9:26 pm

Fri Apr 27, 2012 11:12 am Post

Have a look under the Help menu.

Simon

User avatar
Cosmicjive
Posts: 50
Joined: Wed Sep 22, 2010 8:14 pm
Platform: Mac + Windows
Location: Tustin, CA (USA)

Fri Apr 27, 2012 4:54 pm Post

Simon Knight wrote:Have a look under the Help menu.

Simon


These codes are not currently available under the help menu in the Windows version like they are in the Mac version, so the original poster's question was quite appropriate.

-Jeff

User avatar
AmberV
Posts: 20570
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Sat Apr 28, 2012 12:53 am Post

I've set this to sticky. In the meanwhile, listing codes should be easier to do in the user manual. We've been working on a way to escape them so that they don't turn into numbers and such when compiling. It's been kind of hard to write about them in Scrivener. :)
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

jh
jhuebert
Posts: 5
Joined: Tue Aug 07, 2012 1:15 am
Platform: Windows

Wed Aug 08, 2012 1:52 am Post

I note that this list of placeholder tags supported in the Windows version is missing the custom auto-numbering tags needed for figure and table numbering: <$n:table:myTableName>, <$n:figure:myFigureName>, etc.

I love this software and am thinking of writing my thesis with Scrivener, but really want these tags to autonumber figures and tables. Is there any workaround to keep multiple auto-number streams going in a compilation?

fa
fadedwave
Posts: 58
Joined: Sun Nov 14, 2010 5:13 pm
Platform: Windows

Sat Dec 15, 2012 11:41 pm Post

I actually just had a question about this. My novel is divided into parts and chapters. There is a folder for each of the two parts and in each of those are folders for each of the chapters. Is there anyway to set up auto numbering so it correctly writes Part One and Part Two and separately have the chapters counting correctly? When I tried it went Part One, Chapter Two, Chapter Three, etc. I could try resetting the count, but then I'm not sure how to get the eventual Part Two to say Part Two and not Part One.

Hope this makes sense.

Again my structure looks like this

[ ] Part One
_____[Chapter One]
_____[Chapter Two]
...
_____[Chapter Nineteen]
[ ] Part Two
_____[Chapter Twenty]
...
Struggling to conform in a surveillance society?
We, The Watched by Adam Bender

User avatar
AmberV
Posts: 20570
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Santiago de Compostela, Galiza
Contact:

Sun Dec 16, 2012 9:56 am Post

At the moment there isn't a way of doing that. We'll have a way of making number streams in the future. For now you have to use different counter types. So you could do something like "Part One" and "Chapter 1".
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

ad
adz1111
Posts: 13
Joined: Mon Jun 24, 2013 12:43 pm
Platform: Windows

Mon Jun 24, 2013 1:19 pm Post

fadedwave,

I know you posted this a while back but (assuming you didn't resolve it) I have compile options set up for my novel almost as you require. Compile output is....

[new page]
Title Page

[new page]
Part I
Incarceration (Part 1's Title)

[new page]
CHAPTER ONE
text text (scenes spanning multiple pages)

[new page]
CHAPTER TWO
text text (scenes spanning multiple pages)

[new page]
CHAPTER THREE
text text (scenes spanning multiple pages)

[new page]
Part II
Liberation (Part 2's Title)

[new page]
CHAPTER FOUR
text text (scenes spanning multiple pages)

[new page]
CHAPTER FIVE
text text (scenes spanning multiple pages)

[new page]
CHAPTER SIX
text text (scenes spanning multiple pages)

etc etc

Binder Layout.JPG
Binder Layout.JPG (38.28 KiB) Viewed 4679 times

The binder layout in Scrivener to support that output above is in the first JPG above. Note, the Part's (yellow folder icons) title in the structure is printed out under the "PART I" automatically (as that is how I have set it up, you can omit that if you prefer no titles). However, the chapter's titles (whilst they have titles in the binder to help me see where I am) are not printed out - they are replaced with chapter 1, 2 etc . Chapters are the green folder icons; scenes are blue "text" icons btw and are collapsed in that picture. They also have titles (that do not print, but help me as a visual reference) and just flow one after the other with a "* * *" separator in the output.

Compile Layout.jpg
Compile Layout.jpg (21.86 KiB) Viewed 4679 times

The compile layout is in the second JPG above. Of course that doesn't show the specific settings for each line item in the compile layout. But assuming you have your stuff structured as I do in the binder it's those lines you need to tweak (for example if you do not want titles other than PART and Chapter).

If the above looks close enough for you to further tweak I have attached a blank "template" based on the above. If you extract it from the attached zip file and stick it in the templates directory, you can create a new project based on it.

Novel (with Parts) - Self numbering.zip
(146.85 KiB) Downloaded 109 times


:-)
Regards,

Adz

User avatar
SarsenLintel
Posts: 419
Joined: Thu Jan 10, 2013 4:46 pm
Platform: Mac + iOS

Sat Nov 23, 2013 8:47 pm Post

Where can I find a list of the Placeholder tags / codes for the Mac?

I just had an idea for something I might want to do in the future and wanted to see whether it was already available on the Mac side. So I downloaded the Mac manual, went to Appendix C - Placeholder Tags. Only to be told to look at the entry on the Help menu for the complete list - which of course I can't, since I'm on Windows.

After a bit of searching it looks like <$n:[keyword]:[tag]> will probably accomplish what I want, but I'd still like to see the complete list if it's available anywhere?

@m
@mpersand
Posts: 31
Joined: Tue Jan 28, 2014 5:32 pm
Platform: Windows

Wed Oct 08, 2014 3:23 pm Post

Just as a matter of interest. These placeholder tags, are they something exclusive to Scrivener or do they come from some markup language (like HTML)?

ad
adz1111
Posts: 13
Joined: Mon Jun 24, 2013 12:43 pm
Platform: Windows

Wed Oct 08, 2014 4:06 pm Post

The codes are exclusive to Scrivener - they won't mean anything to anything else; only Scrivener looks for them.
Regards,

Adz

La
LauraEss
Posts: 11
Joined: Wed Jan 21, 2015 3:56 am
Platform: Windows
Location: Hunter Valley, New South Wales
Contact:

Fri Sep 04, 2015 7:23 am Post

Probably non-sequitur but are there codes for figure and table numbers? If there are then I won't have to manually update them in the exegesis I'm writing.
--
Laura Ess

Br
Briar Kit
Posts: 1788
Joined: Thu Apr 04, 2013 9:04 am
Platform: Mac

Fri Sep 04, 2015 8:18 am Post

LauraEss wrote:Probably non-sequitur but are there codes for figure and table numbers? If there are then I won't have to manually update them in the exegesis I'm writing.


This thread might help ...

viewtopic.php?f=18&t=31365&p=198020&hilit=Figure+numbering#p198008
Account closed January 2017