latex

LaTeX breaking up too many words

梦想与她 提交于 2019-12-04 10:38:22
问题 I've written a document in LaTeX, using two-column format, 11pt, times font. Many of my words appear hyphenated, and for every description list item, I get a badbox warning (no problems visible in the output though). How can I fix this? 回答1: you should set a hyphenation penalty somewhere in your preamble: \hyphenpenalty=750 The value of 750 suited my needs for a two column layout on letter paper (8.5x11 in) with a 12 pt font. Adjust the value to suit your needs. The higher the number, the

header on each page of big table of xtable?

好久不见. 提交于 2019-12-04 10:02:57
How do you put on a big table of xtable the table header on each page?, So that is easier to read the table the table between pages. I use the following in Sweave: test.big<- xtable(test,label="table",caption='test') align(test.big) <- "|c|c|c|c|l|c|c|c|" print(test.big,tabular.environment='longtable',include.colnames = TRUE,floating=FALSE) Thanks for your answers The longtable (LaTeX) package specification can be found at that URL. The section of code in the examples whose output appears on pages 2 and 3 is in section 8 and I have reproduced bit of it below: \caption[]{(continued)}\\ \hline

Caption outside table?

穿精又带淫゛_ 提交于 2019-12-04 09:59:15
问题 I'm trying to add a caption to a table in latex, however it throws this error "! LaTeX Error: \caption outside float." From the error I am guessing ti means that it is outside the table, but I have clearly put it inside. \begin{tabular}{|c|c|c|c|c|c|} \caption{Table1} Potentiometer & Resistance & \multicolumn{2}{c}{Calculated V\textsubscript{32}} & \multicolumn{2}{c|}{Measured V\textsubscript{32}}\\ \cline{3-6} Position & R\textsubscript{34} & Amplitude & Phase & Amplitude & Phase\\ \hline

Can't knit to pdf with custom styles

时光总嘲笑我的痴心妄想 提交于 2019-12-04 09:50:00
Trying to knit to pdf from RStudio using a custom mystyles.sty file. This used to work fine but now that I have upgraded to RStudio 1.044 I get an error. Example: --- title: "Test" output: pdf_document: includes: in_header: mystyles.sty --- ## R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the

How to insert a LaTeX environment around a block of text in emacs?

孤街浪徒 提交于 2019-12-04 09:43:55
问题 I'm using emacs with cdlatex-mode to edit LaTeX files. I would like to know how to insert a LaTeX environment around a block of text that is already written so that the \begin{} goes before the selected text and the \end{} goes after the selected text. I've tried to use cdlatex-environment function but doing so erases the selected text. 回答1: AUCTeX If you use auctex: Mark the block of text you want to enclose in an environment. Press C-c C-e . Enter an environment type of your choice (you can

Fonts in pdf documents screwed up when generated with latex (specifically, pdflatex) on mac osx

隐身守侯 提交于 2019-12-04 09:43:08
问题 My colleague suggests that texniscope is somehow to blame and that I should try purging it from my system. I really hope not to have to resort to that! Possible clues: This wasn't an issue till I upgraded to Leopard. When I say the fonts are screwed up, I mean the main text looks like maybe it's the default mac system font, and all math is completely unreadable. Basically all special symbols are completely garbled. I installed latex from here: http://www.tug.org/mactex/. I had already had

Column names on each page with xtable in Sweave

半城伤御伤魂 提交于 2019-12-04 09:31:04
问题 I want to have column names on each page of the xtable. \documentclass{article} \usepackage{graphicx} \usepackage{longtable} \begin{document} <<>>= x <- matrix(rnorm(1000), ncol = 10) x.big <- xtable(x,label='tabbig',caption='Example of longtable spanning several pages') @ <<label = tabSEM.S, echo = FALSE, results = tex >>= print(x.big,tabular.environment='longtable',floating=FALSE) @ \end{document} Any help will be highly appreciated. Thanks 回答1: I think this is really a LaTeX question,

Latex Table of Contents Links to Wrong Section

社会主义新天地 提交于 2019-12-04 09:17:35
问题 I have a section followed by a table of contents like so: \section{Section1} ABC. \addcontentsline{toc}{section}{Table of Contents} \tableofcontents \newpage \addcontentsline{toc}{section}{List of Figures} \listoffigures \newpage \section{Section2} DEF. \section{Section3} GHI. My issue is that the "Table of Contents" and "List of Figures" entries in the table of contents link (in the generated pdf) to the wrong place in the file. They both link to the first section section on page 1. The

Using sed in bash script to replace LaTeX aliases

*爱你&永不变心* 提交于 2019-12-04 09:13:53
I am relatively new to bash scripting and have no experience with LaTeX. I've been asked to develop a script which will replace convenience shortcuts in LaTeX documents with their more cumbersome long-form equivalents. My approach thus far has been to isolate both the shortcut and the long-form in separate variables and then try to replace them in the text by using sed. I've attached short example files below. As it is currently the script takes 2 arguments, a file expr from which it retrieves the shortcuts and long-form terminology and an infile to which is is supposed to make the appropriate

how to turn a DVI to tex?

∥☆過路亽.° 提交于 2019-12-04 08:27:26
Any idea how to take DVI files and turn them into tex? This is similar to the problem of turning PDF into XML which is referred to as "trying to turn a hamburger back into a cow". Both TeX->DVI and XML->PDF lose information, both in the structure of the document and its semantics. It requires a great deal of heuristics and a large corpus to recreate (some of) the original document. It is never usually 100%. The text strings may be possible, the vectors are harder. Bitmaps are almost impossible. What you are asking is not possible. I think that (same as in PostScript) even recognizing words in