Latex subsection remove dotted lines [closed] - formatting

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Please suggest how can I remove dotted lines from the technical skills sections
Link to error image
\section{TECHNICAL SKILLS}
\vspace{-4mm}
\begin{minipage}[t]{.6\textwidth}
\subsection{Languages}
\paragraph{Proficient:}
\textbullet{} Test \textbullet{} Test \textbullet{} Test \textbullet{} Dart \textbullet{} Test \\
\location{Familiar / Studying:}
\textbullet{} Test \textbullet{} Test \\
\end{minipage}
Find code here: https://www.overleaf.com/read/wxwpscypyhrc
Thanks,

Several problems:
\location is not defined. You must either define it or not use it. Ignoring the error messages is not an option
In this particular documentclass \paragraph is not defined. You must either define it or not use it. Ignoring the error messages is not an option
If you don't supply the required information, you must not use \makecvtitle. In particular an empty address causes an error message. Ignoring the error messages is not an option
to remove the dotted lines in the subsections you can use \renewcommand*{\subsectionrule}{}
the \vspace*{-12mm} in the preamble does nothing useful
\documentclass[11pt,a4paper,roman]{moderncv}
% possible options include font size ('10pt', '11pt' and '12pt'), paper size ('a4paper', 'letterpaper', 'a5paper', 'legalpaper', 'executivepaper' and 'landscape') and font family ('sans' and 'roman')
% modern themes
\moderncvstyle{banking}
\moderncvcolor{black}
% color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage[utf8]{inputenc}
\usepackage{fontawesome}
\usepackage{tabularx}
\usepackage{ragged2e}
\usepackage[scale=0.85]{geometry}
\usepackage{multicol}
\usepackage{import}
\vspace*{-12mm}
\name{Test}{Test}
\address{}{}{}
\newcommand*{\customcventry}[7][.25em]{
\begin{tabular}{#{}l}
{\bfseries #4}
\end{tabular}
\hfill% move it to the right
\begin{tabular}{l#{}}
{\bfseries #5}
\end{tabular} \\
\begin{tabular}{#{}l}
{\itshape #3}
\end{tabular}
\hfill% move it to the right
\begin{tabular}{l#{}}
{\itshape #2}
\end{tabular}
\ifx&#7&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#7%
\end{minipage}}\fi%
\par\addvspace{#1}}
\newcommand*{\customcvproject}[4][.25em]{
% \vfill\noindent
\begin{tabular}{#{}l}
{\bfseries #2}
\end{tabular}
\hfill% move it to the right
\begin{tabular}{l#{}}
{\itshape #3}
\end{tabular}
\ifx&#4&%
\else{\\%
\begin{minipage}{\maincolumnwidth}%
\small#4%
\end{minipage}}\fi%
\par\addvspace{#1}}
\setlength{\tabcolsep}{12pt}
\newcommand{\location}[1]{#1}
\newcommand{\paragraph}[1]{#1}
\renewcommand*{\subsectionrule}{}
\address{12 somestreet}{3456 somecity}
\begin{document}
\makecvtitle
\vspace*{-11mm}
\begin{center}
\begin{tabular}{ c c c c }
\faEnvelopeO\enspace \href{mailto:test#gmail.com}{\underline{test#gmail.com}} & \faGithub\enspace \href{https://github.com/}{\underline{test-name}} & \faMobile\enspace 12345678900 & \faLinkedinSquare\enspace \href{https://www.linkedin.com/}{\underline{test-test}} \\
\end{tabular}
\end{center}
\section{EDUCATION}
{\customcventry{1 Jan 1011}{Position}{University}{10 CGPA}{}{}}
{\customcventry{1 Jan 1011}{Position}{University}{10 CGPA}{}{}}
\section{PROJECTS}
{\customcvproject{Test name}{1 Jan 1011}
{\begin{itemize}
\item Test
\item Reverse engineered obfuscated Java using a decompiler and reflection
\end{itemize}
}
}
{\customcvproject{Test name}{1 Jan 1011}
{\begin{itemize}
\item Test
\item Reverse engineered obfuscated Java using a decompiler and reflection
\end{itemize}
}
{\customcvproject{Test name}{1 Jan 1011}
{\begin{itemize}
\item Test
\item Reverse engineered obfuscated Java using a decompiler and reflection
\end{itemize}
}
}
\section{EXPERIENCE}
{\customcventry{Jan 1011}{Position}{Company}{US}{}
{\begin{itemize}
\item Designed and built the first version of infrastructure code base which teams’ monthly expenses on AWS servers by 100 thousand dollars.
\end{itemize}
}
}
{\customcventry{Jan 1011}{Position}{Company}{US}{}
{\begin{itemize}
\item Designed and built the first version of infrastructure code base which teams’ monthly expenses on AWS servers by 100 thousand dollars.
\end{itemize}
}
}
{\customcventry{Jan 1011}{Position}{Company}{US}{}
{\begin{itemize}
\item Designed and built the first version of infrastructure code base which teams’ monthly expenses on AWS servers by 100 thousand dollars.
\end{itemize}
}
}
{\customcventry{Jan 1011}{Position}{Company}{US}{}
{\begin{itemize}
\item Designed and built the first version of infrastructure code base which teams’ monthly expenses on AWS servers by 100 thousand dollars.
\end{itemize}
}
}
\section{TECHNICAL SKILLS}
\vspace{-4mm}
\begin{minipage}[t]{.6\textwidth}
\subsection{Languages}
\paragraph{Proficient:}
\textbullet{} Test \textbullet{} Test \textbullet{} Test \textbullet{} Dart \textbullet{} Test \\
\location{Familiar / Studying:}
\textbullet{} Test \textbullet{} Test \\
\end{minipage}
\begin{minipage}[t]{.5\textwidth}
\subsection{Spoken \& Written}
\location{Fluent:} \textbullet{} Test \textbullet{} Test \textbullet{} Test \\
\location{Learning:} \textbullet{} Test \\
\end{minipage}
\begin{minipage}[t]{.6\textwidth}
\subsection{Frameworks}
\textbullet{} Test \textbullet{} Test \textbullet{} Test \textbullet{} Test \\
\end{minipage}
\begin{minipage}[t]{.5\textwidth}
\subsection{Software / Version Control}
\textbullet{} Test \\
\end{minipage}
\vspace{-3mm}
\section{AWARDS AND ACHIEVEMENTS}
\begin{minipage}{\maincolumnwidth}%
\small{
\begin{itemize}
\item Test
\item Test
\item Test
\item Test
\item Test
\item Test
\item Test
\end{itemize}}%
\end{minipage}%
}
\end{document}

Related

Problems getting two output files in Nextflow

Hello all!
I´m trying to write a small Nextflow pipeline that runs vcftools comands in 300 vcf´s. The pipe takes four inputs: vcf, pop1, pop2 and a .txt file, and would have to generate two outputs: a .log.weir.fst and a .log.log file. When i run the pipeline, it only gives the .log.weir.fst files but not the .log files.
Here´s my process definition:
process fst_calculation {
publishDir "${results_dir}/fst_results_pop1_pop2/", mode:"copy"
input:
file vcf
file pop_1
file pop_2
file mart
output:
path "*.log.*"
"""
while read linea
do
echo "[DEBUG] working in line: \$linea"
inicio=\$(echo "\$linea" | cut -f3)
final=\$(echo "\$linea" | cut -f4)
cromosoma=\$(echo "\$linea" | cut -f1)
segmento=\$(echo "\$linea" | cut -f5)
vcftools --vcf ${vcf} \
--weir-fst-pop ${pop_1} \
--weir-fst-pop ${pop_2} \
--out \$inicio.log --chr \$cromosoma \
--from-bp \$inicio --to-bp \$final
done < ${mart}
"""
}
And here´s the workflow of my process
/* Load files into channel*/
pop_1 = Channel.fromPath("${params.fst_path}/pop_1")
pop_2 = Channel.fromPath("${params.fst_path}/pop_2")
vcf = Channel.fromPath("${params.fst_path}/*.vcf")
mart = Channel.fromPath("${params.fst_path}/*.txt")
/* Import modules
*/
include {
fst_calculation } from './nf_modules/modules.nf'
/*
* main pipeline logic
*/
workflow {
p1 = fst_calculation(vcf, pop_1, pop_2, mart)
p1.view()
}
When i check the work directory of the pipeline, I can see that the pipe only generates the .log.weir.fst. To verify if my code was wrong, i ran "bash .command.sh" in the working directory and this actually generates the two output files. So, is there a reason for not getting the two output files when i run the pipe?
I appreciate any help.
Note that bash .command.sh and bash .command.run do different things. The latter is basically a wrapper around the former that sets up the environment and stages the declared input files, among other things. If running the latter produces the unusual behavior, you'll need to dig deeper.
It's not completely clear to me what the problem is here. My guess is that vcftools might behave differently when run non-interactively, such that it sends it's logging to STDERR. If that's the case, the logging will be captured in a file called .command.err. To instead send that to a file, you can just redirect STDERR in the usual way, untested:
while IFS=\$'\\t' read -r cromosoma null inicio final segmento ; do
>&2 echo "[DEBUG] Working with: \${cromosoma}, \${inicio}, \${final}, \${segmento}"
vcftools \\
--vcf "${vcf}" \\
--weir-fst-pop "${pop_1}" \\
--weir-fst-pop "${pop_2}" \\
--out "\${inicio}.log" \\
--chr "\${cromosoma}" \\
--from-bp "\${inicio}" \\
--to-bp "\${final}" \\
2> "\${cromosoma}.\${inicio}.\${final}.log.log"
done < "${mart}"

How can I get the \rhead superiorly to the top and \chead down?

MWE
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\campus \\ \dept \\ \course \\ \coursen }
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}
The solution I want
After compiling the above document, the \rhead and \chead are similar in position of height. I want the \rhead to be up and \chead to be down/after \rhead.
I have reviewed a post that included something like \header[C], but that did not work. I am using Miktex + texMaker. But do provide an example if you know how to do it with \header[C] :)
Screenshots
Current one
What I get when I compile the above code
The solution that I need
I need code to get this look
You could just wrap the central header in a minipage:
\documentclass[12pt,a4paper]{article}
\usepackage{enumitem}
\usepackage{fancyhdr}
\usepackage[margin=3cm]{geometry}
\usepackage{pgfplots}
\newlength{\tabcont}
\setlength{\parindent}{0.0in}
\setlength{\parskip}{0.05in}
\title{Assignment 4}
\newcommand{\course}{lipsum}
\newcommand{\coursen}{lipsum}
\newcommand{\semester}{lipsum}
\newcommand{\TDAG}{lipsum}
\newcommand{\campus}{lipsum}
\newcommand{\dept}{lipsum}
\pagestyle{fancyplain}
\headheight 56.2pt
\chead{\begin{minipage}[t]{.3\textwidth}
\centering
\campus \\ \dept \\ \course \\ \coursen
\end{minipage}}
\lhead{\TDAG}
\rfoot{\thepage}
\begin{document}
\maketitle
Submit the following problems which are given in the tutorial 4 as your Assignment 4.
\begin{enumerate}
\item In question 19 ,part (d).
\end{enumerate}
\end{document}

Writing lines to a binary file

I'm further playing with Raku's CommaIDE and I wanna print a binary file line by line.
I've tried this, but it doesn't work:
for "G.txt".IO.lines -> $line {
say $_;
}
How shall I fix it ? It's obviously incorrect.
EDIT
this doesn't work either, see the snippet bellow
for "G.txt".IO.lines -> $line {
say $line;
}
You're showing us h.raku but Comma is giving you an error regarding c.raku, which is some other file in your Comma project.
It looks like you're working with a text file, not binary. Raku makes a clear distinction here: a text file is treated as text, regardless of encoding. If it's UTF-8, using .lines as you are now should work just fine because that's the default. If it's some other encoding, you can call .lines(:enc<some-other-encoding>). If it's truly binary, then the concept of "lines" really has no meaning, and you want something more like .slurp(:bin), which will give you a Buf[uint8] for working on the byte level.
The question specifically refers to reading a binary file, for which reading line-wise may (or may not) make sense--depending on the file.
Here's code to read a binary file straight from the docs (using class IO::CatHandle):
~$ raku -e '(my $f1 = "foo".IO).spurt: "A\nB\nC\n"; (my $f2 = "foo"); with IO::CatHandle.new: $f2 {.encoding: Nil; .slurp.say;};'
Buf[uint8]:0x<41 0A 42 0A 43 0A>
Compare to reading the file with default encoding (utf8):
~$ raku -e '(my $f1 = "foo".IO).spurt: "A\nB\nC\n"; (my $f2 = "foo"); with IO::CatHandle.new: $f2 {.slurp.say;};'
A
B
C
See:
https://docs.raku.org/routine/encoding
Note: the read method uses class IO::Handle which reads binary by default. So the code is simply:
~$ raku -e '(my $file1 = "foo".IO).spurt: "A\nB\nC\n"; my $file2 = "foo".IO; given $file2.open { .read.say; .close;};'
Buf[uint8]:0x<41 0A 42 0A 43 0A>
See:
https://docs.raku.org/type/IO::Handle#method_read
For further reading, see discussion of Perl5's <> diamond-operator-equivalent in Raku:
https://docs.raku.org/language/5to6-nutshell#while_until
...and some (older) mailing-list discussion of the same:
https://www.nntp.perl.org/group/perl.perl6.users/2018/11/msg6295.html
Finally, the docs refer to writing a mixed utf8/binary file here (useful for further testing):
https://docs.raku.org/routine/encoding#Examples

What's the easiest way to get Grammar::Tracer working on Perl6 itself?

To get an idea how perl6 parses your code, you can use the --target option:
$ perl6 --target=parse -e '"Hello World".say'
- statementlist: "Hello World".say
- statement: 1 matches
- EXPR: .say
- 0: "Hello World"
- value: "Hello World"
- quote: "Hello World"
- nibble: Hello World
- OPER: .say
- sym: .
- dottyop: say
- methodop: say
- longname: say
- name: say
- identifier: say
- O: <object>
- dotty: .say
- sym: .
- dottyop: say
- methodop: say
- longname: say
- name: say
- identifier: say
- O: <object>
$
Far better is the Grammar::Tracer module described here. According to the module documentation, one simply adds use Grammar::Tracer and any grammar defined in the scope where the use statement appears will be traced.
My question is simply this: If I'm using a "star release", what's the easiest way to get tracing (using Grammar::Tracer) on the Perl6 Grammar itself?
Alternatively, if I'm using rakudobrew, what's the easiest way to get tracing on the Perl6 Grammar itself?
It's recommended that perl6 users use star releases - would a desire to examine more closely how perl6 parses itself, using Grammar::Tracer, be worth building from source locally instead?
So the grammar in Rakudo is near enough a Perl 6 grammar, but its implemented at the NQP level https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp So the magic of Grammar::Tracer wont work here. However, you can use the STD grammar https://github.com/perl6/std/blob/master/STD.pm6 to parse some code and that should work with Grammar::Tracer, I've been fiddling around trying to get it to work with Grammar::Highlighter. Hope that helps?

LaTeX \newcommand \par issue

When I assign a new command and call it at the beginning of a \par the space between the variable text and next word is missing.
\newcommand{\testcmd}{This is a test}
\par \testcmd foobar.
Will be rendered as:
This is a testfoobar.
\par foo \testcmd bar.
Renders fine as: foo This is a test bar.
Anyone come across this before and have a solution?
Thanks
I do not know the exact thing which is going on here but there are several ways to get that space back:
\newcommand{\testcmd}{This is a test } % <- space before closing brace
par \testcmd{} foobar % <- note {}
The most verbose but the most robust way too:
\usepackage{xspace}
\newcommand{\testcmd}{This is a test\xspace}
Actually a much simpler answer would be to:
\newcommand{\testcmd}{This is a test}
\par \testcmd \ foobar.
Notice the extra "\ " before foobar (slash and space). No extra package needed. It is the same as the most common method for things like:
Mr.\ Smith
etc.\ and
Proc.\ Amer.\ Math.\ Soc.