rxiv-maker 1.19.0__py3-none-any.whl → 1.19.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
rxiv_maker/__version__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Version information."""
2
2
 
3
- __version__ = "1.19.0"
3
+ __version__ = "1.19.1"
@@ -185,7 +185,7 @@ def convert_markdown_to_latex(
185
185
 
186
186
  # Post-processing: catch any remaining unconverted headers
187
187
  # This is a safety net in case some headers weren't converted properly
188
- content = re.sub(r"^### (.+)$", r"\\subsubsection{\1}", content, flags=re.MULTILINE)
188
+ content = re.sub(r"^### (.+)$", r"\\subsubsection{\1}\n\n", content, flags=re.MULTILINE)
189
189
 
190
190
  # Process supplementary note references BEFORE citations
191
191
  # (for both main and supplementary content)
@@ -457,26 +457,26 @@ def _process_tables_with_protection(
457
457
 
458
458
 
459
459
  def _convert_headers(content: LatexContent, is_supplementary: bool = False) -> LatexContent:
460
- """Convert markdown headers to LaTeX sections."""
460
+ """Convert markdown headers to LaTeX sections with proper spacing."""
461
461
  if is_supplementary:
462
462
  # For supplementary content, use \\section* for the first header
463
463
  # to avoid "Note 1:" prefix
464
464
  # First, find the first # header and replace it with \section*
465
- content = re.sub(r"^# (.+)$", r"\\section*{\1}", content, flags=re.MULTILINE, count=1)
465
+ content = re.sub(r"^# (.+)$", r"\\section*{\1}\n\n", content, flags=re.MULTILINE, count=1)
466
466
  # Then replace any remaining # headers with regular \section
467
- content = re.sub(r"^# (.+)$", r"\\section{\1}", content, flags=re.MULTILINE)
467
+ content = re.sub(r"^# (.+)$", r"\\section{\1}\n\n", content, flags=re.MULTILINE)
468
468
  else:
469
- content = re.sub(r"^# (.+)$", r"\\section{\1}", content, flags=re.MULTILINE)
469
+ content = re.sub(r"^# (.+)$", r"\\section{\1}\n\n", content, flags=re.MULTILINE)
470
470
 
471
- content = re.sub(r"^## (.+)$", r"\\subsection{\1}", content, flags=re.MULTILINE)
471
+ content = re.sub(r"^## (.+)$", r"\\subsection{\1}\n\n", content, flags=re.MULTILINE)
472
472
 
473
473
  # For supplementary content, ### headers are handled by the
474
474
  # supplementary note processor
475
475
  # For non-supplementary content, convert all ### headers normally
476
476
  if not is_supplementary:
477
- content = re.sub(r"^### (.+)$", r"\\subsubsection{\1}", content, flags=re.MULTILINE)
477
+ content = re.sub(r"^### (.+)$", r"\\subsubsection{\1}\n\n", content, flags=re.MULTILINE)
478
478
 
479
- content = re.sub(r"^#### (.+)$", r"\\paragraph{\1}", content, flags=re.MULTILINE)
479
+ content = re.sub(r"^#### (.+)$", r"\\paragraph{\1}\n\n", content, flags=re.MULTILINE)
480
480
  return content
481
481
 
482
482
 
@@ -23,13 +23,15 @@ def encode_html_entities(text: str) -> str:
23
23
 
24
24
  bioRxiv's TSV upload requires special characters to be encoded as HTML entities.
25
25
  For example, "António" becomes "António", "Åbo" becomes "Åbo".
26
+ Characters without named entities use numeric references (e.g., "č" -> "č").
26
27
 
27
28
  Args:
28
29
  text: Text that may contain Unicode characters
29
30
 
30
31
  Returns:
31
32
  Text with Unicode characters converted to HTML entities
32
- (e.g., "António" -> "António", "Åbo" -> "Åbo")
33
+ (e.g., "António" -> "António", "Åbo" -> "Åbo",
34
+ "Vaitkevičiūtė" -> "Vaitkevičiūtė")
33
35
 
34
36
  Examples:
35
37
  >>> encode_html_entities("António")
@@ -38,6 +40,8 @@ def encode_html_entities(text: str) -> str:
38
40
  'Åbo'
39
41
  >>> encode_html_entities("José García")
40
42
  'José García'
43
+ >>> encode_html_entities("Vaitkevičiūtė")
44
+ 'Vaitkevičiūtė'
41
45
  """
42
46
  if not text:
43
47
  return text
@@ -50,13 +54,19 @@ def encode_html_entities(text: str) -> str:
50
54
  if ord(char) > 127:
51
55
  char_to_entity[char] = f"&{entity_name};"
52
56
 
53
- # Convert each character to HTML entity if it has one
57
+ # Convert each character to HTML entity (named or numeric)
54
58
  result = []
55
59
  for char in text:
56
- if char in char_to_entity:
60
+ char_code = ord(char)
61
+ if char_code <= 127:
62
+ # Basic ASCII - keep as-is
63
+ result.append(char)
64
+ elif char in char_to_entity:
65
+ # Has named entity - use it
57
66
  result.append(char_to_entity[char])
58
67
  else:
59
- result.append(char)
68
+ # No named entity - use numeric character reference
69
+ result.append(f"&#{char_code};")
60
70
 
61
71
  return "".join(result)
62
72
 
@@ -418,7 +418,7 @@
418
418
  {\sffamily\small\bfseries\itshape}
419
419
  {\thesubsubsection.}
420
420
  {0.5em}
421
- {#1. }
421
+ {#1.\enskip}
422
422
  []
423
423
  \titleformat{\paragraph}[runin]
424
424
  {\sffamily\small\bfseries}
@@ -427,7 +427,7 @@
427
427
  {#1}
428
428
  \titlespacing*{\section}{0pc}{1.5ex \@plus2pt \@minus1pt}{2pt}
429
429
  \titlespacing*{\subsection}{0pc}{1.2ex \@plus2pt \@minus1pt}{1pt}
430
- \titlespacing*{\subsubsection}{0pc}{1ex \@plus1pt \@minus0.5pt}{1pt}
430
+ \titlespacing*{\subsubsection}{0pc}{1ex \@plus1pt \@minus0.5pt}{8pt}
431
431
  \titlespacing*{\paragraph}{0pc}{0.8ex \@plus1pt \@minus0.5pt}{8pt}
432
432
 
433
433
  %% Figure caption style
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rxiv-maker
3
- Version: 1.19.0
3
+ Version: 1.19.1
4
4
  Summary: Write scientific preprints in Markdown. Generate publication-ready PDFs efficiently.
5
5
  Project-URL: Homepage, https://github.com/HenriquesLab/rxiv-maker
6
6
  Project-URL: Documentation, https://github.com/HenriquesLab/rxiv-maker#readme
@@ -1,5 +1,5 @@
1
1
  rxiv_maker/__init__.py,sha256=p04JYC5ZhP6dLXkoWVlKNyiRvsDE1a4C88f9q4xO3tA,3268
2
- rxiv_maker/__version__.py,sha256=s7-5Jsk7L8O8kxknnMqV6RyUG2rsUkOD8DjGMhagzNo,51
2
+ rxiv_maker/__version__.py,sha256=1asCY_t8ZrspO60Mj4f6F7xZwm107oYPswgQnlvSKek,51
3
3
  rxiv_maker/rxiv_maker_cli.py,sha256=9Lu_mhFPXwx5jzAR6StCNxwCm_fkmP5qiOYdNuh_AwI,120
4
4
  rxiv_maker/validate.py,sha256=AIzgP59KbCQJqC9WIGfUdVv0xI6ud9g1fFznQkaGz5Q,9373
5
5
  rxiv_maker/cli/__init__.py,sha256=Jw0DTFUSofN-02xpVrt1UUzRcgH5NNd-GPNidhmNwpU,77
@@ -52,7 +52,7 @@ rxiv_maker/converters/figure_processor.py,sha256=xA7Z7-H4q4cPLAqlCjlcv4v_cYI-fLT
52
52
  rxiv_maker/converters/html_processor.py,sha256=n4AfjipeSi6uFpDtLiZb4GQYOQzYF_HD_FqdDXk84dY,5879
53
53
  rxiv_maker/converters/list_processor.py,sha256=QTt22XrkR5ESO12jvY0hCSFjagoCk2Htrc5bZ4kqon4,6430
54
54
  rxiv_maker/converters/math_processor.py,sha256=fwna-YFEbLFdsq6kllKAeAHv_6WS6rQn8R5JbeR1QQI,8324
55
- rxiv_maker/converters/md2tex.py,sha256=eO0gMjINrFmefJZARCEQO0ACmLgVE5mAccR_Fqz8zl4,21395
55
+ rxiv_maker/converters/md2tex.py,sha256=rDaSvQyfpuu7zkQOGrrXcAKnuSbQOIiRAvBM_hlIS1M,21443
56
56
  rxiv_maker/converters/python_executor.py,sha256=YMJO7A-re8EOCQjy-PKryFFBoxddK3g9R1VuaH2MfYY,37369
57
57
  rxiv_maker/converters/section_processor.py,sha256=7znzb_FYH2sCYH336l5J1ZdRaQv-ycdCN79RpI3Tc-w,5706
58
58
  rxiv_maker/converters/supplementary_note_processor.py,sha256=8wzQw2kN0Afg0iB7hPFdeWiDlDsFhhTkcRTvwCXIvjc,6689
@@ -100,7 +100,7 @@ rxiv_maker/engines/operations/generate_docs.py,sha256=8d_oVYUuRRqTuYN1KnJKqM5Ydp
100
100
  rxiv_maker/engines/operations/generate_figures.py,sha256=YeKzH6qVsuPGjtCsvWugLJoys6y73xTyO7Y5g30KM20,38730
101
101
  rxiv_maker/engines/operations/generate_preprint.py,sha256=wpKDAu2RLJ4amSdhX5GZ7hU-iTsTRt4etcEA7AZYp04,2662
102
102
  rxiv_maker/engines/operations/prepare_arxiv.py,sha256=cd0JN5IO-Wy9T8ab75eibyaA8_K8Gpwrz2F-95OMnx4,21551
103
- rxiv_maker/engines/operations/prepare_biorxiv.py,sha256=-Ok4iwnLsgNk6xJ9HSk74_7UBammJRTF3r8ISy_qDjc,13858
103
+ rxiv_maker/engines/operations/prepare_biorxiv.py,sha256=X0U0UdFhTYldUMKjBJbu9IUL1xH8taIecmpC27HqndM,14353
104
104
  rxiv_maker/engines/operations/setup_environment.py,sha256=gERuThHTldH0YqgXn85995deHBP6csY1ZhCNgU6-vFg,12691
105
105
  rxiv_maker/engines/operations/track_changes.py,sha256=jJZ-XnTFx8TMvcnX8_9D7ydc0G01S1PnckLkxHRTX1g,24722
106
106
  rxiv_maker/engines/operations/validate.py,sha256=OVmtRVtG-r1hoA8IqYaNC-ijN1a5ixM3X5Z8Gda-O2M,17142
@@ -195,9 +195,9 @@ rxiv_maker/validators/doi/api_clients.py,sha256=tqdYUq8LFgRIO0tWfcenwmy2uO-IB1-G
195
195
  rxiv_maker/validators/doi/metadata_comparator.py,sha256=euqHhKP5sHQAdZbdoAahUn6YqJqOfXIOobNgAqFHlN8,11533
196
196
  rxiv_maker/tex/template.tex,sha256=_tPtxrurn3sKTt9Kfa44lPdPyT44vHbDUOGqldU9r2s,1378
197
197
  rxiv_maker/tex/style/rxiv_maker_style.bst,sha256=jbVqrJgAm6F88cow5vtZuPBwwmlcYykclTm8RvZIo6Y,24281
198
- rxiv_maker/tex/style/rxiv_maker_style.cls,sha256=6VDmZE0uvYWog6rcYi2K_NIM9-Pgjx9AFdRg_sTheK0,24374
199
- rxiv_maker-1.19.0.dist-info/METADATA,sha256=cM3QcAip52NGWPYbS5RqFTaP1Q3L6nsN6z0UmBt6YT4,18432
200
- rxiv_maker-1.19.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
201
- rxiv_maker-1.19.0.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
202
- rxiv_maker-1.19.0.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
203
- rxiv_maker-1.19.0.dist-info/RECORD,,
198
+ rxiv_maker/tex/style/rxiv_maker_style.cls,sha256=sMYmXtCZB6rEdZKqnY8f3-Jh6ku_3eZNKMcpNbQF-JQ,24380
199
+ rxiv_maker-1.19.1.dist-info/METADATA,sha256=ieFzn7Auj1L10FzS-PRbY569MADJqhXj_OmJXiNDVmU,18432
200
+ rxiv_maker-1.19.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
201
+ rxiv_maker-1.19.1.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
202
+ rxiv_maker-1.19.1.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
203
+ rxiv_maker-1.19.1.dist-info/RECORD,,