Copy and paste in Latex - latex

I want add copy and paste citation in my paper and I would use this symbole "Text..."
When I tried to add it in the Latex it did not appears as I want.
Does anyone know if I need to use particular sympole?
To simplify I need just adding "" in Latex.
I hope someone can help me.
Ask me if you need any explanation.

Related

How to replace Sphinx cover page when making a PDF

I need to change the cover page of a Sphinx-generated latexpdf from RST.
How can I do that without modifying the Sphinx package itself?
I've noticed latex_preamble in the conf file but that only seems to append things. If that is the way an example would be helpful. Right now whatever I do only seems to add to rather than remove the cover page.
Found the answer and posting it here for anyone else who is interested.
In the conf.py file add the following entry:
"maketitle": "\\input{your_cover.tex}"
where your_cover.tex is your LaTeX file you want to be the cover.

Why jupyter is not able to download as pdf a markdown cell using LaTex \mathscr?

Just created a markdown cell in Jupyter using some equations, and some of them using \mathscr to have like "math" fonts. When I run the kernel containing the equations everything is ok, however when I click the option to Download as PDF via LaTex, I'm getting the error below:
! Undefined control sequence.
l.300 [\mathscr
{L}({\bf{y}}|\beta, \sigma^2, {\bf{X}}) = (2\pi\sigma^2)^{-...
?
! Emergency stop.
l.300 [\mathscr
{L}({\bf{y}}|\beta, \sigma^2, {\bf{X}}) = (2\pi\sigma^2)^{-...
If I remove the \mathscr part everything can be exported with no issues (excepting some convertion problems for special characters), however, I wanted to know ho to solve it. I've been reading and it looks like the nbconvert configuration file can be modified to solve this, but I couldn't find the mentioned file and the exact way to modify it
Thanks for your help
I think the problem is with absent \usepackage{mathrsfs} directive in an intermediate .tex-file.
So you have a several ways to overcome it.
If you face with this problem occasianaly you could the following:
download the .tex-file instead pdf;
manually insert to \usepackage{mathrsfs} to it.
before the first \usepackage for example;
run something like
xelatex file.tex to finally convert to pdf.
If you will do it often, you could try to edit appropriate jinja-template.
At first, find the place where nbconvert was installed. For example with pip: pip show nbconvert. Imagine the path is /home/i/.local/lib/python3.5/site-packages
Then the template would be at /home/i/.local/lib/python3.5/site-packages/nbconvert/templates/latex/base.tplx.
And again: just add \usepackage{mathrsfs} right after ((* block packages *)).
Voila -- the problem should gone.
At the end you have the third option -- you can create your own template from scratch and use it with nbconvert. I don't think it's very convenient way to solve your problem. You could read more in the documentation: http://nbconvert.readthedocs.io/en/latest/customizing.html

no automatically word wrap with bibliography

I have a problem with my biblatex. My booktitles don't automaticly break lines in my bibliography. Has someone got a hint how to solve this? Is it possible to get an automatic break or do I have to set them manually? And if I so, how do I do that?
Here my biblatex code snippets:
\usepackage[backend=biber,style=authoryear,sorting=nyt,citestyle=authoryear]{biblatex}
\printbibliography[type=book,title={Books}]
See this example at IEEE: after Metrics is a linebreak is missing.
EDIT: I found the solution here
I was curious about the \emph{} style (mine was always underlining). I put a single \normalem in front of the \printbibliography command and it works fine :)
\normalem
\printbibliography[type=book,title={Books}]
Your book titles are underlined, which is preventing line breaks (underlined text doesn't break). I don't think this is a standard behavior, book titles are usually displayed in italics. Perhaps you are using \underline{} inside your bibliography items definitions?

hide an entry from Toc in latex

I would like to know how I can hide a section from the table of contents but without loosing the section number in the body of the document. For example, in this tex file I loose the number for hide, and all the sequences are damaged:
\documentclass{article}
\begin{document}
\tableofcontents
\section{uno}
\section{dos}
\section*{hide}
\section{tres}
\end{document}
I think you are looking for
\section*{hide}
\addtocounter{section}{1}
or make it into a command:
\newcommand{\toclesssection}[1]{\section*{#1}\addtocounter{section}{1}}
EDIT:
Okay, I think I understand what is wanted now (and it makes more sense then the answer I gave). Here is a command that you can use to suppress adding a section, subsection, etc. to the TOC. The idea is to temporarily disable \addcontentsline.
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}
...
\tocless\section{hide}
\tocless\subsection{subhide}
Just wanted to say thanks for Ivans great hint!
(I was just googling for something similar for my customized (Sub)Appendix{} commands:
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}
\newcommand{\Appendix}[1]{
\refstepcounter{section}
\section*{Appendix \thesection:\hspace*{1.5ex} #1}
\addcontentsline{toc}{section}{Appendix \thesection}
}
\newcommand{\SubAppendix}[1]{\tocless\subsection{#1}}
Maybe this is useful for someone else, too...)
have just come here from a similar question. The answer above didn't quite work as it gave some formatting issues, but a similar solution seemed to do the trick

Adding MS-Word-like comments in LaTeX

I need a way to add text comments in "Word style" to a Latex document. I don't mean to comment the source code of the document. What I want is a way to add corrections, suggestions, etc. to the document, so that they don't interrupt the text flow, but that would still make it easy for everyone to know, which part of the sentence they are related to. They should also "disappear" when compiling the document for printing.
At first, I thought about writing a new command, that would just forward the input to \marginpar{}, and when compiling for printing would just make the definition empty. The problem is you have no guarantee where the comments will appear and you will not be able to distinguish them from the other marginpars.
Any idea?
todonotes is another package that makes nice looking callouts. You can see a number of examples in the documentation.
Since LaTeX is a text format, if you want to show someone the differences in a way that they can use them (and cherry pick from them) use the standard diff tool (e.g., diff -u orig.tex new.tex > docdiffs). This is the best way to annotate something like LaTeX documents, and can be easily used by anyone involved in the production of a document from LaTeX sources. You can then use standard LaTeX comments in your patch to explain the changes, and they can be very easily integrated. If the document lives in a version control system of some sort, just use the VCS to generate a patch file that can be reviewed.
I have used changes.sty, which gives basic change colouring:
\added{new text}
\deleted{old text}
\replaced{new text}{old text}
All of these take an optional parameter with the initials of the author who did this change. This results in different colours used, and these initials are displayed superscripted after the changed text.
\replaced[MI]{new text}{old text}
You can hide the change marks by giving the option final to the changes package.
This is very basic, and comments are not supported, but it might help.
My little home-rolled "fixme" tool uses \marginpar where possible and goes inline in places (like captions) where that is hard to arrange. This works out because I don't often use margin paragraphs for other things. This does mean you can't finalize the layout until everything is fixed, but I don't feel much pain from that...
Other than that I heartily agree with Michael about using standard tools and version control.
See also:
Tips for collaboratively editing a LaTeX document (which addresses you main question...)
https://stackoverflow.com/questions/193298/best-practices-in-latex
and a self-plug:
How do I get Emacs to fill sentences, but not paragraphs?
You could also try the trackchanges package.
You can use the changebar package to highlight areas of text that have been affected.
If you don't want to do the markup manually (which can be tedious and interrupt the flow of editing) the neat latexdiff utility will take a diff of your document and produce a version of it with markup added to visually display the changes between the two versions in the typeset output.
This would be my preferred solution, although I haven't tested it out on large, multi-file documents.
The best package I know is Easy Review that provides the commenting functionality into LaTeX environment. For example, you can use the following simple commands such as \add{NEW TEXT}, \remove{OLD TEXT}, \replace{OLD TEXT}{NEW TEXT}, \comment{TEXT}{COMMENT}, \highlight{TEXT}, and \alert{TEXT}.
Some examples can be found here.
The todonotes package looks great, but if that proves too cumbersome to use, a simple solution is just to use footnotes (e.g. in red to separate them from regular footnotes).
Package trackchanges.sty works exactly the way changes.sty. See #Svante's reply.
It has easy to remember commands and you can change how edits will appear after compiling the document. You can also hide the edits for printing.

Resources