latex

Editor showdown: Maintain newlines at the ends of sentences

瘦欲@ 提交于 2019-12-04 04:07:04
When editing non-WYSIWYG (LaTeX, HTML, etc) prose you probably want to have newlines at the ends of your sentences. This has several advantages: Easier to rearrange sentences. Easier to comment out sentences. Easier to spot run-on / overly long sentences. Easier to comment on sentences. For example: % The following isn't strictly true; maybe excise or comment out for now: After all, people who use Word or other WYSIWYG editors are aiding and abetting terrorists. And probably the most important advantage of all is that it makes collaborative editing under version control much easier. Otherwise

Rmd to PDF compiling error: Package geometry \paperwidth (0.0pt) too short

痴心易碎 提交于 2019-12-04 03:44:05
问题 I am writing a paper in R markdown and need to format it with this .cls file supplied by an academic journal. A minimal .tex file compiles perfectly well with the above cls file. My .tex file (compiled on ShareLaTeX with clv3.cls saved in same directory): \documentclass[shortpaper]{clv3} \usepackage[utf8]{inputenc} \title{Paper title} \author{Name Surname} \date{May 2018} \begin{document} \maketitle \section{Introduction} Some text. \end{document} However a comparable minimal document in R

a bib style to capitalize book titles but not paper titles [closed]

做~自己de王妃 提交于 2019-12-04 03:30:06
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I've heard that title capitalization in bibliography is the bibliography style's role (the bst file). Is there a bibliography style file that capitalizes book titles but not paper titles? For example, a paper title should be like Hello world and hello kitty a book title should be like Hello World and Hello Kitty

make LaTeX draw a \\hline between each line in tabular without using \\hline? [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 03:24:01
Is there any obvious or pretty way to have LaTeX automatically put a \hline between each line in a table without having to put a \hline between each line? I thought about creating a command like: \newcommand{\EOL}{\\ \hline} But then I will get non-standard looking tables like this: 3 & 2 & 1 \EOL 1 & 2 & 3 \EOL Is there a way such that my table bodies could look like: 3 & 2 & 1 \\ 1 & 2 & 3 \\ And yet still get the hlines? \catcode`@=11 \let \savecr \@tabularcr \def\@tabularcr{\savecr\hline} \catcode`@=12 \begin{tabular}{ccc} 1 & 2 & 3\\ 4 & 5 & 6\\ \end{tabular} 来源: https://stackoverflow.com

Trouble mapping <C-j> in Vim with latex-suite

坚强是说给别人听的谎言 提交于 2019-12-04 03:15:56
I wanted to map <C-j> to switch to the next window below the current one map <C-j> <C-w>j However, it goes into Insert mode instead of moving the window below. Why? Solution attempted: I have latex-suite installed. So I tried to query what <C-j> is mapped to :map <C-j> And I get the following output: v <NL> <Plug>IMAP_JumpForward n <NL> <Plug>IMAP_JumpForward o <NL> <C-W>j This means that I should change the mapping of <Plug>IMAP_JumpForward . I read around a bit and I found out it's related to the <++> placeholders that you can jump to using <C-j> during Insert mode. So, based on my reading,

store a text string in latex and then add other text to it (concatenate)

做~自己de王妃 提交于 2019-12-04 03:05:26
I start by defining a command to store the string "Hello": \newcommand{\textstring}{Hello} I would like to append the string " world" but unfortunately this code causes an error: \renewcommand{\textstring}{\textstring world} You can accomplish this by using \expandafter . For example: % redefine \textstring by appending " world" to it \expandafter\def\expandafter\textstring\expandafter{\textstring { }world} If you don't use \expandafter then you end up with a recursion problem. You can read more about it here . The problem is that this overwrites the definition of \textstring , rather than

How to underline section-headings in LaTeX?

南楼画角 提交于 2019-12-04 03:05:17
EDIT : As I see in the first answer, underline is the wrong word. I want a line under the section heading, separating the heading from the following text. I want to separate section headings from the following text with a horizontal line. At the moment I use the following: \newcommand{\tmpsection}[1]{} \let\tmpsection=\section \renewcommand{\section}[1]{\tmpsection{#1}\hrule\nobreak} But that produces a line, that is too far away from the section-heading and to near to the following text. Has anyone a better idea? You can do this with the \sectionrule command in the sectsty package . Rewriting

Latex \\tableofcontents command always shows blank Contents on first build

偶尔善良 提交于 2019-12-04 02:53:15
When I generate a .pdf file from a .tex file using pdflatex , only the "Contents" title is shown with no actual TOC. If I run pdflatex my.tex once more, it generates the TOC just fine. I can reproduce this simply by removing the .toc file. What I think is happening is that my .toc file is being generated too late -- so how can I make the TOC work first time? Should I be generating the TOC beforehand without using pdflatex ? This is normal. LaTeX document need several compilations to reach a stable state. Use rubber -d my to compile the right number of times ( rubber comes as a package on many

Insert manually created markdown table in Sweave document

杀马特。学长 韩版系。学妹 提交于 2019-12-04 02:06:05
问题 I have a bunch of quite big tables in markdown that I created manually. I was using them in an Rmd document. Since I need more control with LaTeX and all, I am using a Rnw document. How can I put my markdown table in the Sweave file? Below a minimal example (not working): \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} % my markdown table col1 | col2 | col3 ------|:---:|:---: row1 | cell1 | cell2 row2 | cell3 | cell4 row3 | cell5 | cell6 \end{document} I've tried to

Rmarkdown, Rstudio: pandoc.exe: Error producing PDF from TeX source

回眸只為那壹抹淺笑 提交于 2019-12-04 01:43:04
问题 I am trying to render a pdf document with the knit pdf button in RStudio, but I keep on getting this error: ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi l.167 pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43 I know there is a lot be found on the internet regarding error 43, but non of them helped me. Does anyone know what it means exactly and