Merge branch 'main' into jpg/mastodon

This commit is contained in:
Jeffrey Goldberg 2023-11-27 14:58:34 -06:00
commit 55abcd06e8
4 changed files with 0 additions and 82 deletions

View File

@ -115,7 +115,6 @@ def parse_date_string(date_string: str) -> Date | int:
raise ValueError(
f'The date string "{date_string}" is not in YYYY-MM-DD, YYYY-MM, or YYYY'
" format."
" format."
)
if isinstance(date, Date):

View File

@ -265,59 +265,6 @@ def abbreviate_names(names: list[str]) -> str:
return abbreviated_names
def abbreviate_name(name: list[str]) -> str:
"""Abbreviate a name by keeping the first letters of the first names.
This function is used as a Jinja2 filter.
Example:
```python
abbreviate_name("John Doe")
```
will return:
`#!python "J. Doe"`
Args:
name (str): The name to abbreviate.
Returns:
str: The abbreviated name.
"""
first_names = name.split(" ")[:-1]
first_names_initials = [first_name[0] + "." for first_name in first_names]
last_name = name.split(" ")[-1]
abbreviated_name = " ".join(first_names_initials) + " " + last_name
return abbreviated_name
def abbreviate_names(names: list[str]) -> str:
"""Abbreviate a list of names by keeping the first letters of the first names.
This function is used as a Jinja2 filter.
Example:
```python
abbreviate_names(["John Doe", "Jane Atalay"])
```
will return:
`#!python ["J. Doe", "J. Atalay"]`
Args:
names (list[str]): The names to abbreviate.
Returns:
str: The list of abbreviated names.
"""
abbreviated_names = []
for name in names:
abbreviated_names.append(abbreviate_name(name))
return abbreviated_names
def divide_length_by(length: str, divider: float) -> str:
r"""Divide a length by a number.
@ -514,12 +461,6 @@ def run_latex(latex_file_path: str) -> str:
) as latex_process:
output, error = latex_process.communicate()
if latex_process.returncode != 0:
# Find the error line:
for line in output.split("\n"):
if line.startswith("! "):
error_line = line.replace("! ", "")
break
if latex_process.returncode != 0:
# Find the error line:
for line in output.split("\n"):

View File

@ -7,7 +7,6 @@
((# preamble: first column, second column, third column #))
((# first column: p{0.55cm}; constant width, ragged left column #))
((# second column: K{<<theme_options.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# second column: K{<<theme_options.margins.entry_area.left_and_right>>}; variable width, justified column #))
((# third column: R{<<theme_options.date_and_location_width>>}; constant widthm ragged right column #))
\begin{tabularx}{\textwidth-<<theme_options.margins.entry_area.left_and_right|divide_length_by(0.5)>>-0.13cm}{L{0.85cm} K{<<theme_options.margins.entry_area.left_and_right>>} R{<<theme_options.date_and_location_width>>}}
\textbf{<<study_type if study_type is not none>>}

View File

@ -42,27 +42,6 @@
"type": "object",
"additionalProperties": false
},
"ClassicThemeHeaderMargins": {
"properties": {
"vertical_between_name_and_connections": {
"default": "0.2 cm",
"description": "The vertical margin between the name of the person and the connections.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Vertical Margin Between the Name and Connections",
"type": "string"
},
"bottom": {
"default": "0.2 cm",
"description": "The bottom margin of the header, i.e., the vertical margin between the connections and the first section title.",
"pattern": "\\d+\\.?\\d* *(cm|in|pt|mm|ex|em)",
"title": "Bottom Margin",
"type": "string"
}
},
"title": "ClassicThemeHeaderMargins",
"type": "object",
"additionalProperties": false
},
"ClassicThemeHighlightsAreaMargins": {
"properties": {
"top": {