Srt text to latex
I have extracted subtitle text in .srt
format.
It is essentially text with some keywords that indicate which type of formating to apply to different parts.
Formatting is derived from HTML tags for bold, italic, underline and color:
Bold – <b> ... </b>
or {b} ... {/b}
Italic – <i> ... </i>
or {i} ... {/i}
Underline – <u> ... </u>
or {u} ... {/u}
Font color – <font color="color name or #code"> ... </font>
(as in HTML)
Now, I would like to convert it to LaTeX format. Does anyone know how to do this?
Thanks.
EDIT: Here is a sample data:
37
00:03:28,544 --> 00:03:32,544
Maintenant une équation linéaire à deux inconnues
38
00:03:32,544 --> 00:03:36,544
est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
39
00:03:37,841 --> 00:03:44,091
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>, <i>b</i> et <i>c</i> sont des nombres réels.
I extract the text using pysub2
Maintenant une équation linéaire à deux inconnues est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>,
<i>b</i> et <i>c</i> sont des nombres réels.
I would like to have exactly the same text in Latex form, but of course, without the formatting tags (i.e. etc.) but with Latex formatting (for instance: textit{c}
instead of <i>c</i>
conversion
|
show 15 more comments
I have extracted subtitle text in .srt
format.
It is essentially text with some keywords that indicate which type of formating to apply to different parts.
Formatting is derived from HTML tags for bold, italic, underline and color:
Bold – <b> ... </b>
or {b} ... {/b}
Italic – <i> ... </i>
or {i} ... {/i}
Underline – <u> ... </u>
or {u} ... {/u}
Font color – <font color="color name or #code"> ... </font>
(as in HTML)
Now, I would like to convert it to LaTeX format. Does anyone know how to do this?
Thanks.
EDIT: Here is a sample data:
37
00:03:28,544 --> 00:03:32,544
Maintenant une équation linéaire à deux inconnues
38
00:03:32,544 --> 00:03:36,544
est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
39
00:03:37,841 --> 00:03:44,091
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>, <i>b</i> et <i>c</i> sont des nombres réels.
I extract the text using pysub2
Maintenant une équation linéaire à deux inconnues est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>,
<i>b</i> et <i>c</i> sont des nombres réels.
I would like to have exactly the same text in Latex form, but of course, without the formatting tags (i.e. etc.) but with Latex formatting (for instance: textit{c}
instead of <i>c</i>
conversion
What is srt format?
– Johannes_B
Mar 3 at 6:42
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
1
@james Ifverbatim
orlistings
are not ok for you, then explain your question further and show what you want.
– JouleV
Mar 3 at 7:16
1
@james The first problem we face here is character encoding. Indeed,β₂
is not the way LaTeX writes this character. LaTeX writes this$beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.
– AndréC
Mar 3 at 20:00
|
show 15 more comments
I have extracted subtitle text in .srt
format.
It is essentially text with some keywords that indicate which type of formating to apply to different parts.
Formatting is derived from HTML tags for bold, italic, underline and color:
Bold – <b> ... </b>
or {b} ... {/b}
Italic – <i> ... </i>
or {i} ... {/i}
Underline – <u> ... </u>
or {u} ... {/u}
Font color – <font color="color name or #code"> ... </font>
(as in HTML)
Now, I would like to convert it to LaTeX format. Does anyone know how to do this?
Thanks.
EDIT: Here is a sample data:
37
00:03:28,544 --> 00:03:32,544
Maintenant une équation linéaire à deux inconnues
38
00:03:32,544 --> 00:03:36,544
est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
39
00:03:37,841 --> 00:03:44,091
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>, <i>b</i> et <i>c</i> sont des nombres réels.
I extract the text using pysub2
Maintenant une équation linéaire à deux inconnues est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>,
<i>b</i> et <i>c</i> sont des nombres réels.
I would like to have exactly the same text in Latex form, but of course, without the formatting tags (i.e. etc.) but with Latex formatting (for instance: textit{c}
instead of <i>c</i>
conversion
I have extracted subtitle text in .srt
format.
It is essentially text with some keywords that indicate which type of formating to apply to different parts.
Formatting is derived from HTML tags for bold, italic, underline and color:
Bold – <b> ... </b>
or {b} ... {/b}
Italic – <i> ... </i>
or {i} ... {/i}
Underline – <u> ... </u>
or {u} ... {/u}
Font color – <font color="color name or #code"> ... </font>
(as in HTML)
Now, I would like to convert it to LaTeX format. Does anyone know how to do this?
Thanks.
EDIT: Here is a sample data:
37
00:03:28,544 --> 00:03:32,544
Maintenant une équation linéaire à deux inconnues
38
00:03:32,544 --> 00:03:36,544
est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
39
00:03:37,841 --> 00:03:44,091
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>, <i>b</i> et <i>c</i> sont des nombres réels.
I extract the text using pysub2
Maintenant une équation linéaire à deux inconnues est de la forme :
<i>c·aᵢ₁(α₁ - β₁) + c·aᵢ₂(α₂ - β₂) + ... + c·aₙ₁(αₙ - βₙ)) = 0.</i>,
je nomme cette fois les inconnues <i>x</i> et <i>y</i>, où <i>a</i>,
<i>b</i> et <i>c</i> sont des nombres réels.
I would like to have exactly the same text in Latex form, but of course, without the formatting tags (i.e. etc.) but with Latex formatting (for instance: textit{c}
instead of <i>c</i>
conversion
conversion
edited 4 hours ago
Henri Menke
76.1k8167282
76.1k8167282
asked Mar 3 at 6:40
jamesjames
1567
1567
What is srt format?
– Johannes_B
Mar 3 at 6:42
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
1
@james Ifverbatim
orlistings
are not ok for you, then explain your question further and show what you want.
– JouleV
Mar 3 at 7:16
1
@james The first problem we face here is character encoding. Indeed,β₂
is not the way LaTeX writes this character. LaTeX writes this$beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.
– AndréC
Mar 3 at 20:00
|
show 15 more comments
What is srt format?
– Johannes_B
Mar 3 at 6:42
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
1
@james Ifverbatim
orlistings
are not ok for you, then explain your question further and show what you want.
– JouleV
Mar 3 at 7:16
1
@james The first problem we face here is character encoding. Indeed,β₂
is not the way LaTeX writes this character. LaTeX writes this$beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.
– AndréC
Mar 3 at 20:00
What is srt format?
– Johannes_B
Mar 3 at 6:42
What is srt format?
– Johannes_B
Mar 3 at 6:42
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
1
1
@james If
verbatim
or listings
are not ok for you, then explain your question further and show what you want.– JouleV
Mar 3 at 7:16
@james If
verbatim
or listings
are not ok for you, then explain your question further and show what you want.– JouleV
Mar 3 at 7:16
1
1
@james The first problem we face here is character encoding. Indeed,
β₂
is not the way LaTeX writes this character. LaTeX writes this $beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.– AndréC
Mar 3 at 20:00
@james The first problem we face here is character encoding. Indeed,
β₂
is not the way LaTeX writes this character. LaTeX writes this $beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.– AndréC
Mar 3 at 20:00
|
show 15 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477510%2fsrt-text-to-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477510%2fsrt-text-to-latex%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is srt format?
– Johannes_B
Mar 3 at 6:42
@Johannes_B please see my edited question.
– james
Mar 3 at 6:44
Why do you want to convert this to a pdf? Isn't it completely useless in this format?
– Johannes_B
Mar 3 at 6:46
1
@james If
verbatim
orlistings
are not ok for you, then explain your question further and show what you want.– JouleV
Mar 3 at 7:16
1
@james The first problem we face here is character encoding. Indeed,
β₂
is not the way LaTeX writes this character. LaTeX writes this$beta_2$
. So, you need to find a way to convert the characters encoded in this way to LaTeX code. There are specialists in coding and fonts, perhaps they can explain how to proceed. Ask a new question.– AndréC
Mar 3 at 20:00