I have the problem that latex creates empty pages while using the float package.
This is the Code:
\section{Sample}
Sample Text.
\section{Title}
\begin {figure}[H]
Insert figure via R-Code.
\captionlistentry{Title Boxplot}
Insert figure via R-Code.
\captionlistentry{Dressiergrad Boxplot}
\end{figure}
\begin{figure}[H]
Insert figure via R-Code.
\captionlistentry{Reckgrad Boxplot}
\end{figure}
So i got 2 Sections "Sample" and "Example ". In Sample there is some text and in Title there are 3 figures. 2 of the figures and the section heading are fitting onto 1 page.
So there should be smth. like that:
Page1: Sample title + text
Page2: Example title + 2 figures
Page3: 1 figure
But Latex makes this:
Page1: Sample title + text
Page2: Empty Page
Page3: Example title + 2 figures
Page4: 1 figure
I'm using documentclass{article}, thanks for helping!
Try removing the [H] option. If the image sizes are little bigger than what can be fit in the same page, LaTeX pushes it to the next page.
As a second option, you can reduce the size of the image a little bit!
Related
I am attempting to create a paper with the elsarticle.cls class, and have it be 2 columns. There are O(100) authors on the paper. For some reason, the author list spills over the bottom margin rather than continuing onto the next page, so the abstract never appears in the document. Below is a minimal working example of this type of problem.
\documentclass[english,10pt,final,twocolumn]{elsarticle}
\usepackage{lipsum}
%\usepackage{subcaption}
\usepackage{multido}
\begin{document}
\begin{frontmatter}{}
\title{
A minimal working example of an author list erroniously going beyond the bottom of a page in an 2-column Elsevier article.
}
\newcommand*{\UCR}{University of California Riverside, 900 University Avenue, Riverside, CA 92521, USA}
\newcommand*{\UCRindex}{39}
%Here I give myself 1000 times authorship on this paper just to fill up the page
\multido{}{1000}{ \author[toUCR]{S.J.~Paul}}
\address[toUCR]{\UCR}
\begin{abstract}
\lipsum[3]
\end{abstract}
%\date{\today}
\end{frontmatter}{}
\section{Introduction}
\lipsum[2]
\end{document}
This produces the file shown below. How do I fix this?
Rendered document
As a workaround, you could remove the twocolumn class option and manually switch to two column layout after the frontmatter:
\documentclass[english,10pt,final,
%twocolumn
]{elsarticle}
\usepackage{lipsum}
%\usepackage{subcaption}
\usepackage{multido}
\begin{document}
\begin{frontmatter}{}
\title{
A minimal working example of an author list erroniously going beyond the bottom of a page in an 2-column Elsevier article.
}
\newcommand*{\UCR}{University of California Riverside, 900 University Avenue, Riverside, CA 92521, USA}
\newcommand*{\UCRindex}{39}
%Here I give myself 1000 times authorship on this paper just to fill up the page
\multido{}{1000}{ \author[toUCR]{S.J.~Paul}}
\address[toUCR]{\UCR}
\begin{abstract}
\lipsum[3]
\end{abstract}
%\date{\today}
\end{frontmatter}
\twocolumn
\section{Introduction}
\lipsum[2]
\end{document}
I am trying to write a pine script with two indicators one overlaid on the chart (EMA) and another on its own?(Stoch) I cannot seem to find any info on how to separate these (Visually) but keep them within 1 pine script, ie to be able to take trading decisions based on these.
The earlier answer from Luc is right, unfortunately. Each script can either create plots that are overlaid on the default price chart, or shown in a different pane, but not both. But there is a workaround.
Suppose you've made some non-trivial calculation in your script and you'd like to put it in different pane. E.g. the next code:
//#version=4
study(title="Stochastic", shorttitle="Stoch", format=format.price, precision=2)
periodK = input(14, title="K", minval=1)
periodD = input(3, title="D", minval=1)
smoothK = input(3, title="Smooth", minval=1)
k = sma(stoch(close, high, low, periodK), smoothK)
d = sma(k, periodD)
plot(k, title="%K", color=color.blue)
plot(d, title="%D", color=color.orange)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=color.purple, transp=75)
// This next plot would work best in a separate pane
someNonTrivialCalculatedSeries = close
plot(ema(someNonTrivialCalculatedSeries, 25), title="Exporting Plot")
Because they have different scale, one of them most likely will break another indicator's scale.
So you'd like show Stoch in different pine, whereas ema() should be overlayed with the main chart. For that you should make the next steps:
Turn off in the study's the extra plot to return scale to normal:
Apply to the chart the next script:
//#version=4
study("NonOverlayIndicator", overlay=true)
src = input(defval=close, type=input.source)
plot(src)
Choose in the second's script inputs source required plot from the first script:
And voilĂ - you got the plots in different pines:
But if you want split the plots because you have retrictions on amount of studies you allowed to apply (e.g. 3 for free-account) - that won't help you.
It cannot be done. A script runs either in overlay=true mode on the chart, in which case it cannot direct plots elsewhere, or in a separate pane when overlay=false (the default).
When the script is running in a pane, it can change the color of the chart bars using barcolor(), but that's the only way it can modify the chart.
It is possible to rescale signals so that multiple bounded (e.g., 0-100, -1 to +1) signals generated by one script appear one on top of the other, but this is typically impossible in overlay mode, as the vertical scale varies with the bars on the chart. The only way for an overlay script to work with its own scale is when it uses No scale, but this prevents the indicator's plots to plot relative to price, and so the chart's bars.
Nice workaround from Michael.
Unfortunately, this only seems to work to pass data for one plot.
I would like to pass data for 3 different plots to the stock price graph.
If I try this, for 'input.source' I can only select the standard sources: "open, high, low, close ...". I can not select the data from other indicators.
If I remove plots 2 and 3, it works as Michael described.
Anybody has a workaround for the workaround..? ;-)
I'm new in this mailing list, so please apologize any of my wrongdoings.
FOP 1.1
Question: Is there any condition to find the position of a text-block in on PDF page.
This is the problem:
I need to change the formatting of a title-block depending on its position on the page.
If the title-block appears somewhere in the (vertical) middle of the page, I want to add a line on top of it.
if the title-block appears at the beginning/top of a page the line must not appear
Does XSL-FO have a way to do that?
From http://lists.w3.org/Archives/Public/www-xsl-fo/2015Sep/0002.html:
I used a white background on the
fo:region-before and a negative margin on the title to 'push' the
'border-before' of the title under the fo:region-before.
This requires that the FO processor supports negative values of
'margin-top', which is allowed but not required (http://www.w3.org/TR/xsl11/#margin-top). It also requires
that the FO processor will 'paint' the fo:region-before after painting
the fo:region-body.
I'm using Docx4J to make an invoice model.
In the left-side of the page, it's usual to show a legal sentence as: Registered company in ... Book ... Page ...
I have inserted this in my template with a Word text frame.
Well, my issue is: when exporting to .docx, this legal text is shown perfect, but when exporting to .pdf, it's shown as an horizontal table under the other data.
The code to export to PDF is:
FOSettings foSettings = Docx4J.createFOSettings();
foSettings.setFoDumpFile(foDumpFile);
foSettings.setWmlPackage(template);
fos = new FileOutputStream(new File("/C:/mypath/prueba_OUT.pdf"));
Docx4J.toFO(foSettings, fos, Docx4J.FLAG_EXPORT_PREFER_XSL);
Any help would be very appreciated.
Thanks.
You'd need to extend the PDF via FO code; see further How to correctly position a header image with docx4j?
Float left may or may not be easy; similarly the rotated text.
In general, the way to work on this is to take the FO generated by docx4j, then hand edit it to something which FOP can convert to a PDF you are happy with. If you can do that, then its a matter of modifying docx4j to generate that FO.
In MediaWiki, we would like to display tables of contents (from multiple pages) on one other page. We know that this can be done automatically, e.g. if we include pages 1, 2 & 3 like this:
{{:Page 1}}
{{:Page 2}}
{{:Page 3}}
on page X, then page X displays a combined TOC for pages 1, 2 & 3.
But we want a table on page X which shows each TOC in a separate cell. Is there any way to include each TOC individually?
I have tried using <noinclude></noinclude> tags around the text on pages 1, 2 & 3 and then forcing a table of contents outside (using __TOC__) but that only creates a TOC on page X (using the contents of page X).
You can't. The table of contents is generated dynamically in each page, for all the sections that appear in the current page.
When you include the sections (or at least the section headings) of the other pages, they will show up in the TOC of page X. If you include the __TOC__ magic word, it means only to generate the toc for page X.
Three solutions:
Include the section (headings) of pages 1, 2 and 3. They will show up in the toc of page X even when contained in a <div style="display:none;"> - a really ugly way.
Copy the TOC tables manually to page X. You can view their HTML by looking in the generated HTML source of pages 1, 2 and 3 with your browser.
Write an extension that allows transclusion of TOCs from other pages. It might introduce a new parserfunction {{toc:<pagename>}} and be able to call the toc-generating function in the context of another page.
Include only the section headings as a list. In the pages 1, 2 and 3 you will need to write
== <onlyinclude><includeonly>##</includeonly> Heading Number One </onlyinclude> ==
=== <onlyinclude><includeonly>###</includeonly> Part One of Heading Number One </onlyinclude> ===
...
which you will be able to include in the table at Page X with
{{:Page 1}}
It should show up as a numbered list, like the TOC.