'revtes4-1' template of aip journals and the error : File `aps10pt4-1.rtx' not found. ...intsize\expandafter{\#pointsize#default} - templates

I am writing a manuscript in aip journals (revtex4-1 that can be found here). Unfortunately, when I run it with Texstoduio or TexMaker I get this eror:
File `aps10pt4-1.rtx' not found. ...intsize\expandafter{#pointsize#default}.
I copy aps10pt4-1.rtx from Github, but nothing fixed. This is the my log file:
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**./aipsamp.tex
(aipsamp.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2022-12-17> (revtex4-1.cls
Document Class: revtex4-1 2020/09/30 4.1s (http://publish.aps.org/revtex4/ for
documentation)
Copyright (c) 2009 The American Physical Society.
mailto:revtex#aps.org
Licensed under the LPPL:
http://www.ctan.org/tex-archive/macros/latex/base/lppl.txt
Arthur Ogawa <arthur_ogawa at sbcglobal dot net>
Based on work by David Carlisle <david at dcarlisle.demon.co.uk>.
ltxutil[2020/09/30 4.1s utilities package (portions licensed from W. E. Baxter
web at superscript.com)]
LaTeX Info: Redefining \#centercr on input line 346.
Class revtex4-1 Info: Repairing hyperref-unfriendly LaTeX definition of \mpfoot
note on input line 471.
Class revtex4-1 Info: Repairing broken LateX \#sect on input line 793.
\intertabularlinepenalty=\count185
\#tbpen=\count186
\#arstrutbox#hline=\box51
Class revtex4-1 Info: Repairing broken LaTeX \#xbitor on input line 1824.
Class revtex4-1 Info: Making \typeout \long on input line 2089.
ltxfront[2020/09/30 4.1s frontmatter package (AO,DPC)]
\c#affil=\count187
\c#collab=\count188
\absbox=\box52
ltxgrid[2020/09/30 4.1s page grid package (portions licensed from W. E. Baxter
web at superscript.com)]
\c#linecount=\count189
\output#latex=\toks16
\box#size#1=\box53
\box#size#2=\box54
\#protection#box=\box55
\#topmark#saved=\toks17
\footins#saved=\box56
\footins#recovered=\box57
\column#recovered=\box58
\pagesofar=\box59
\footsofar=\box60
\pagegrid#col=\count190
Class revtex4-1 Info: Overriding \#vspace, \#vspacer, \#no#pgbk, \#newline, and
\\ on input line 5655.
\c#part=\count191
\c#section=\count192
\c#subsection=\count193
\c#subsubsection=\count194
\c#paragraph=\count195
\c#subparagraph=\count196
\abovecaptionskip=\skip48
\belowcaptionskip=\skip49
\c#figure=\count197
\fbox#1=\box61
\c#table=\count198
\fbox#2=\box62
\c#video=\count199
\fbox#4=\box63
\#bibdataout=\write3
\widetext#top=\box64
\widetext#bot=\box65
Class revtex4-1 Info: Selecting society aip on input line 7616.
(aip4-1.rtx
File: aip4-1.rtx 2010/07/25 4.1r AIP substyle for REVTeX
Class revtex4-1 Info: RevTeX society AIP selected on input line 75.
)
Class revtex4-1 Warning: No journal specified, using default cha.
Using journal substyle cha.
Class revtex4-1 Info: Reading file aps10pt4-1.rtx on input line 7621.
! LaTeX Error: File `aps10pt4-1.rtx' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: rtx)
Enter file name:
! Emergency stop.
<read *>
l.7621 ...intsize\expandafter{\#pointsize#default}
%^^M
*** (cannot \read from terminal in nonstop modes)
Here is how much of TeX's memory you used:
1866 strings out of 476406
24196 string characters out of 2789095
1848787 words of memory out of 3000000
22315 multiletter control sequences out of 15000+600000
512287 words of font info for 32 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
33i,0n,45p,549b,22s stack positions out of 10000i,1000n,20000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
I downloaded the template from overleaf (official source). I really appreciate any help

Related

pandoc error: [WARNING] Could not parse YAML metadata: Unexpected 'd'

I am not sure why I get the following error message while converting markdown to PDF with a template:
[WARNING] Could not parse YAML metadata at line 10 column 1: Unexpected 'd'
Here is the command I use to build the document:
pandoc --template eisvogel -o output.pdf input.md
Here is the markdown file:
---
titlepage: true
title: Some title
author: [Author]
date: "2022-11-25"
colorlinks: true
disable-header-and-footer: true
---
# Quick Introduction
A famous guy once said:
The error occurs when I add the disable-header-and-footer: true. If this line is not here, then the Pandoc processes the document.
The space after the colon in the offending line is not a normal (ASCII) space but the Unicode character U+202F, "Narrow Non-Break Space". The YAML parser doesn't see a key-value pair but a single word because of that. Replace it with an ASCII space and everything should work.

Why can only download the first episode video on bilibili with youtube-dl?

I can download the first episode of a series.
yutube-dl https://www.bilibili.com/video/av90163846?p=1
Now I want to download all episodes of the series.
for i in $(seq 1 55)
do
yutube-dl https://www.bilibili.com/video/av90163846?p=$i
done
All other episodes except the first can't be downloaded ,both of them contains same error info such as below:
[BiliBili] 90163846: Downloading webpage
[BiliBili] 90163846: Downloading video info page
[download] 【合集300集全】地道美音 美国中小学教学 自然科学 社会常识-90163846.flv has already been downloaded
Please have a try and check what happens,how to fix then?
#Christos Lytras,strange thing happen with your code:
for i in $(seq 1 55)
do
youtube-dl https://www.bilibili.com/video/av90163846?p=$i -o "%(title)s-%(id)s-$i.%(ext)s"
done
It surely can download video on bilibili,but all of downloaded video have different name and same content,all the content are the same as the first episode,have a try and check ,you will find that fact.
This error occurs because youtube-dl ignores URI parameters after ? for the filename, so the next file it tries to download has the same name with the previous one and it fails because a file already exists with that name. The solution is to use the --output template filesystem option to set a filename which it'll have an index in its name using the variable i.
Filesystem Options
-o, --output TEMPLATE Output filename template, see the "OUTPUT
TEMPLATE" for all the info
OUTPUT TEMPLATE
The -o option allows users to indicate a
template for the output file names.
The basic usage is not to set any template arguments when downloading
a single file, like in youtube-dl -o funny_video.flv "https://some/video". However, it may contain special sequences that
will be replaced when downloading each video. The special sequences
may be formatted according to python string formatting operations. For
example, %(NAME)s or %(NAME)05d. To clarify, that is a percent symbol
followed by a name in parentheses, followed by formatting operations.
Allowed names along with sequence type are:
id (string): Video identifier
title (string): Video title
url (string): Video URL
ext (string): Video filename extension
...
For your case, to use the i in the output filename, you can use something like this:
for i in $(seq 1 55)
do
youtube-dl https://www.bilibili.com/video/av90163846?p=$i -o "%(title)s-%(id)s-$i.%(ext)s"
done
which will use the title the id the i variable for indexing and the ext for the video extension.
You can check the Output Template variables for more options defining the filename.
UPDATE
Apparently, bilibili.com has some Javascript involved to setup the video player and fetch the video files. There is no way so you can extract the whole playlist using youtube-dl. I suggest you use Lux which supports Bilibili playlists out of the box. It has installers for all major operating systems and you can use it like this to download the whole playlist:
lux -p https://www.bilibili.com/video/av90163846
of if you want to download only until 55 video, you can use -end 55 cli option like this:
lux -end 55 -p https://www.bilibili.com/video/av90163846
You can use the -start, -end or -items option to specify the download
range of the list:
-start
Playlist video to start at (default 1)
-end
Playlist video to end at
-items
Playlist video items to download. Separated by commas like: 1,5,6,8-10
For bilibili playlists only:
-eto
File name of each bilibili episode doesn't include the playlist title
If you want to only get information of a playlist without downloading files, then use the -i command line option like this:
lux -i -p https://www.bilibili.com/video/av90163846
will output something like this:
Site: 哔哩哔哩 bilibili.com
Title: 【合集300集全】地道美音 美国中小学教学 自然科学 社会常识 P1 【001】Parts of Plants
Type: video
Streams: # All available quality
[64] -------------------
Quality: 高清 720P
Size: 308.24 MiB (323215935 Bytes)
# download with: lux -f 64 ...
[32] -------------------
Quality: 清晰 480P
Size: 201.57 MiB (211361230 Bytes)
# download with: lux -f 32 ...
[16] -------------------
Quality: 流畅 360P
Size: 124.75 MiB (130809508 Bytes)
# download with: lux -f 16 ...
Site: 哔哩哔哩 bilibili.com
Title: 【合集300集全】地道美音 美国中小学教学 自然科学 社会常识 P2 【002】Life Cycle of a Plant
Type: video
Streams: # All available quality
[64] -------------------
Quality: 高清 720P
Size: 227.75 MiB (238809781 Bytes)
# download with: lux -f 64 ...
[32] -------------------
Quality: 清晰 480P
Size: 148.96 MiB (156191413 Bytes)
# download with: lux -f 32 ...
[16] -------------------
Quality: 流畅 360P
Size: 94.82 MiB (99425641 Bytes)
# download with: lux -f 16 ...

Render to "pdf_document" output format in rmarkdown getting stuck on knitr asis_output function

New to Rmarkdown (and markdown in general). I've inherited some code that works great for the html_document output format but not for pdf_document. It seems to get stuck on the knitr asis_output function in the .Rmd script. When I comment out chunks containing that function, it writes to pdf no problem. Here's some troubleshooting I've tried:
xfun::session_info('rmarkdown')
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.1, RStudio 1.2.1335
Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding
Locale: en_CA.UTF-8 / en_CA.UTF-8 / en_CA.UTF-8 / C / en_CA.UTF-8 / en_CA.UTF-8
:Package version:
base64enc_0.1.3 digest_0.6.20 evaluate_0.14 glue_1.3.1 graphics_3.6.1 grDevices_3.6.1 highr_0.8
htmltools_0.4.0 jsonlite_1.6 knitr_1.25 magrittr_1.5 markdown_1.1 methods_3.6.1 mime_0.7
Rcpp_1.0.2 rlang_0.4.0 rmarkdown_1.16 stats_3.6.1 stringi_1.4.3 stringr_1.4.0 tinytex_0.17.1
tools_3.6.1 utils_3.6.1 xfun_0.10 yaml_2.2.0
Pandoc version: 2.7.3
Sys.getenv('PATH')
[1] "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/TeX/texbin:/opt/X11/bin"
tinytex::tinytex_root()
[1] "/usr/local/texlive/2019"
(tinytex::tlmgr_path())
tlmgr path add add_link_dir_dir: /usr/local/share/info/dir exists;
not making symlink. add_link_dir_dir: destination
/usr/local/share/man/man5 not writable, no links from
/usr/local/texlive/2019/texmf-dist/doc/man/man5.tlmgr: An error has
occurred. See above messages. Exiting. add of symlinks had 1
error(s), see messages above.[1] 6
So maybe the problem is a path issue? In which case I have no clue how to fix. Or should I be using an alternative to the asis_output function? Any help is much appreciated. Here's the relevant bits of my code:
In the R script:
id <- 44
rmarkdown::render('mymarkdown.Rmd',
output_format = "pdf_document",
output_file = paste("report_", id,".pdf", sep=''),
output_dir = '/Users/myname/Documents/test')
In the Rmd file:
---
title: "Monitoring Activity Summary Report"
mode: selfcontained
date: "November 2019"
output:
pdf_document: default
html_document: default
self_contained: yes
---
[some code chunks...]
[then these code chunks that get stuck only for "pdf_document"...]
``` {r setup_Samp1a, echo=FALSE}
sampling_1 <- !is.na(sampling_unique[1])```
```{r conditional block, eval = sampling_1}
asis_output("### 3.1 Sampling 1\\n") # Header that is only shown if
sampling_1 == TRUE```
The error message
! Undefined control sequence.
<argument> 3.1 Sampling 1\n
Error: Failed to compile /Users/myname/Documents/test/report_44.tex.
See https://yihui.name/tinytex/r/#debugging for debugging tips. See
report_44.log for more info.

another LaTeX Error: Missing \begin{document} in rmarkdown

I'm automating a pdf report using rmarkdown. I use a macro to run the code. I can run the code once and it works with no problems. When I call the macro again, it appears to work but when creating a pdf, I get the error "LaTeX Error: Missing \begin{document}"
This is what I get the first time:
output file: L:/Statunit/morton/NCC R markdown reports/NCC Reports/NCC_Dashboard_Report_Dave.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS "L:/Statunit/morton/NCC R markdown reports/NCC Reports/NCC_Dashboard_Report_Dave.utf8.md" --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc9e03c3032cf.tex --template "C:\Users\Mortond\Documents\R\win-library\3.5\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes" --include-in-header "C:\Users\Mortond\AppData\Local\Temp\Rtmp8cWvvQ\rmarkdown-str9e022b75c22.html"
Output created: Report-254-225573.pdf
The second time, I call the same code but only change the report name, so the data is the same and I get.
output file: L:/Statunit/morton/NCC R markdown reports/NCC Reports/NCC_Dashboard_Report_Dave.knit.md
"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS "L:/Statunit/morton/NCC R markdown reports/NCC Reports/NCC_Dashboard_Report_Dave.utf8.md" --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output pandoc9e01f0a74c5.tex --template "C:\Users\Mortond\Documents\R\win-library\3.5\rmarkdown\rmd\latex\default-1.17.0.2.tex" --highlight-style tango --latex-engine xelatex --variable graphics=yes --variable "geometry:margin=1in" --variable "compact-title:yes"
! LaTeX Error: Missing \begin{document}.
Error: Failed to compile Report-253-225573.tex. See Report-253-225573.log for more info.
my YAML is
---
title: ''
header-includes:
- \usepackage{fancyhdr}
- \addtolength{\headheight}{1.0cm} % make more space for the header
- \pagestyle{fancyplain} % use fancy for all pages except chapter start
- \lhead{\includegraphics[height=1.2cm]{TJC_logo_color.png}} % left logo
- \renewcommand{\headrulewidth}{0pt} % remove rule below header
output:
pdf_document:
latex_engine: xelatex
word_document: default
html_document: default
urlcolor: blue
classoption: landscape
---
my code that calls the markdown is :
render_report = function(b,h,p) {
rmarkdown::render(
"L:/Statunit/morton/NCC R markdown reports/NCC Dashboard Report
Dave.Rmd", params = list(
b1 = b,
h1 = h,
p1 = p
),
output_file = paste0("Report-", h, "-", p, ".pdf")
)
}
render_report(b="xxxx Hospital, Inc.",h='253',p='225573')
The log file with the error part is.
("C:\Users\Mortond\AppData\Local\Programs\MiKTeX 2.9\tex\latex\graphics-def\xet
ex.def"
File: xetex.def 2017/06/24 v5.0h Graphics/color driver for xetex
))
\Gin#req#height=\dimen160
\Gin#req#width=\dimen161
)
("C:\Users\Mortond\AppData\Local\Programs\MiKTeX 2.9\tex\latex\oberdiek\grffile
.sty"
Package: grffile 2017/06/30 v1.18 Extended file name support for graphics (HO)
Package grffile Info: Option `multidot' is set to `true'.
Package grffile Info: Option `extendedchars' is set to `false'.
Package grffile Info: Option `space' is set to `true'.
Package grffile Info: \Gin#ii of package `graphicx' fixed on input line 494.
)
("C:\Users\Mortond\AppData\Local\Programs\MiKTeX 2.9\tex\latex\parskip\parskip.
sty"
Package: parskip 2018-08-24 v2.0a non-zero parskip adjustments
)
("C:\Users\Mortond\AppData\Local\Programs\MiKTeX 2.9\tex\latex\titling\titling.
sty"
Package: titling 2009/09/04 v2.1d maketitle typesetting
\thanksmarkwidth=\skip53
\thanksmargin=\skip54
\droptitle=\skip55
)
("C:\Users\Mortond\AppData\Local\Programs\MiKTeX 2.9\tex\latex\fancyhdr\fancyhd
r.sty"
Package: fancyhdr 2017/06/30 v3.9a Extensive control of page headers and footer
s
\f#nch#headwidth=\skip56
\f#nch#O#elh=\skip57
\f#nch#O#erh=\skip58
\f#nch#O#olh=\skip59
\f#nch#O#orh=\skip60
\f#nch#O#elf=\skip61
\f#nch#O#erf=\skip62
\f#nch#O#olf=\skip63
\f#nch#O#orf=\skip64
)
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.90 \addtolength{\headheight}{1.0cm} \%
make more space for the header
Here is how much of TeX's memory you used:
22493 strings out of 427767
408844 string characters out of 3146884
530389 words of memory out of 3000000
26423 multiletter control sequences out of 15000+200000
532722 words of font info for 28 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
45i,0n,68p,816b,443s stack positions out of 5000i,500n,10000p,200000b,50000s
No pages of output.
So why does it work once and not a second time? If I exit RStudio and then s start it up again, it appears to work. I've tried to
.rs.restartR() to no avail. as well as
rm(list = ls(envir = globalenv()),envir = globalenv())
gc() to clean things up.
Any thoughts? I appreciate reading through all this.
I do not know if I had the same issue. But I experienced that if I compiled my document it worked the first time and failed the second. I suspected a cache issue and added cache.rebuild=T to
<<echo=F, cache=T, message=F, warning=F, `>>=
set_parent('../../Parent.Rnw')
#
Just FIY, the header of the parent does not only include the latex info but also sources my main .R file with the calculations.
Anyway, if someone experience a similar problem try to add cache.rebuild=T to your included script(s).

Ignoring headers in log files being indexed in Splunk

Being relatively new to Splunk (ver 6) and even newer to Reg-ex, I have log files that I and trying to index that have a header than I need to ignore. There are 6 header lines. The first 4 all begin with * and the last two are blank lines. I'm assuming they are just carriage returns. I'm looking for help with the regular expression that will ignore these lines in the transforms.conf file when adding the data. Below is an example from the log file I want to add:
*******************************
*** This is a Header ***
*** 07:32:06 Tue Jan 07 ***
*******************************
Jan-07 07:32:06 SERVERNAME:somedatainfo
Jan-07 07:32:06 SERVERNAME:moredatainfo
On the forwarder or indexer you can set the sourcetype for the file that is being monitored.
# in inputs.conf
[monitor:///path/to/your/file]
sourcetype=new_sourcetype
On the indexer, you can get rid of the first lines like this:
# in props.conf
[new_sourcetype]
TRANSFORMS-test=ignore_header
#in transforms.conf
[ignore_header]
REGEX=^\*\*\*+
DEST_KEY=queue
FORMAT=nullQueue