rxiv-maker 1.18.0__py3-none-any.whl → 1.18.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.18.0"
3
+ __version__ = "1.18.1"
@@ -12,7 +12,7 @@ from docx import Document
12
12
  from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_COLOR_INDEX
13
13
  from docx.oxml import OxmlElement
14
14
  from docx.oxml.ns import qn
15
- from docx.shared import Inches, Pt, RGBColor
15
+ from docx.shared import Pt, RGBColor
16
16
  from latex2mathml.converter import convert as latex_to_mathml
17
17
  from lxml import etree
18
18
 
@@ -689,9 +689,22 @@ class DocxWriter:
689
689
  img_width, img_height = img.size
690
690
  aspect_ratio = img_width / img_height
691
691
 
692
- # Page dimensions with margins (Letter size: 8.5 x 11 inches, 1 inch margins)
693
- max_width = Inches(6.5) # 8.5 - 2*1
694
- max_height = Inches(9) # 11 - 2*1
692
+ # Calculate available width from document section settings
693
+ # Get the current section to read actual page dimensions and margins
694
+ section = doc.sections[-1] # Use the most recent section
695
+
696
+ # Page width minus left and right margins
697
+ available_width = section.page_width - section.left_margin - section.right_margin
698
+
699
+ # Page height minus top and bottom margins
700
+ available_height = section.page_height - section.top_margin - section.bottom_margin
701
+
702
+ # Convert available width to Inches for comparison
703
+ max_width = available_width
704
+ max_height = available_height
705
+
706
+ # Calculate aspect ratio thresholds
707
+ page_aspect_ratio = available_width / available_height
695
708
 
696
709
  # Add figure centered
697
710
  # Note: add_picture() creates a paragraph automatically, but we need to add it explicitly
@@ -700,7 +713,7 @@ class DocxWriter:
700
713
  fig_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
701
714
 
702
715
  # Calculate optimal size maintaining aspect ratio
703
- if aspect_ratio > (6.5 / 9): # Wide image - constrain by width
716
+ if aspect_ratio > page_aspect_ratio: # Wide image - constrain by width
704
717
  run = fig_para.add_run()
705
718
  run.add_picture(img_source, width=max_width)
706
719
  else: # Tall image - constrain by height
@@ -639,6 +639,16 @@ def process_template_replacements(template_content, yaml_metadata, article_md, o
639
639
  acknowledgements_block = ""
640
640
  template_content = template_content.replace("<PY-RPL:ACKNOWLEDGEMENTS-BLOCK>", acknowledgements_block)
641
641
 
642
+ # Funding
643
+ funding = content_sections.get("funding", "").strip()
644
+ if funding:
645
+ funding_block = f"""\\begin{{funding}}
646
+ {funding}
647
+ \\end{{funding}}"""
648
+ else:
649
+ funding_block = ""
650
+ template_content = template_content.replace("<PY-RPL:FUNDING-BLOCK>", funding_block)
651
+
642
652
  # Competing Interests
643
653
  competing_interests = content_sections.get("competing_interests", "").strip()
644
654
  if competing_interests:
@@ -190,9 +190,29 @@ Interpret your results in the context of existing literature and theory. Discuss
190
190
 
191
191
  Summarize your key findings and their significance. Reinforce the main contributions of your work and their broader impact on the field. Keep this section concise but impactful, leaving readers with a clear understanding of what your research has accomplished and why it matters.
192
192
 
193
- ## References
193
+ ## Data Availability
194
194
 
195
- Citations are automatically formatted from 03_REFERENCES.bib. Reference works using citation keys like [@smith2023] for single citations or [@smith2023; @johnson2022] for multiple citations.
195
+ Describe where the data supporting the findings of this study are available. Include repository names, accession numbers, DOIs, or URLs. If data are available upon request, state this clearly with contact information.
196
+
197
+ ## Code Availability
198
+
199
+ Provide information about the availability of code, software, or algorithms used in this study. Include repository URLs (e.g., GitHub), software package names with version numbers, and any licensing information.
200
+
201
+ ## Author Contributions
202
+
203
+ Describe the specific contributions of each author to the work. Use initials to identify authors and describe their roles (e.g., "A.B. and C.D. designed the study. A.B. performed experiments. C.D. analyzed data. All authors contributed to writing the manuscript.").
204
+
205
+ ## Acknowledgements
206
+
207
+ Acknowledge individuals, groups, or organizations that contributed to the work but do not meet authorship criteria. This may include technical assistance, discussions, or provision of materials.
208
+
209
+ ## Funding
210
+
211
+ Provide information about funding sources, grant numbers, and supporting organizations. If no external funding was received, state "This research received no external funding."
212
+
213
+ ## Competing Interests
214
+
215
+ The authors declare no competing interests.
196
216
  """
197
217
 
198
218
  def _get_default_supplementary_template(self) -> str:
@@ -353,10 +373,6 @@ Organize your content with additional sections as needed.
353
373
  ## Conclusions
354
374
 
355
375
  Summarize your conclusions.
356
-
357
- ## References
358
-
359
- Add citations using [@ref_key].
360
376
  """
361
377
 
362
378
  def _get_minimal_supplementary_template(self) -> str:
@@ -436,9 +452,29 @@ Suggest future research directions.
436
452
 
437
453
  Summarize key conclusions.
438
454
 
439
- ## References
455
+ ## Data Availability
456
+
457
+ Describe where the data supporting the findings of this study are available. Include repository names, accession numbers, DOIs, or URLs. If data are available upon request, state this clearly with contact information.
458
+
459
+ ## Code Availability
440
460
 
441
- [@ref]
461
+ Provide information about the availability of code, software, or algorithms used in this study. Include repository URLs (e.g., GitHub), software package names with version numbers, and any licensing information.
462
+
463
+ ## Author Contributions
464
+
465
+ Describe the specific contributions of each author to the work. Use initials to identify authors and describe their roles (e.g., "A.B. and C.D. designed the study. A.B. performed experiments. C.D. analyzed data. All authors contributed to writing the manuscript.").
466
+
467
+ ## Acknowledgements
468
+
469
+ Acknowledge individuals, groups, or organizations that contributed to the work but do not meet authorship criteria. This may include technical assistance, discussions, or provision of materials.
470
+
471
+ ## Funding
472
+
473
+ Provide information about funding sources, grant numbers, and supporting organizations. If no external funding was received, state "This research received no external funding."
474
+
475
+ ## Competing Interests
476
+
477
+ The authors declare no competing interests.
442
478
  """
443
479
 
444
480
  # Preprint template methods
@@ -485,13 +521,17 @@ Links to data repositories, code, and protocols for reproducibility.
485
521
 
486
522
  Detailed author contribution statements.
487
523
 
488
- ## Competing Interests
524
+ ## Acknowledgements
489
525
 
490
- Declaration of competing interests.
526
+ Acknowledge individuals, groups, or organizations that contributed to the work but do not meet authorship criteria. This may include technical assistance, discussions, or provision of materials.
491
527
 
492
- ## References
528
+ ## Funding
493
529
 
494
- [@ref]
530
+ Provide information about funding sources, grant numbers, and supporting organizations. If no external funding was received, state "This research received no external funding."
531
+
532
+ ## Competing Interests
533
+
534
+ Declaration of competing interests.
495
535
  """
496
536
 
497
537
 
@@ -48,6 +48,8 @@
48
48
 
49
49
  <PY-RPL:ACKNOWLEDGEMENTS-BLOCK>
50
50
 
51
+ <PY-RPL:FUNDING-BLOCK>
52
+
51
53
  <PY-RPL:COMPETING-INTERESTS-BLOCK>
52
54
 
53
55
  \begin{exauthor}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rxiv-maker
3
- Version: 1.18.0
3
+ Version: 1.18.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=MVd3J-jKwgAFkETITQ9sUCvhAdXfezvIvUmYNFYviSc,51
2
+ rxiv_maker/__version__.py,sha256=tA_6cw-lsQhGEoyqC2fCF8har4ZiuDZgXQZ_VsshRFM,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
@@ -107,7 +107,7 @@ rxiv_maker/exporters/__init__.py,sha256=NcTD1SDb8tTgsHhCS1A7TVEZncyWbDRTa6sJIdLq
107
107
  rxiv_maker/exporters/docx_citation_mapper.py,sha256=oSy1LglLvxlmhO18bzl3EInA2PleE8nXqEgQIIRVzwE,5170
108
108
  rxiv_maker/exporters/docx_content_processor.py,sha256=FoOaF9BoEpZEF3HG3pzFZFgYbYKwbgRNwkOyURZ8XtI,27895
109
109
  rxiv_maker/exporters/docx_exporter.py,sha256=7HYgQSGE_7xl3PTMSPKXIW6yHg-b3MU9ASXG-rKVSXo,21456
110
- rxiv_maker/exporters/docx_writer.py,sha256=252nqO1_ItJzCiuvsrpVdlU4VbLVMSh5FvFpo4k2GtI,56510
110
+ rxiv_maker/exporters/docx_writer.py,sha256=JvNVprMqdvvDGf65ESsEqf7-A33G1D9Kd0Zi2Q4gmbw,57145
111
111
  rxiv_maker/install/__init__.py,sha256=kAB6P-12IKg_K1MQ-uzeC5IR11O2cNxj0t_2JMhooZs,590
112
112
  rxiv_maker/install/dependency_handlers/__init__.py,sha256=NN9dP1usXpYgLpSw0uEnJ6ugX2zefihVjdyDdm1k-cE,231
113
113
  rxiv_maker/install/dependency_handlers/latex.py,sha256=xopSJxYkg3D63rH7RoVLN-Ykl87AZqhlUrrG3m6LoWo,3304
@@ -127,7 +127,7 @@ rxiv_maker/manuscript_utils/figure_utils.py,sha256=FsNtMiA1IOHeA6gQsENmAWLZSAvPp
127
127
  rxiv_maker/processors/__init__.py,sha256=8UmaeFkbPfcwAL5MnhN2DcOA2k8iuJu0B5dDA6_pmnA,720
128
128
  rxiv_maker/processors/author_processor.py,sha256=jC4qZ9M_GADelkp1v8pk46ESUf4DNraXLfMYGhn_7ZM,10016
129
129
  rxiv_maker/processors/markdown_preprocessor.py,sha256=Ez_2lhSFEdJY0CS2SKJJESRfnmSdMq4s0jP2nlFSKN8,11228
130
- rxiv_maker/processors/template_processor.py,sha256=mX8L19Evo9c8DvcdvSdtFHGaGGrQseVsF1CKfj_WYow,30024
130
+ rxiv_maker/processors/template_processor.py,sha256=V47kh5zyiZDPNXBfNkQeyU5r-3MBHM3UMWAjcfgs11s,30316
131
131
  rxiv_maker/processors/yaml_processor.py,sha256=SSXHpwY1Cw81IDN4x40UFtosz-T9l29oh-CZpusmlYo,11499
132
132
  rxiv_maker/scripts/__init__.py,sha256=nKsDmj6UAc90uC6sKd-V6O80OMYjAl4Uha9zF_6ayX0,154
133
133
  rxiv_maker/scripts/custom_doc_generator.py,sha256=pMkdTI8a4qG8Z3gFUJtPwRuu2i0ioW3pKfs22es0KCk,6311
@@ -141,7 +141,7 @@ rxiv_maker/services/publication_service.py,sha256=0p8yQ1jrY3RHwCkzTEl_sAbWYTafRk
141
141
  rxiv_maker/services/validation_service.py,sha256=eWg14NqJu6LzyJBgeXkTaVZAlX4wYFX8ZEvSR5hMx7U,14619
142
142
  rxiv_maker/templates/__init__.py,sha256=UTet1pYPkPdgvrLw-wwaY-PAgdjGJasAi_hdyIh0J8s,562
143
143
  rxiv_maker/templates/manager.py,sha256=HlI7Qb52866Okf4k1aRh0fUy9heOSNGjMQJtrCdL3Xk,6131
144
- rxiv_maker/templates/registry.py,sha256=XHO3sQBRulsTsYUmP9R3K6RxnYMAehqrY-MoPgGaexE,16206
144
+ rxiv_maker/templates/registry.py,sha256=GikYKBBUSzzT0yeI8W8EZYVo40B9wtseNVGTLsAJGKY,18800
145
145
  rxiv_maker/tex/python_execution_section.tex,sha256=pHz6NGfZN4ViBo6rInUO5FAuk81sV_Ppqszrvl00w_4,2218
146
146
  rxiv_maker/utils/__init__.py,sha256=4ya5VR8jqRqUChlnUeMeeetOuWV-gIvjPwcE1u_1OnI,1540
147
147
  rxiv_maker/utils/accent_character_map.py,sha256=L8BDiUH3IPCZ_pQzfsnlY0KkJpbyNpf3nQy4DBUdczE,3484
@@ -191,11 +191,11 @@ rxiv_maker/validators/syntax_validator.py,sha256=hHpKVKky3UiA1ZylA6jJVP3DN47LgaS
191
191
  rxiv_maker/validators/doi/__init__.py,sha256=NqATXseuS0zVNns56RvFe8TdqgvueY0Rbw2Pjozlajc,494
192
192
  rxiv_maker/validators/doi/api_clients.py,sha256=tqdYUq8LFgRIO0tWfcenwmy2uO-IB1-GMvBfF3lP7-0,21763
193
193
  rxiv_maker/validators/doi/metadata_comparator.py,sha256=euqHhKP5sHQAdZbdoAahUn6YqJqOfXIOobNgAqFHlN8,11533
194
- rxiv_maker/tex/template.tex,sha256=zrJ3aFfu8j9zkg1l375eE9w-j42P3rz16wMD3dSgi1I,1354
194
+ rxiv_maker/tex/template.tex,sha256=_tPtxrurn3sKTt9Kfa44lPdPyT44vHbDUOGqldU9r2s,1378
195
195
  rxiv_maker/tex/style/rxiv_maker_style.bst,sha256=jbVqrJgAm6F88cow5vtZuPBwwmlcYykclTm8RvZIo6Y,24281
196
196
  rxiv_maker/tex/style/rxiv_maker_style.cls,sha256=6VDmZE0uvYWog6rcYi2K_NIM9-Pgjx9AFdRg_sTheK0,24374
197
- rxiv_maker-1.18.0.dist-info/METADATA,sha256=uJSb2e2tMW1eUvob2E8iKM5kJAVZsILejVNbG_Uitto,18222
198
- rxiv_maker-1.18.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
199
- rxiv_maker-1.18.0.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
200
- rxiv_maker-1.18.0.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
201
- rxiv_maker-1.18.0.dist-info/RECORD,,
197
+ rxiv_maker-1.18.1.dist-info/METADATA,sha256=tPF_g3YUTC7xDc73LIT__1Y8E3vGxY7m5gqssm-P7j0,18222
198
+ rxiv_maker-1.18.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
199
+ rxiv_maker-1.18.1.dist-info/entry_points.txt,sha256=ghCN0hI9A1GlG7QY5F6E-xYPflA8CyS4B6bTQ1YLop0,97
200
+ rxiv_maker-1.18.1.dist-info/licenses/LICENSE,sha256=GSZFoPIhWDNJEtSHTQ5dnELN38zFwRiQO2antBezGQk,1093
201
+ rxiv_maker-1.18.1.dist-info/RECORD,,