Align start of paragraph and images
up vote
0
down vote
favorite
To give some context, I am working with a fairly big document, that contains some concatenated outputs from chained curl requests to a forum-like webpage, formatted afterwards with a bunch of regular expressions (it is as bad as it sounds). Thing is, the amount of text is so big that going through all paragraphs and modifying them one by one seems like a never-ending task.
With that in mind, the appearance of my output would be something like:
(...)
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_1}
caption*{a caption}
end{wrapfigure}
This is some text.par
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_2}
caption*{another caption}
end{wrapfigure}
This is another text.par
And this time there are two paragraphs!par
(...)
That, times infinity.
So, the idea is that the first paragraph for each "block" appears aligned to the picture, that is, both start at the same line. This happens whenever the text is big enough to go over the figure height, but not when it is the other way around (text starts when the previous one ended, but picture needs to go down to avoid clashing with the previous one, so you got something like:
=======| This is some text.
First |
Picture| This is another text. <==== This should not go here
=======|
And this time there are two paragraphs!
=======| <==== It should appear here
Second |
Picture|
=======|
Is there a way to achieve this without adding line breaks manually for each of the blocks?
Thanks in advance!
PS: I guess there is a case to be made for tables here. Not really that familiar with Latex yet, but having a two cell table for each "block", with left cell containing the picture and right cell containing the text, and invisible borders, would probably achieve what I want. Problem there would be that large texts would not wrap the image, which is a desired effect...
paragraphs wrapfigure alignment
New contributor
add a comment |
up vote
0
down vote
favorite
To give some context, I am working with a fairly big document, that contains some concatenated outputs from chained curl requests to a forum-like webpage, formatted afterwards with a bunch of regular expressions (it is as bad as it sounds). Thing is, the amount of text is so big that going through all paragraphs and modifying them one by one seems like a never-ending task.
With that in mind, the appearance of my output would be something like:
(...)
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_1}
caption*{a caption}
end{wrapfigure}
This is some text.par
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_2}
caption*{another caption}
end{wrapfigure}
This is another text.par
And this time there are two paragraphs!par
(...)
That, times infinity.
So, the idea is that the first paragraph for each "block" appears aligned to the picture, that is, both start at the same line. This happens whenever the text is big enough to go over the figure height, but not when it is the other way around (text starts when the previous one ended, but picture needs to go down to avoid clashing with the previous one, so you got something like:
=======| This is some text.
First |
Picture| This is another text. <==== This should not go here
=======|
And this time there are two paragraphs!
=======| <==== It should appear here
Second |
Picture|
=======|
Is there a way to achieve this without adding line breaks manually for each of the blocks?
Thanks in advance!
PS: I guess there is a case to be made for tables here. Not really that familiar with Latex yet, but having a two cell table for each "block", with left cell containing the picture and right cell containing the text, and invisible borders, would probably achieve what I want. Problem there would be that large texts would not wrap the image, which is a desired effect...
paragraphs wrapfigure alignment
New contributor
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
To give some context, I am working with a fairly big document, that contains some concatenated outputs from chained curl requests to a forum-like webpage, formatted afterwards with a bunch of regular expressions (it is as bad as it sounds). Thing is, the amount of text is so big that going through all paragraphs and modifying them one by one seems like a never-ending task.
With that in mind, the appearance of my output would be something like:
(...)
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_1}
caption*{a caption}
end{wrapfigure}
This is some text.par
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_2}
caption*{another caption}
end{wrapfigure}
This is another text.par
And this time there are two paragraphs!par
(...)
That, times infinity.
So, the idea is that the first paragraph for each "block" appears aligned to the picture, that is, both start at the same line. This happens whenever the text is big enough to go over the figure height, but not when it is the other way around (text starts when the previous one ended, but picture needs to go down to avoid clashing with the previous one, so you got something like:
=======| This is some text.
First |
Picture| This is another text. <==== This should not go here
=======|
And this time there are two paragraphs!
=======| <==== It should appear here
Second |
Picture|
=======|
Is there a way to achieve this without adding line breaks manually for each of the blocks?
Thanks in advance!
PS: I guess there is a case to be made for tables here. Not really that familiar with Latex yet, but having a two cell table for each "block", with left cell containing the picture and right cell containing the text, and invisible borders, would probably achieve what I want. Problem there would be that large texts would not wrap the image, which is a desired effect...
paragraphs wrapfigure alignment
New contributor
To give some context, I am working with a fairly big document, that contains some concatenated outputs from chained curl requests to a forum-like webpage, formatted afterwards with a bunch of regular expressions (it is as bad as it sounds). Thing is, the amount of text is so big that going through all paragraphs and modifying them one by one seems like a never-ending task.
With that in mind, the appearance of my output would be something like:
(...)
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_1}
caption*{a caption}
end{wrapfigure}
This is some text.par
begin{wrapfigure}[9]{l}{1in}
centering
includegraphics[width=1in]{my_image_2}
caption*{another caption}
end{wrapfigure}
This is another text.par
And this time there are two paragraphs!par
(...)
That, times infinity.
So, the idea is that the first paragraph for each "block" appears aligned to the picture, that is, both start at the same line. This happens whenever the text is big enough to go over the figure height, but not when it is the other way around (text starts when the previous one ended, but picture needs to go down to avoid clashing with the previous one, so you got something like:
=======| This is some text.
First |
Picture| This is another text. <==== This should not go here
=======|
And this time there are two paragraphs!
=======| <==== It should appear here
Second |
Picture|
=======|
Is there a way to achieve this without adding line breaks manually for each of the blocks?
Thanks in advance!
PS: I guess there is a case to be made for tables here. Not really that familiar with Latex yet, but having a two cell table for each "block", with left cell containing the picture and right cell containing the text, and invisible borders, would probably achieve what I want. Problem there would be that large texts would not wrap the image, which is a desired effect...
paragraphs wrapfigure alignment
paragraphs wrapfigure alignment
New contributor
New contributor
edited 16 hours ago
New contributor
asked 16 hours ago
user3175717
11
11
New contributor
New contributor
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
user3175717 is a new contributor. Be nice, and check out our Code of Conduct.
user3175717 is a new contributor. Be nice, and check out our Code of Conduct.
user3175717 is a new contributor. Be nice, and check out our Code of Conduct.
user3175717 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459619%2falign-start-of-paragraph-and-images%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password