Skip to content

Commit

Permalink
Merge pull request #285 from lsst/u/timj/adass2024
Browse files Browse the repository at this point in the history
Update ADASS template for 2024
  • Loading branch information
timj authored Oct 31, 2024
2 parents 2f86cfa + 83e0b3f commit b16a54a
Show file tree
Hide file tree
Showing 26 changed files with 10,120 additions and 260 deletions.
22 changes: 12 additions & 10 deletions project_templates/technote_adasstex/testn-000/AdassChecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
# used by the various utility scripts used in the editing process for the
# proceedings.)

__AdassConference__ = "XXIX"
__AdassConference__ = "XXXII"

__AdassEditors__ = "Pizzo,~R. and Deul,~E. and Mol,~J. and de Plaa,~J. and Verkouter,~H. and Williams,~R."

Expand Down Expand Up @@ -3555,11 +3555,13 @@ def CheckPaperName(Paper,Problems) :
# This has been the convention now for both Trieste 2016 and Santiago
# 2018.

TriestePosters = True
TriestePosters = False
CapeTownPosters = False
VictoriaNames = True

# Disable the use of 'X' as a prefix.

XAllowed = False
XAllowed = FALSE

# Some intital checks on the leading digit, which should be O for Oral,
# I for Invited (also oral), B for BoF, F for Focus Demo, 'D' for
Expand All @@ -3570,10 +3572,9 @@ def CheckPaperName(Paper,Problems) :
Problem = "Paper name supplied is blank"
Problems.append(Problem)
ValidSoFar = False

if (ValidSoFar) :
Letter = Paper[0]
if (not Letter in "IOBFPDT") :
if (not Letter in ("IOBFPDTH" if not CapeTownPosters else "IOBFXDTH")) :
if (Letter == 'X' and XAllowed) :
Problems.append(
"It seems that the paper ID could not be determined from the")
Expand Down Expand Up @@ -3616,9 +3617,8 @@ def CheckPaperName(Paper,Problems) :
Problems.append(Problem)
ValidSoFar = False
break

if (Letter == 'P' and not TriestePosters) :

if (Letter == ('X' if CapeTownPosters else 'P') and not TriestePosters) :
# This section checks for a valid poster number using the style in
# use up to Trieste. This requires a poster number to be a 3 digit
# number, with leading zeros if necessary.
Expand All @@ -3645,7 +3645,7 @@ def CheckPaperName(Paper,Problems) :
ValidSoFar = False

if (Letter == 'I' or Letter == 'O' or \
(Letter == 'P' and TriestePosters)) :
(Letter == ('X' if CapeTownPosters else 'P') and TriestePosters)) :

# Oral presentation numbers (and posters using the Trieste convention)
# have the form S-N where S is the session and N the number. Go
Expand All @@ -3656,9 +3656,11 @@ def CheckPaperName(Paper,Problems) :
N = 0
Session = True
Leading = True
if CapeTownPosters and len(Number) != 3:
Problem = "PID number should be 3 digit and should have leading zeros if needed"
for Char in Number :
if (Leading) :
if (Char == '0') :
if (Char == '0' and not CapeTownPosters) :
if (Session) :
Problem = "Session number should not have leading zeros"
else :
Expand Down Expand Up @@ -3694,7 +3696,7 @@ def CheckPaperName(Paper,Problems) :
else :
N = N * 10 + Value
if (ValidSoFar) :
if (S == 0 or N == 0) :
if (S == 0 or N == 0) and not CapeTownPosters:
Problem = "Session or paper number cannot be zero"
Problems.append(Problem)
ValidSoFar = False
Expand Down
51 changes: 48 additions & 3 deletions project_templates/technote_adasstex/testn-000/Aindex.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# A i n d e x . p y
#
Expand Down Expand Up @@ -32,20 +32,65 @@

from __future__ import (print_function,division,absolute_import)


import os
import sys
import string

import AdassChecks

def FindTexFile (Paper,Problems) :
TexFileName = Paper + ".tex"
print("The main .tex file for the paper should be called",TexFileName)

# There should be a main .tex file in the directory called <paper>.tex

if (os.path.exists(TexFileName)) :
print("Found main .tex file",TexFileName,"OK")
else :
print("** Could not find",TexFileName,"**")

# See if there is just one .tex file in the directory, and if so use
# it.

DirList = os.listdir(".")
TexFiles = []
for FileName in DirList :
if os.path.splitext(FileName)[1] == ".tex" and os.path.splitext(FileName)[0].find('.') != 0:
TexFiles.append(FileName)
if (len(TexFiles) == 1) :
OnlyFileName = TexFiles[0]
print("There is just one .tex file in the directory,")
print("so we will assume",OnlyFileName,"is the one to use.")
print("It should be renamed as",TexFileName)
Problems.append("Should rename " + OnlyFileName + " as " + TexFileName)
TexFileName = OnlyFileName
else :
TexFileName = ""
if (len(TexFiles) == 0) :
print("** There are no .tex files in the directory **")
Problems.append("Could not find any .tex files in the directory")
else :
print("The directory has the following .tex files:")
for TexFile in TexFiles :
print(" ",TexFile)
print("Unable to know which is the main .tex file for the paper")
Problems.append("Cannot identify the correct .tex file to use")
return TexFileName



NumberArgs = len(sys.argv)
if (NumberArgs < 2) :
print("Usage: Aindex <paper>")
print("eg: Aindex O1-4")
else :
Paper = sys.argv[1]
if not os.path.exists(Paper):
print("Paper {} not found... looking for main .tex".format(Paper))
Paper = FindTexFile(Paper, [])
Notes = []

if os.path.splitext(Paper)[1] == '.tex':
Paper = Paper[:-4]
print("")
print("Generating author index entries for paper",Paper)
print("")
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_adasstex/testn-000/FixUnprintable.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# F i x U n p r i n t a b l e . p y
#
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_adasstex/testn-000/Index.py
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# I n d e x . p y
#
Expand Down
Loading

0 comments on commit b16a54a

Please sign in to comment.