Can not insert bibliogarphy to LaTeX - latex

I am very new using LaTeX by TeX Maker.
When i try to give bibliography with
\cite{sevgican2020intelligent}
\bibliographystyle{IEEEtran}
\bibliography{references.bib}
while my .bib doc includes the key and other information with
#article{sevgican2020intelligent,
title={Intelligent network data analytics function in 5G cellular networks using machine learning},
author={Sevgican, Salih and Turan, Meri{\c{c}} and G{\"o}karslan, Kerim and Yilmaz, H Birkan and Tugcu, Tuna},
journal={Journal of Communications and Networks},
volume={22},
number={3},
pages={269--280},
year={2020},
publisher={KICS}
}
Whenever I try to insert bibliography it gives Citation `sevgican2020intelligent' on page 1 undefined error.
When searched for the solution online, there are so many other people who had faced with this issue once. But unfortunately none of the answers could solve my problem.
Some resources, like overleaf, recommend to use
\usepackage[
backend=biber,
style=alphabetic, ieeetr,
sorting=ynt
]{biblatex}
While i am using:
\usepackage{cite}
Even when I try their recommendation, it throws more errors and warnings.
Can anyone help me to solve my problem please? Thank you for your time any way.

I also just biblatex for my bibliography and I have never had any trouble with it. The only thing to keep in mind is that you need to use \printbibliography to display it.
Start tying with the most standard way and see if you get any errors. If it works fine you can start adding arguments to get it exactly how you want:
\usepackage[sorting=none]{biblatex}
\addbibresource{references.bib}
\printbibliography

Related

Biopython SeqIO error: local variable 'qual' referenced before assignment

I send some samples for Sanger sequencing to a commercial facility. I'm able to read the files they send using the command
from Bio import SeqIO
from Bio import Seq
rec = SeqIO.read("isolation-round4/3dr23_Forward.ab1",'abi-trim').seq
But recently, due to a move, we had to send the samples elsewhere for sequencing. Now, if I try to run the same command on the output I get an error:
UnboundLocalError: local variable 'qual' referenced before assignment in
File "C:\Users\Anaconda3\lib\site-packages\Bio\SeqIO\AbiIO.py", line 462, in AbiIterator letter_annotations={"phred_quality": qual}
I would appreciate any help in dealing with this. Here are two files, one that works and one that does not, if you would like to have a look.
Thanks in advance for your help!
Bug should have already been fixed in Biopython 1.77
Update: See https://github.com/biopython/biopython/issues/3221 - turned out to be a new unexpected configuration of the ABI software producing files with no quality scores.

Sending IFS File to Outq Prints Line of "#" Symbols

I am attempting to send a file from IFS to an outq on our AS/400 system. Whenever I do, I get exactly what I send, as well as a line of "#" symbols of varying lengths appended to the end.
Here's the command I'm using:
qsh cmd('cat -c /path/test.txt | Rfile -wbQ -c "ovrprtf file(qprint)
outq(*LIBL/ABCD) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)"
qprint')
The contents of test.txt is just Hello World!
The output I get when I send the command is
Hello World!####################################################################
I have not found any posts online about a similar problem, and have tried changing values and looking for additional switches to get it to work. Nothing I'm doing seems to fix the issue.
Is there a command or switch that I am missing, or is something I have in there already causing this?
EDIT:
I found this documentation which is the first time I've seen this issue mentioned, but it's not very helpful:
“Messages for a Take Action command might consist of a long string of "at" symbols (#) in a pop-up message. (The Reflex automation Take Action command, which is configured in situations, does not have this problem.) A resolution for this problem is under construction. This problem might be resolved by the time of the product release. If you see this problem, contact IBM Software Support.”
The only differences are: 1) this is not a pop-up message, it's printed. 2) I don't believe we use Tivoli Monitoring, although I could be wrong.
Assuming we do use Tivoli Monitoring, what would the solution be? There's no additional documentation past that, and I am not a system administrator, so I can't really make the call to IBM Software Support myself. And assuming we DON'T use it, what else could cause this issue?
I get different results, yet similar. I created a test.txt with Windows Explorer, put in Hello, world!, saved it and tried the script. I got gibberish for the 'Hello, world!' and then the line of # symbols.
My system is 7.3 TR5, CCSID 37 (US English) and my IFS file is CCSID 1252 (Windows English). Results did not change if I used a stream file of CCSID 819 (US ASCII).
I didn't have any luck modifying Rfile switches.
I found that removing devtype(*userascii) produced printed output in plain English without the # symbols. Do you really need *USERASCII? I would think that would be more for a pre-formatted 'print-ready' file like Postscript or the like.
EDIT: some more things to try
I don't understand why *USERASCII is adding those # symbols; it looks like a translation issue.
I tried this and still got the extra ###... You might have to play with the TOCCSID() parameter. Although a failure, it did give me an idea: what if those # symbols are EBCDIC spaces being sent as-is to the *USERASCII print stream? All we'd need is a way to send only the number of bytes in the stream file, without any padding.
CRTPF FILE(QTEMP/PRTSTMF) RCDLEN(132)
CPY OBJ('/path/test.txt') TOOBJ('/qsys.lib/qtemp.lib/prtstmf.file/prtstmf.mbr') replace(*yes)
ovrprtf file(qprint) outq(*LIBL/prt3812) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)
cpyf prtstmf qprint
The data in QTEMP/PRTSTMF is in ASCII; DSPPFM shows that much. It also shows a bunch of spaces: after all, it is a fixed length file. My next step was to write an RPG program to read the stream file and print it, but Scott Klement already did that: http://www.scottklement.com/PrtStmf.zip
This works on my system:
ovrprtf file(qsysprt) outq(*LIBL/abcd) devtype(*USERASCII) rplunprt(*no) splfname(test) hold(*no)
prtstmf stmf('/path/test.txt') outq(abcd)

How do I command the Rascal Shell not to truncate my output if it's quite long

This seems like a pretty basic question to me, but I don't seem to be able to find the answer anywhere. I need to get the full output of a command in the Rascal shell, however, Rascal seems to truncate long outputs automatically. Is there any way to tell the shell to always show the full output for a given command.
Example:
rascal>calculateCodeDuplication("smallsql0.21_src")
list[list[loc]]: [
[
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1310,26,<34,0>,<34,26>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1494,56,<43,1>,<43,57>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1558,49,<46,1>,<48,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1616,44,<51,1>,<53,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1665,57,<55,1>,<57,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1731,51,<59,1>,<61,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1791,57,<63,1>,<66,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1853,65,<68,1>,<71,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1927,61,<74,1>,<77,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1993,56,<79,1>,<82,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2055,50,<84,1>,<86,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2114,54,<88,1>,<90,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2177,42,<92,1>,<94,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2248,7,<96,24>,<96,31>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2225,136,<96,1>,<101,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2390,8,<103,24>,<103,32>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2367,153,<103,1>,<107,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2526,54,<109,1>,<111,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2586,51,<113,1>,<115,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2671,16,<118,27>,<118,43>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2645,78,<118,1>,<120,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2731,49,<123,1>,<125,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2789,48,<128,1>,<130,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2846,48,<133,1>,<135,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2902,46,<138,1>,<140,2>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(2955,72,<143,1>,<143,73>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(3118,19,<149,43>,<149,62>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(3041,227,<146,4>,<152,5>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(1340,1931,<36,0>,<153,1>),
|java+compilationUnit:///src/smallsql/database/NoFromResult.java|(0,3273,<1,0>,<153,3>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1305,26,<33,0>,<33,26>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1418,51,<38,4>,<38,55>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1477,123,<40,4>,<43,5>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(1337,266,<36,0>,<44,1>),
|java+compilationUnit:///src/smallsql/database/ExpressionFunctionLog.java|(0,1603,<1,0>,<44,1>),
|java+compilationUnit:///src/smallsql/junit/TestDBMetaData.java|(1298,23,<33,0>,<33,23>),
|java+compilationUnit:///src/smallsql/junit/TestDBMetaData.java|(1325,18,<35,...
(note that the console outputs cuts off in the middle of the line with ...)
There are a number of ways. Here are the two I use most frequently:
use iprintln or println from the IO module. The former does indentation which is nice for complex outputs. example: import IO; iprintln(calculateCodeDuplication("smallsql0.21_src")); The nice thing about this is that in the terminal values of loc type are hyperlinks
open an editor for the value using the util::ValueUI module (only in Eclipse), for example: import util::ValueUI; text(calculateCodeDuplication("smallsql0.21_src")); This will pop up an editor with the indented output value (nice to search in using CTRL+F, but the loc is not a hyperlink. Would love to have a contribution in that direction :-))
Caveat for the first one is that scrolling up and down in the Eclipse terminal is very slow on Mac's, and not really fast on Windows either.

DLV predicate not being derived

I have this simple DLV program consisting of few predicates and derivations rules. One of the rules is not being activated and I have no clue why since apparently all predicates exist. I have to admit I am no expert in DLV and a bit rusty since the last time I used it so please forgive me if this is too obvious :-/
Among others, I have this rule:
knows(ps, chunk(v, ps, pd)) :- value(v),
knows(ps, v),
connected(ps, pd).
And here you can see what I get after executing the code:
./dlv -nofinitecheck model.edb rules.idb
{participant(p1), participant(p2), participant(p3), value(v1),
value(r1), value(v2), value(r2), value(v3), value(r3),
connected(p1,p2), connected(p1,p3), connected(p2,p3), knows(p1,v1),
knows(p1,r1), knows(p2,v2), knows(p2,r2), knows(p3,v3), knows(p3,r3)}
Since I have "value(v1)" and "knows(p1,v1)" and "connected(p1,p2)", I was expecting the output of the program should contain "knows(p1, chunk(v1, p1, p2))".
Can anyone explain me why this is not happening?
Edit: I have removed all rules and created just this single one
chunk(v, ps) :- value(v), participant(ps).
But this rule is not being activated either! What's the problem? I have tried the simplest one:
chunk(v) :- value(v).
and no activation. What am I missing?
OK. I Just realised of my stupidity. The problem is I am using lowercase letters for the variables rather than capitol letters... Sorry, as I said I am rusty!
So, just for the record. Rather than chunk(v) :- value(v) it should be something like chunk(V) :- value(V)

How to make the vim Latex Suite recognize an "unknown package" error?

I'm using the Vim Latex Suite, and I love it. But there are some points in which it doesn't do what I want.
From the .vim/compiler/tex.vim file:
" Depending on the 'ignore-level', the following kinds of messages are
" ignored. An ignore level of 3 for instance means that messages 1-3 will be
" ignored. By default, the ignore level is set to 4.
"
" 1. LaTeX Warning: Specifier 'h' changed to 't'.
" This errors occurs when TeX is not able to correctly place a floating
" object at a specified location, because of which it defaulted to the
" top of the page.
" 2. LaTeX Warning: Underfull box ...
" 3. LaTeX Warning: Overfull box ...
" both these warnings (very common) are due to \hbox settings not being
" satisfied nicely.
" 4. LaTeX Warning: You have requested ...,
" This warning occurs in slitex when using the xypic package.
" 5. Missing number error:
" Usually, when the name of an included eps file is spelled incorrectly,
" then the \bb-error message is accompanied by a bunch of "missing
" number, treated as zero" error messages. This level ignores these
" warnings.
" NOTE: number 5 is actually a latex error, not a warning!
This list doesn't mention anything about missing packages. This can be noticed when compiling a Tex file that has a \usepackage which isn't on the system.
normally one would get the error (when adding `\usepackage{notapackage}:
! LaTeX Error: File `notapackage.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
But in vim, since this type of error isn't supported, I get:
As you can see nothing is said about a missing package, just an cryptic emergency stop
Another problem is that when an unknown option is passed to a package, Vim opens up that packages .sty file, which can be mighty irritating.
How do I make vim recognize this error?
I see nothing wrong with the error you are getting. Remember, that vim does not know anything about latex. All the messages that you see are what the latex compiler spits out (which in turn, does not know about vim). All that the vim-latex-suite does is display the output neatly in a vim buffer/window for easy reading/fixes.
Secondly, I think that you are just seeing the last part of the error message in the Quickfix/log window and if you scroll up, you should see the correct message. Here's an explanation of what you're seeing and the different modes of compilation.
Non-stop mode
In this mode pdflatex (or latex) compiles without stopping for warnings/errors, which is useful because I don't really want to pause and hit enter at each step. Judging by the error message you have, this is the mode you are running it in. The location where this mode is set is in ~/.vim/ftplugin/tex.vim especially, the following line:
let g:Tex_CompileRule_pdf = 'pdflatex -interaction nonstopmode $*'
To demonstrate, here's a test example that I compiled
\documentclass{article}
\usepackage{notapackage}
\begin{document}
Hello world
\end{document}
The message I get is:
At first, it looks like what you have, but note that they're at lines 42-47. Scrolling up a few lines, you'll find:
There is no way to halt it in this mode (that's why it's called nonstop mode!), and this is the behaviour you see if you ran it from the terminal.
Interactive mode
In this mode it pauses for each error and gives you a chance to correct it (if possible). This is useful in large projects (i.e. books running into pages with lots of equations + floats) where the compile time is longer and you'd rather pause to fix than recompile from the start.
If you turn off the nonstop mode by setting
let g:Tex_CompileRule_pdf = 'pdflatex $*'
and then try to compile, vim will take you to the terminal, where you can enter a new name for the package at the prompt. Since it is a simple example, to see the changes visually after entering a new package, I entered palatino at the prompt. This should compile the PDF and display "Hello world" in Palatino font, and indeed it does! (Palatino is on the left and the default CM is on the right).
However, I really wouldn't recommend this mode if you, like me, are just using latex for your school/math/cv work. It'll quickly get frustrating.

Resources